fix: revert README to v1.x documentation on main (#1971)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
b38716e5e3
commit
2137c8fbdb
7 changed files with 2762 additions and 188 deletions
2
.github/workflows/shared.yml
vendored
2
.github/workflows/shared.yml
vendored
|
|
@ -80,4 +80,4 @@ jobs:
|
||||||
run: uv sync --frozen --all-extras --python 3.10
|
run: uv sync --frozen --all-extras --python 3.10
|
||||||
|
|
||||||
- name: Check README snippets are up to date
|
- name: Check README snippets are up to date
|
||||||
run: uv run --frozen scripts/update_readme_snippets.py --check
|
run: uv run --frozen scripts/update_readme_snippets.py --check --readme README.v2.md
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ repos:
|
||||||
types: [python]
|
types: [python]
|
||||||
language: system
|
language: system
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
exclude: ^README\.md$
|
exclude: ^README(\.v2)?\.md$
|
||||||
- id: pyright
|
- id: pyright
|
||||||
name: pyright
|
name: pyright
|
||||||
entry: uv run --frozen pyright
|
entry: uv run --frozen pyright
|
||||||
|
|
@ -59,5 +59,5 @@ repos:
|
||||||
name: Check README snippets are up to date
|
name: Check README snippets are up to date
|
||||||
entry: uv run --frozen python scripts/update_readme_snippets.py --check
|
entry: uv run --frozen python scripts/update_readme_snippets.py --check
|
||||||
language: system
|
language: system
|
||||||
files: ^(README\.md|examples/.*\.py|scripts/update_readme_snippets\.py)$
|
files: ^(README\.v2\.md|examples/.*\.py|scripts/update_readme_snippets\.py)$
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|
|
||||||
2529
README.v2.md
Normal file
2529
README.v2.md
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -123,7 +123,7 @@ executionEnvironments = [
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 120
|
line-length = 120
|
||||||
target-version = "py310"
|
target-version = "py310"
|
||||||
extend-exclude = ["README.md"]
|
extend-exclude = ["README.md", "README.v2.md"]
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = [
|
select = [
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,8 @@ def main():
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--check", action="store_true", help="Check mode - verify snippets are up to date without modifying"
|
"--check", action="store_true", help="Check mode - verify snippets are up to date without modifying"
|
||||||
)
|
)
|
||||||
parser.add_argument("--readme", default="README.md", help="Path to README file (default: README.md)")
|
# TODO(v2): Drop the `--readme` argument when v2 is released, and set to `README.md`.
|
||||||
|
parser.add_argument("--readme", default="README.v2.md", help="Path to README file (default: README.v2.md)")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,8 @@ async def test_desktop(monkeypatch: pytest.MonkeyPatch):
|
||||||
assert "/fake/path/file2.txt" in content.text
|
assert "/fake/path/file2.txt" in content.text
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("example", find_examples("README.md"), ids=str)
|
# TODO(v2): Change back to README.md when v2 is released
|
||||||
|
@pytest.mark.parametrize("example", find_examples("README.v2.md"), ids=str)
|
||||||
def test_docs_examples(example: CodeExample, eval_example: EvalExample):
|
def test_docs_examples(example: CodeExample, eval_example: EvalExample):
|
||||||
ruff_ignore: list[str] = ["F841", "I001", "F821"] # F821: undefined names (snippets lack imports)
|
ruff_ignore: list[str] = ["F841", "I001", "F821"] # F821: undefined names (snippets lack imports)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue