ruff-sync 0.1.5.dev5__tar.gz → 0.1.5.dev6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ruff_sync-0.1.5.dev6/.agents/doc-fix.md +160 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/mike/SKILL.md +75 -71
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/textual/SKILL.md +4 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/textual/references/testing.md +9 -2
- ruff_sync-0.1.5.dev6/.agents/workflows/update-screenshots.md +52 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.github/workflows/ci.yaml +6 -9
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/PKG-INFO +1 -1
- ruff_sync-0.1.5.dev6/docs/assets/inspect-main.png +0 -0
- ruff_sync-0.1.5.dev6/docs/assets/inspect-search.png +0 -0
- ruff_sync-0.1.5.dev6/docs/assets/screenshots/dashboard.svg +226 -0
- ruff_sync-0.1.5.dev6/docs/assets/screenshots/legend_help.svg +235 -0
- ruff_sync-0.1.5.dev6/docs/assets/screenshots/rule_details.svg +228 -0
- ruff_sync-0.1.5.dev6/docs/assets/screenshots/screenshot_sample.toml +53 -0
- ruff_sync-0.1.5.dev6/docs/assets/screenshots/search_omnibox.svg +221 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/gen_ref_pages.py +2 -1
- ruff_sync-0.1.5.dev6/docs/inspect.md +112 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/mkdocs.yml +2 -1
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/pyproject.toml +3 -1
- ruff_sync-0.1.5.dev6/scripts/generate_tui_screenshots.py +229 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/tui/app.py +2 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/tui/themes.py +1 -1
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/tui/widgets.py +28 -25
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tasks.py +10 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/tui/test_tui.py +3 -2
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/uv.lock +31 -1
- ruff_sync-0.1.5.dev5/.github/workflows/docs.yaml +0 -32
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/DEPENDENCIES.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/TESTING.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/decisions/0001-type-refactoring-strategy.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/decisions/0002-tui-node-ast.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/decisions/README.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/formatters-architecture.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/gitlab-reports.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/issue-102-context.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/adr/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/dirty-equals/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/dirty-equals/references/common-matchers.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/dirty-equals/references/toml-matching.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/dirty-equals/trigger_eval.json +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/gh-issues/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/mike/references/commands.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/mkdocs-generation/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/mkdocs-generation/examples.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/mkdocs-generation/templates/api-reference.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/mkdocs-generation/templates/getting-started.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/mkdocs-generation/templates/index.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/mkdocs-generation/templates/mkdocs.yml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/release-notes-generation/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/ruff-sync-usage/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/ruff-sync-usage/references/ci-integration.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/ruff-sync-usage/references/configuration.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/ruff-sync-usage/references/troubleshooting.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/skill-creator/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/skill-creator/references/best-practices.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/skill-creator/references/evaluating-skills.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/skill-creator/references/optimizing-descriptions.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/skill-creator/references/quickstart.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/skill-creator/references/sources.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/skill-creator/references/using-scripts.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/skill-creator/scripts/scaffold_skill.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/textual/examples/basic_app.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/textual/examples/reactive_example.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/textual/references/events.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/textual/references/styling.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/textual/references/widgets.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/evals.json +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/references/advanced-narrowing.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/references/error-code-lookup.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/references/generics.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/references/naming.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/references/protocol-patterns.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/references/quickstart.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/references/refactoring-patterns.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/skills/type-checking/scripts/audit_types.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/tui_design.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/tui_requirements.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/tui_rule_browsing.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/tui_rule_browsing_design.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.agents/workflows/add-test-case.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.git-blame-ignore-revs +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.github/dependabot.yml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.github/workflows/complexity.yaml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.gitignore +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.pre-commit-config.yaml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/.pre-commit-hooks.yaml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/AGENTS.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/CONTRIBUTING.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/LICENSE.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/README.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/codecov.yml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/configs/data-science-engineering/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/configs/fastapi/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/configs/kitchen-sink/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/agent-skill.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/assets/favicon.png +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/assets/github-job-summary.png +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/assets/github-pr-annotation.png +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/assets/logo.png +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/assets/ruff_sync_banner.png +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/best-practices.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/ci-integration.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/configuration.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/contributing.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/examples/advanced-config.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/examples/basic-config.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/index.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/installation.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/overrides/main.html +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/overrides/partials/version_warning.html +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/pre-commit.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/pre-defined-configs.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/troubleshooting.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/url-resolution.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/docs/usage.md +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/scripts/check_dogfood.sh +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/scripts/gitclone_dogfood.sh +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/scripts/pull_dogfood.sh +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/skills-lock.json +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/__init__.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/__main__.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/cli.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/config_io.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/constants.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/core.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/dependencies.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/formatters.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/pre_commit.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/system.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/tui/__init__.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/tui/constants.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/tui/screens.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/tui/types_.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/src/ruff_sync/types_.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/__init__.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/conftest.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/multi_upstream_final.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/multi_upstream_initial.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/multi_upstream_up1.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/multi_upstream_up2.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_changes_final.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_changes_initial.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_changes_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_dotted_keys_final.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_dotted_keys_initial.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_dotted_keys_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_ruff_cfg_final.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_ruff_cfg_initial.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/no_ruff_cfg_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/readme_excludes_final.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/readme_excludes_initial.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/readme_excludes_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/standard_final.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/standard_initial.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/lifecycle_tomls/standard_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_basic.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_check.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_ci_integration.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_ci_validation.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_config_io.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_config_validation.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_constants.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_corner_cases.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_dependencies.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_deprecation.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_e2e.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_formatters.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_git_fetch.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_minimal_imports.sh +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_pre_commit.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_project.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_rule_logic.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_scaffold.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_serialization.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_system.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_toml_operations.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_url_handling.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/test_whitespace.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/tui/__init__.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/tui/conftest.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/tui/test_themes.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/tui/test_tui_types.py +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/w_ruff_sync_cfg/pyproject.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/wo_ruff_cfg/pyproject.toml +0 -0
- {ruff_sync-0.1.5.dev5 → ruff_sync-0.1.5.dev6}/tests/wo_ruff_sync_cfg/pyproject.toml +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Fix Versioned Documentation CI (`mike` + MkDocs)
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
After researching the official `mike` README, Material for MkDocs docs, and comparing against real-world projects, the current setup has **one fatal flaw** and several secondary problems that have caused versioning to never work correctly.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Root Cause: Two Workflows Fighting Each Other
|
|
10
|
+
|
|
11
|
+
The most critical issue is that **two separate workflows both deploy docs to `gh-pages` on every push to `main`**, and they use incompatible methods:
|
|
12
|
+
|
|
13
|
+
| Workflow | Trigger | Command | Effect |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| `ci.yaml` → `publish-docs` | push to `main` | `mike deploy --push dev` | Appends a `dev/` directory and `versions.json` to `gh-pages` |
|
|
16
|
+
| `docs.yaml` → `deploy` | push to `main` | `mkdocs gh-deploy --force` | **Completely overwrites the entire `gh-pages` branch** |
|
|
17
|
+
|
|
18
|
+
`mkdocs gh-deploy --force` does not know about `mike`. It builds a flat site and force-pushes it as the **sole content** of `gh-pages`. This destroys everything `mike` deployed, including `versions.json`, the `dev/` subdirectory, and the root redirect.
|
|
19
|
+
|
|
20
|
+
**This is why versioning has never worked: `docs.yaml` immediately destroys `mike`'s work.**
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Secondary Issues
|
|
25
|
+
|
|
26
|
+
### 1. Wrong `alias_type` in `mkdocs.yml`
|
|
27
|
+
- `alias_type: copy` is set, but for GitHub Pages `redirect` is the most reliable option. `copy` creates full file copies for every alias, meaning the `stable` alias contains a complete separate copy of docs that becomes stale when the `stable` alias moves. `symlink` is the default and works on most servers, but GitHub Pages does not follow actual symlinks. `redirect` creates a thin HTML redirect per page at the alias path — the correct approach for GitHub Pages.
|
|
28
|
+
|
|
29
|
+
### 2. Invalid `mike alias --push stable stable` bootstrap
|
|
30
|
+
- The CI attempts `mike alias --push stable stable` to "ensure `stable` exists." This is nonsensical — it tries to create an alias called `stable` pointing to `stable` (which doesn't exist yet). Mike will error, and the `|| true` suppresses it. It achieves nothing.
|
|
31
|
+
|
|
32
|
+
### 3. `mike deploy --update-aliases dev` on stable releases
|
|
33
|
+
- When releasing `0.1.4 stable`, the CI also runs `mike deploy --push --update-aliases dev`. This re-deploys the current commit as *both* the stable `0.1.4` and the `dev` version, which makes `dev` identical to `stable`. `dev` should only be updated on commits to `main` when the version is a dev pre-release.
|
|
34
|
+
|
|
35
|
+
### 4. The `validate-docs-build` job is fine but could use `--no-directory-urls`
|
|
36
|
+
- `mkdocs build --strict` is a good validation step on PRs. No change needed.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Proposed Changes
|
|
41
|
+
|
|
42
|
+
### [`DELETE`] `.github/workflows/docs.yaml`
|
|
43
|
+
|
|
44
|
+
This file is the root cause. It must be deleted. All documentation deployment must happen exclusively through `mike` in `ci.yaml`.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### [`MODIFY`] `.github/workflows/ci.yaml` — `publish-docs` job
|
|
49
|
+
|
|
50
|
+
**Fix the deploy logic:**
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
publish-docs:
|
|
54
|
+
name: Publish Documentation
|
|
55
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
56
|
+
needs: [pre-publish]
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
permissions:
|
|
59
|
+
contents: write
|
|
60
|
+
steps:
|
|
61
|
+
- name: Checkout
|
|
62
|
+
uses: actions/checkout@v4
|
|
63
|
+
with:
|
|
64
|
+
fetch-depth: 0
|
|
65
|
+
|
|
66
|
+
- name: Fetch gh-pages branch
|
|
67
|
+
# mike needs the gh-pages branch history to make incremental commits.
|
|
68
|
+
# Without this, mike may fail or corrupt the branch.
|
|
69
|
+
run: git fetch origin gh-pages --depth=1 || true
|
|
70
|
+
|
|
71
|
+
- name: Install uv
|
|
72
|
+
uses: astral-sh/setup-uv@v5
|
|
73
|
+
|
|
74
|
+
- name: Set up Python
|
|
75
|
+
run: uv python install 3.10
|
|
76
|
+
|
|
77
|
+
- name: Install dependencies
|
|
78
|
+
run: uv sync --group docs --frozen
|
|
79
|
+
|
|
80
|
+
- name: Configure git
|
|
81
|
+
run: |
|
|
82
|
+
git config user.name "github-actions[bot]"
|
|
83
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
84
|
+
|
|
85
|
+
- name: Extract version
|
|
86
|
+
id: version
|
|
87
|
+
run: |
|
|
88
|
+
VERSION=$(uv run python -c "
|
|
89
|
+
import pathlib, tomlkit
|
|
90
|
+
data = tomlkit.parse(pathlib.Path('pyproject.toml').read_text(encoding='utf-8'))
|
|
91
|
+
version = data.get('project', {}).get('version') or data.get('version')
|
|
92
|
+
if not version: raise SystemExit('Version not found')
|
|
93
|
+
print(version)
|
|
94
|
+
")
|
|
95
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
96
|
+
echo "Current Version: $VERSION"
|
|
97
|
+
|
|
98
|
+
- name: Deploy dev documentation
|
|
99
|
+
if: contains(steps.version.outputs.version, '.dev')
|
|
100
|
+
run: uv run mike deploy --push --update-aliases dev
|
|
101
|
+
|
|
102
|
+
- name: Deploy stable documentation
|
|
103
|
+
if: "!contains(steps.version.outputs.version, '.dev')"
|
|
104
|
+
run: |
|
|
105
|
+
VERSION="${{ steps.version.outputs.version }}"
|
|
106
|
+
uv run mike deploy --push --update-aliases "$VERSION" stable
|
|
107
|
+
uv run mike set-default --push stable
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Key changes from current:**
|
|
111
|
+
1. Added `git fetch origin gh-pages --depth=1 || true` — required by mike to make incremental commits (per the mike README CI section).
|
|
112
|
+
2. Split the version extraction into its own step with `id: version` so it can be used in `if` conditions.
|
|
113
|
+
3. `dev` is **only** deployed when the version string contains `.dev`. The stable deploy no longer also writes a `dev` alias.
|
|
114
|
+
4. Removed the bogus `mike alias --push stable stable || true` bootstrap.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### [`MODIFY`] `mkdocs.yml` — Fix `alias_type`
|
|
119
|
+
|
|
120
|
+
Change `alias_type` from `copy` to `redirect`:
|
|
121
|
+
|
|
122
|
+
```yaml
|
|
123
|
+
plugins:
|
|
124
|
+
- mike:
|
|
125
|
+
alias_type: redirect # was: copy
|
|
126
|
+
canonical_version: stable
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`redirect` is the correct choice for GitHub Pages: it creates a lightweight `.html` redirect file at the alias path for every page (e.g., `stable/index.html` redirects to `0.1.4/index.html`). Unlike `symlink`, it works reliably on GitHub Pages. Unlike `copy`, it doesn't create diverging stale copies.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### [`MODIFY`] `.agents/skills/mike/SKILL.md`
|
|
134
|
+
|
|
135
|
+
- Remove the failed repair history section (no longer relevant once fixed)
|
|
136
|
+
- Update the CI workflow documentation to reflect the corrected single-workflow approach
|
|
137
|
+
- Document the critical `git fetch origin gh-pages --depth=1` requirement
|
|
138
|
+
- Document why `docs.yaml` must not exist alongside `mike deploy`
|
|
139
|
+
- Update `alias_type` guidance from `copy` to `redirect`
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Verification Plan
|
|
144
|
+
|
|
145
|
+
### After merging:
|
|
146
|
+
1. Check that `docs.yaml` is deleted and only `ci.yaml` deploys docs.
|
|
147
|
+
2. Watch the next CI run on `main` — the `publish-docs` job should run `mike deploy --push --update-aliases dev`.
|
|
148
|
+
3. Check the `gh-pages` branch: it should contain a `dev/` directory, a `versions.json`, and a root `index.html` redirect.
|
|
149
|
+
4. Visit `https://kilo59.github.io/ruff-sync/` — it should redirect to `dev/` (since no stable version has been deployed yet).
|
|
150
|
+
5. The version selector in the Material theme should appear showing `dev`.
|
|
151
|
+
|
|
152
|
+
### For stable releases:
|
|
153
|
+
When version is bumped to a non-dev release and merged:
|
|
154
|
+
- `0.x.y/` directory appears on `gh-pages`
|
|
155
|
+
- `stable` alias points to `0.x.y/` via redirects
|
|
156
|
+
- Root redirects to `stable/`
|
|
157
|
+
- Version selector shows both `0.x.y [stable]` and `dev`
|
|
158
|
+
|
|
159
|
+
> [!IMPORTANT]
|
|
160
|
+
> After deploying, you may need to manually run a one-time `mike deploy --push dev` locally (or trigger the CI) to bootstrap the `gh-pages` branch if it currently contains a flat `mkdocs gh-deploy` dump. You may first want to run `mike delete --all --push` to wipe the broken state.
|
|
@@ -18,10 +18,27 @@ uv sync --group docs
|
|
|
18
18
|
## Project Strategy
|
|
19
19
|
|
|
20
20
|
This project follows a specific versioning strategy:
|
|
21
|
-
1. **`dev`**: Represents the current `main` branch.
|
|
22
|
-
2. **Stable Releases**: Versioned documentation (e.g., `0.1.4`) created upon release
|
|
21
|
+
1. **`dev`**: Represents the current `main` branch. Deployed on every push to `main` when the version string contains `.dev`.
|
|
22
|
+
2. **Stable Releases**: Versioned documentation (e.g., `0.1.4`) created upon release — when the version string does NOT contain `.dev`.
|
|
23
23
|
3. **`stable`**: An alias always pointing to the most recent non-dev release.
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
## mkdocs.yml Configuration
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
extra:
|
|
29
|
+
version:
|
|
30
|
+
provider: mike
|
|
31
|
+
|
|
32
|
+
plugins:
|
|
33
|
+
- mike:
|
|
34
|
+
alias_type: redirect # NOT 'copy' or 'symlink' — redirect is correct for GitHub Pages
|
|
35
|
+
canonical_version: stable
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Why `alias_type: redirect`?
|
|
39
|
+
- **`symlink`** (default): Creates actual filesystem symlinks. GitHub Pages does not follow symlinks — the alias directory appears empty.
|
|
40
|
+
- **`copy`**: Duplicates all files at the alias path. Creates stale copies when the alias moves to a new version.
|
|
41
|
+
- **`redirect`**: Creates a thin HTML redirect file for each page at the alias path. Works correctly on GitHub Pages and stays current because it redirects to the canonical versioned path.
|
|
25
42
|
|
|
26
43
|
## Theme Overrides
|
|
27
44
|
|
|
@@ -35,13 +52,7 @@ theme:
|
|
|
35
52
|
|
|
36
53
|
### Version switcher
|
|
37
54
|
|
|
38
|
-
The version switcher is enabled via `extra.version.provider: mike
|
|
39
|
-
|
|
40
|
-
```yaml
|
|
41
|
-
extra:
|
|
42
|
-
version:
|
|
43
|
-
provider: mike
|
|
44
|
-
```
|
|
55
|
+
The version switcher is enabled via `extra.version.provider: mike` (shown above).
|
|
45
56
|
|
|
46
57
|
## Versioning Banner
|
|
47
58
|
|
|
@@ -51,48 +62,40 @@ A custom banner is displayed when users are viewing the `dev` documentation. Thi
|
|
|
51
62
|
- `main.html`: Extends the base template and includes the `version_warning.html` partial at the start of the `content` block.
|
|
52
63
|
- `version_warning.html`: Contains an HTML snippet that is hidden by default and shown via JavaScript if the URL path contains `/dev/`.
|
|
53
64
|
|
|
54
|
-
|
|
55
|
-
```html
|
|
56
|
-
<div id="version-warning" style="display: none;">
|
|
57
|
-
<div class="admonition warning">
|
|
58
|
-
<p class="admonition-title">Warning</p>
|
|
59
|
-
<p>
|
|
60
|
-
You are viewing the documentation for the <strong>development</strong> version.
|
|
61
|
-
The latest stable release can be found at <a href="https://kilo59.github.io/ruff-sync/">kilo59.github.io/ruff-sync</a>.
|
|
62
|
-
</p>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<script>
|
|
66
|
-
(function() {
|
|
67
|
-
const version_warning = document.getElementById("version-warning");
|
|
68
|
-
if (!version_warning) return;
|
|
69
|
-
|
|
70
|
-
// mike provides a 'mike' object with some metadata if available
|
|
71
|
-
// Otherwise fall back to checking the pathname
|
|
72
|
-
const isDev = window.location.pathname.includes("/dev/") ||
|
|
73
|
-
(window.mike && typeof window.mike.version === 'string' && window.mike.version === "dev");
|
|
74
|
-
|
|
75
|
-
if (isDev) {
|
|
76
|
-
version_warning.style.display = "block";
|
|
77
|
-
}
|
|
78
|
-
})();
|
|
79
|
-
</script>
|
|
80
|
-
```
|
|
65
|
+
## CI/CD Integration
|
|
81
66
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
mike deploy
|
|
86
|
-
```
|
|
67
|
+
> [!CAUTION]
|
|
68
|
+
> **Golden Rule**: Only ONE workflow may ever write to `gh-pages`. If two workflows both deploy to `gh-pages`, the second one will overwrite the first, destroying `versions.json` and all versioned directories.
|
|
69
|
+
>
|
|
70
|
+
> **Never** use `mkdocs gh-deploy` alongside `mike deploy` — they are mutually exclusive deployment strategies. This project uses `mike deploy` exclusively. There is no `docs.yaml` workflow; all deployment happens in `ci.yaml`.
|
|
87
71
|
|
|
88
|
-
|
|
89
|
-
When a new version is released (e.g., `0.1.4`), deploy it and update the `stable` alias:
|
|
90
|
-
```bash
|
|
91
|
-
# Deploy the specific version and update 'stable'
|
|
92
|
-
mike deploy 0.1.4 stable --push --update-aliases
|
|
72
|
+
The deployment logic is automated in [.github/workflows/ci.yaml](.github/workflows/ci.yaml). The `publish-docs` job:
|
|
93
73
|
|
|
94
|
-
|
|
95
|
-
|
|
74
|
+
1. **Fetches the `gh-pages` branch** before deploying — this is required by mike to make incremental commits. Without it, mike may reset the entire branch.
|
|
75
|
+
2. **Detects the version** from `pyproject.toml` using `tomlkit`.
|
|
76
|
+
3. **Deploys `dev`** if the version string contains `.dev`.
|
|
77
|
+
4. **Deploys a versioned release + `stable` alias** and sets `stable` as the default if not a dev version.
|
|
78
|
+
|
|
79
|
+
### Key CI snippet
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
- name: Fetch gh-pages branch
|
|
83
|
+
# Required: mike needs the gh-pages branch history for incremental commits.
|
|
84
|
+
run: git fetch origin gh-pages --depth=1 || true
|
|
85
|
+
|
|
86
|
+
- name: Deploy documentation
|
|
87
|
+
run: |
|
|
88
|
+
git config user.name "github-actions[bot]"
|
|
89
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
90
|
+
|
|
91
|
+
VERSION=$(uv run python -c "...")
|
|
92
|
+
|
|
93
|
+
if [[ "$VERSION" == *".dev"* ]]; then
|
|
94
|
+
uv run mike deploy --push --update-aliases dev
|
|
95
|
+
else
|
|
96
|
+
uv run mike deploy --push --update-aliases "$VERSION" stable
|
|
97
|
+
uv run mike set-default --push stable
|
|
98
|
+
fi
|
|
96
99
|
```
|
|
97
100
|
|
|
98
101
|
## Reference Commands
|
|
@@ -104,13 +107,23 @@ mike set-default --push stable
|
|
|
104
107
|
| **Set Default** | `mike set-default <version>` |
|
|
105
108
|
| **Alias** | `mike alias <version> <alias>` |
|
|
106
109
|
| **Delete** | `mike delete <identifier>` |
|
|
110
|
+
| **Delete all** | `mike delete --all` |
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
### Deploying Development Docs
|
|
113
|
+
Run this from the `main` branch to update the `dev` version:
|
|
114
|
+
```bash
|
|
115
|
+
mike deploy dev --push --update-aliases
|
|
116
|
+
```
|
|
109
117
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
118
|
+
### Deploying a Stable Release
|
|
119
|
+
When a new version is released (e.g., `0.1.4`), deploy it and update the `stable` alias:
|
|
120
|
+
```bash
|
|
121
|
+
# Deploy the specific version and update 'stable'
|
|
122
|
+
mike deploy 0.1.4 stable --push --update-aliases
|
|
123
|
+
|
|
124
|
+
# Set 'stable' as the default version for the site root
|
|
125
|
+
mike set-default --push stable
|
|
126
|
+
```
|
|
114
127
|
|
|
115
128
|
> [!IMPORTANT]
|
|
116
129
|
> **Do NOT** use `mike install-gh-pages`. It is deprecated and removed in the version used by this project. `mike deploy` handles branch initialization automatically.
|
|
@@ -130,21 +143,12 @@ The deployment logic is automated in [.github/workflows/ci.yaml](.github/workflo
|
|
|
130
143
|
### 404 for `versions.json`
|
|
131
144
|
- If you see a 404 for `/versions.json` but `https://<user>.github.io/<repo>/versions.json` exists, the switcher is looking at the domain root instead of the project root. Verify `site_url` includes the repository name and has a trailing slash.
|
|
132
145
|
|
|
133
|
-
|
|
146
|
+
### Corrupted/Stale `gh-pages` Branch
|
|
147
|
+
If the `gh-pages` branch was written by `mkdocs gh-deploy` instead of mike, it will be a flat site with no versioning. To reset:
|
|
134
148
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
2. **Removing `theme.version`**: Removing the redundant Material 9.x config did not restore the switcher.
|
|
142
|
-
3. **Adding `canonical_version: stable`**: Adding this to the `mike` plugin in `mkdocs.yml` was intended to fix path resolution but has not fixed the root page 404.
|
|
143
|
-
4. **CI Restoration Logic**: Adding `mike alias --push stable stable` to the CI to manually repair `versions.json` hasn't restored the picker on the root page.
|
|
144
|
-
|
|
145
|
-
### Root Cause Suspicions
|
|
146
|
-
- **GitHub Pages Subfolder Pathing**: The site is served from a subfolder (`/ruff-sync/`). `mike`'s JavaScript for the version switcher frequently struggles with calculating relative paths to `versions.json` when served from a subfolder if `site_url` or base paths are not perfectly aligned with the deployment environment.
|
|
147
|
-
- **`versions.json` Drift**: The `versions.json` file on the `gh-pages` branch frequently becomes desynchronized or loses the `stable` entry, which triggers `mkdocs-material` to hide the switcher entirely.
|
|
148
|
-
|
|
149
|
-
### Guidance for Future Agents
|
|
150
|
-
Before attempting another "fix," you **MUST** verify the current state of `versions.json` on the `gh-pages` branch and check the browser console on the live site for 404 paths. Do not assume standard configurations will work without manual verification of the deployed assets.
|
|
149
|
+
```bash
|
|
150
|
+
# WARNING: This deletes all deployed docs. Run locally, then push.
|
|
151
|
+
uv run mike delete --all --push
|
|
152
|
+
# Then trigger a CI run or deploy manually:
|
|
153
|
+
uv run mike deploy --push --update-aliases dev
|
|
154
|
+
```
|
|
@@ -51,3 +51,7 @@ if __name__ == "__main__":
|
|
|
51
51
|
> - **Async Handlers**: Event handlers can be `async def` or `def`. Use `async` if you need to `await` I/O or `post_message`.
|
|
52
52
|
> - **Main Thread**: Do not block the main thread with long-running synchronous code. Use `self.run_worker()` for background tasks.
|
|
53
53
|
- **Theme Tokens in Rich Markup**: Textual theme tokens (e.g., `$success`, `$accent`) **cannot** be used directly in Rich markup strings (like in `DataTable` cells). They must be resolved to hex strings at runtime: `str(self.app.get_theme(self.app.theme).success)`.
|
|
54
|
+
- **Type-Safe Queries (No Cast)**: If `typing.cast` is banned (e.g. by `TID251`), use a variable annotation with a targeted `# type: ignore` to resolve `query_one` results:
|
|
55
|
+
```python
|
|
56
|
+
tree: MyTree = app.query_one("#tree-id") # type: ignore[assignment]
|
|
57
|
+
```
|
|
@@ -51,8 +51,15 @@ async with app.run_test() as pilot:
|
|
|
51
51
|
assert app.query_one(Input).value == "hello"
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
###
|
|
55
|
-
|
|
54
|
+
### ⏳ Brittle Navigation & Expansion
|
|
55
|
+
When navigating complex structures like a `Tree` with many nodes:
|
|
56
|
+
- **Expansion Wait**: Expanding a node (`pilot.press("right")`) is asynchronous. If the number of child nodes is large, you MUST provide a significant `pilot.pause()` (e.g., 1.5s - 2.0s) before attempting to select or search for children.
|
|
57
|
+
- **Search-and-Verify**: Instead of fixed `down` counts, use a verification loop with a small `pilot.pause(0.02)` between steps to wait for cursor updates.
|
|
58
|
+
|
|
59
|
+
### 📸 Automated Screenshots (SVG)
|
|
60
|
+
When using `app.save_screenshot()` in a test:
|
|
61
|
+
- **Visibility Matters**: Only widgets and rows that are currently "scrolled into view" are captured in the SVG. Large tables or trees will be truncated unless you explicitly scroll.
|
|
62
|
+
- **Size Specification**: Define a repeatable terminal size in `run_test(size=(W, H))` to ensure consistent screenshot layouts across environments.
|
|
56
63
|
|
|
57
64
|
> [!IMPORTANT]
|
|
58
65
|
> Always use `pytest-asyncio` with the `@pytest.mark.asyncio` decorator for Textual tests. The boilerplate provided in `app.run_test()` handles the event loop lifecycle for you.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Regenerate TUI screenshots for documentation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use this workflow to update the SVG screenshots of the Ruff-Sync TUI when the user interface, theme, or major features change.
|
|
6
|
+
|
|
7
|
+
### 1. Regenerate Screenshots
|
|
8
|
+
// turbo
|
|
9
|
+
1. Run the automated screenshot generation task:
|
|
10
|
+
```bash
|
|
11
|
+
uv run invoke screenshots
|
|
12
|
+
```
|
|
13
|
+
*This script launches the TUI headlessly using Textual's testing harness and captures key views to `docs/assets/screenshots/`.*
|
|
14
|
+
|
|
15
|
+
### 2. Verify Output
|
|
16
|
+
1. Check the `docs/assets/screenshots/` directory for updated `.svg` files:
|
|
17
|
+
- `dashboard.svg`
|
|
18
|
+
- `rule_details.svg`
|
|
19
|
+
- `search_omnibox.svg`
|
|
20
|
+
- `legend_help.svg`
|
|
21
|
+
2. Ensure the screenshots correctly reflect the current state of the application.
|
|
22
|
+
|
|
23
|
+
### 3. Update Documentation (Optional)
|
|
24
|
+
1. If new views were added or filenames changed, update the relevant markdown files in `docs/` or `mkdocs.yml`.
|
|
25
|
+
|
|
26
|
+
### 4. Commit Changes
|
|
27
|
+
1. Stage and commit the updated assets:
|
|
28
|
+
```bash
|
|
29
|
+
git add docs/assets/screenshots/*.svg
|
|
30
|
+
git commit -m "docs: update TUI screenshots"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### Adding a New Screenshot View
|
|
36
|
+
|
|
37
|
+
To add a new view to the automated screenshot rotation:
|
|
38
|
+
|
|
39
|
+
1. **Modify the Script**: Edit `scripts/generate_tui_screenshots.py`.
|
|
40
|
+
2. **Add Navigation**: Use `pilot` commands within the `async with app.run_test()` block:
|
|
41
|
+
```python
|
|
42
|
+
# Navigate to the new view
|
|
43
|
+
await pilot.press("control+f") # Example: Open a specific dialog
|
|
44
|
+
await pilot.pause(0.2) # Give the UI time to animate
|
|
45
|
+
```
|
|
46
|
+
3. **Capture the Screen**:
|
|
47
|
+
```python
|
|
48
|
+
path = SCREENSHOTS_DIR / "my_new_view.svg"
|
|
49
|
+
app.save_screenshot(str(path))
|
|
50
|
+
```
|
|
51
|
+
4. **Update Documentation**: Add the new SVG to the relevant Markdown file or `mkdocs.yml`.
|
|
52
|
+
5. **Regenerate**: Run `uv run invoke screenshots` to verify the new capture works as expected.
|
|
@@ -175,14 +175,17 @@ jobs:
|
|
|
175
175
|
- name: Install dependencies
|
|
176
176
|
run: uv sync --group docs --frozen
|
|
177
177
|
|
|
178
|
+
- name: Fetch gh-pages branch
|
|
179
|
+
# mike needs the gh-pages branch history to make incremental commits.
|
|
180
|
+
# Without fetching it first, mike may reset the entire branch.
|
|
181
|
+
run: git fetch origin gh-pages --depth=1 || true
|
|
182
|
+
|
|
178
183
|
- name: Deploy documentation
|
|
179
184
|
run: |
|
|
180
185
|
# Configure git
|
|
181
186
|
git config user.name "github-actions[bot]"
|
|
182
187
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
183
188
|
|
|
184
|
-
# mike deploy handles gh-pages initialization automatically
|
|
185
|
-
|
|
186
189
|
# Extract version from pyproject.toml in a TOML-aware way using already installed dependencies
|
|
187
190
|
VERSION=$(uv run python - << 'PY'
|
|
188
191
|
import pathlib
|
|
@@ -205,17 +208,11 @@ jobs:
|
|
|
205
208
|
|
|
206
209
|
if [[ "$VERSION" == *".dev"* ]]; then
|
|
207
210
|
echo "Deploying DEV documentation..."
|
|
208
|
-
# Ensure 'stable' exists in versions.json so the switcher doesn't disappear.
|
|
209
|
-
# 'mike alias' will create it if missing, pointing to the current stable root.
|
|
210
|
-
# We use --push to ensure versions.json is updated on gh-pages.
|
|
211
|
-
uv run mike alias --push stable stable || true
|
|
212
211
|
uv run mike deploy --push --update-aliases dev
|
|
213
212
|
else
|
|
214
213
|
echo "Deploying STABLE documentation..."
|
|
215
|
-
uv run mike deploy --push --update-aliases $VERSION stable
|
|
214
|
+
uv run mike deploy --push --update-aliases "$VERSION" stable
|
|
216
215
|
uv run mike set-default --push stable
|
|
217
|
-
# Also update dev to match stable on a full release
|
|
218
|
-
uv run mike deploy --push --update-aliases dev
|
|
219
216
|
fi
|
|
220
217
|
|
|
221
218
|
publish:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ruff-sync
|
|
3
|
-
Version: 0.1.5.
|
|
3
|
+
Version: 0.1.5.dev6
|
|
4
4
|
Summary: Synchronize Ruff linter configuration across projects
|
|
5
5
|
Project-URL: Homepage, https://github.com/Kilo59/ruff-sync
|
|
6
6
|
Project-URL: Documentation, https://kilo59.github.io/ruff-sync/
|
|
Binary file
|
|
Binary file
|