ruff-sync 0.0.5.dev2__tar.gz → 0.1.0.dev1__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.
Files changed (76) hide show
  1. ruff_sync-0.1.0.dev1/.agents/skills/mkdocs-generation/SKILL.md +125 -0
  2. ruff_sync-0.1.0.dev1/.agents/skills/mkdocs-generation/examples.md +223 -0
  3. ruff_sync-0.1.0.dev1/.agents/skills/mkdocs-generation/templates/api-reference.md +33 -0
  4. ruff_sync-0.1.0.dev1/.agents/skills/mkdocs-generation/templates/getting-started.md +46 -0
  5. ruff_sync-0.1.0.dev1/.agents/skills/mkdocs-generation/templates/index.md +32 -0
  6. ruff_sync-0.1.0.dev1/.agents/skills/mkdocs-generation/templates/mkdocs.yml +59 -0
  7. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/.github/workflows/ci.yaml +21 -4
  8. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/.github/workflows/complexity.yaml +4 -5
  9. ruff_sync-0.1.0.dev1/.github/workflows/docs.yaml +32 -0
  10. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/.pre-commit-config.yaml +2 -0
  11. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/AGENTS.md +15 -12
  12. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/PKG-INFO +42 -12
  13. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/README.md +40 -10
  14. ruff_sync-0.1.0.dev1/docs/ci-integration.md +106 -0
  15. ruff_sync-0.1.0.dev1/docs/configuration.md +64 -0
  16. ruff_sync-0.1.0.dev1/docs/gen_ref_pages.py +34 -0
  17. ruff_sync-0.1.0.dev1/docs/index.md +55 -0
  18. ruff_sync-0.1.0.dev1/docs/installation.md +64 -0
  19. ruff_sync-0.1.0.dev1/docs/troubleshooting.md +46 -0
  20. ruff_sync-0.1.0.dev1/docs/usage.md +98 -0
  21. ruff_sync-0.1.0.dev1/mkdocs.yml +112 -0
  22. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/pyproject.toml +55 -7
  23. ruff_sync-0.1.0.dev1/skills-lock.json +10 -0
  24. ruff_sync-0.1.0.dev1/src/ruff_sync/__init__.py +48 -0
  25. ruff_sync-0.1.0.dev1/src/ruff_sync/__main__.py +10 -0
  26. ruff_sync-0.1.0.dev1/src/ruff_sync/cli.py +397 -0
  27. ruff_sync-0.0.5.dev2/ruff_sync.py → ruff_sync-0.1.0.dev1/src/ruff_sync/core.py +290 -426
  28. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tasks.py +16 -6
  29. ruff_sync-0.1.0.dev1/tests/__init__.py +1 -0
  30. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_basic.py +71 -33
  31. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_config_validation.py +2 -1
  32. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_deprecation.py +4 -2
  33. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_e2e.py +3 -2
  34. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_git_fetch.py +7 -4
  35. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_project.py +2 -1
  36. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_url_handling.py +38 -3
  37. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/uv.lock +508 -1
  38. ruff_sync-0.0.5.dev2/tests/__init__.py +0 -0
  39. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/.agents/TESTING.md +0 -0
  40. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/.agents/workflows/add-test-case.md +0 -0
  41. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/.git-blame-ignore-revs +0 -0
  42. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/.github/dependabot.yml +0 -0
  43. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/.gitignore +0 -0
  44. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/LICENSE.md +0 -0
  45. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/codecov.yml +0 -0
  46. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/configs/fastapi/ruff.toml +0 -0
  47. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/configs/kitchen-sink/ruff.toml +0 -0
  48. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1/docs/assets}/ruff_sync_banner.png +0 -0
  49. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/scripts/check_dogfood.sh +0 -0
  50. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/scripts/gitclone_dogfood.sh +0 -0
  51. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/scripts/pull_dogfood.sh +0 -0
  52. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/conftest.py +0 -0
  53. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_changes_final.toml +0 -0
  54. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_changes_initial.toml +0 -0
  55. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_changes_upstream.toml +0 -0
  56. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_dotted_keys_final.toml +0 -0
  57. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_dotted_keys_initial.toml +0 -0
  58. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_dotted_keys_upstream.toml +0 -0
  59. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_ruff_cfg_final.toml +0 -0
  60. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_ruff_cfg_initial.toml +0 -0
  61. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/no_ruff_cfg_upstream.toml +0 -0
  62. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/readme_excludes_final.toml +0 -0
  63. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/readme_excludes_initial.toml +0 -0
  64. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/readme_excludes_upstream.toml +0 -0
  65. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/standard_final.toml +0 -0
  66. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/standard_initial.toml +0 -0
  67. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/lifecycle_tomls/standard_upstream.toml +0 -0
  68. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/ruff.toml +0 -0
  69. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_check.py +0 -0
  70. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_corner_cases.py +0 -0
  71. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_scaffold.py +0 -0
  72. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_toml_operations.py +0 -0
  73. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/test_whitespace.py +0 -0
  74. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/w_ruff_sync_cfg/pyproject.toml +0 -0
  75. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/wo_ruff_cfg/pyproject.toml +0 -0
  76. {ruff_sync-0.0.5.dev2 → ruff_sync-0.1.0.dev1}/tests/wo_ruff_sync_cfg/pyproject.toml +0 -0
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: mkdocs-generation
3
+ description: Generate MkDocs documentation sites with Material theme, mkdocstrings for API docs, and versioning. Use when setting up or extending project documentation.
4
+ ---
5
+
6
+ # MkDocs Documentation Generation
7
+
8
+ Generate professional documentation sites using MkDocs Material theme with automatic API reference generation.
9
+
10
+ ## Stack
11
+
12
+ - **MkDocs**: Static site generator for project documentation
13
+ - **Material Theme**: Modern, responsive theme with navigation features
14
+ - **mkdocstrings**: Auto-generate API docs from Python docstrings
15
+ - **mike**: Version management for documentation
16
+
17
+ ## Dependencies
18
+
19
+ Add to `pyproject.toml` (optional extras group):
20
+
21
+ ```toml
22
+ [project.optional-dependencies]
23
+ docs = [
24
+ "mkdocs>=1.5",
25
+ "mkdocs-material>=9.4",
26
+ "mkdocstrings[python]>=0.24",
27
+ "mike>=2.0",
28
+ ]
29
+ ```
30
+
31
+ Or `requirements.txt`:
32
+
33
+ ```
34
+ mkdocs>=1.5
35
+ mkdocs-material>=9.4
36
+ mkdocstrings[python]>=0.24
37
+ mike>=2.0
38
+ ```
39
+
40
+ ## Directory Structure
41
+
42
+ **Simple (flat)**:
43
+ ```
44
+ docs/
45
+ ├── index.md # Home/overview
46
+ ├── getting-started.md # Installation and quickstart
47
+ ├── configuration.md # Config options
48
+ └── tools.md # Feature reference
49
+ ```
50
+
51
+ **Complex (nested)**:
52
+ ```
53
+ docs/
54
+ ├── index.md
55
+ ├── compatibility.md
56
+ ├── guide/
57
+ │ ├── getting-started.md
58
+ │ ├── cli.md
59
+ │ └── advanced.md
60
+ └── api/
61
+ ├── panel.md # ::: module.Class
62
+ └── entities/
63
+ ├── area.md
64
+ └── zone.md
65
+ ```
66
+
67
+ ## mkdocs.yml Configuration
68
+
69
+ See `templates/mkdocs.yml` for the full configuration template.
70
+
71
+ Key sections:
72
+ 1. **Site metadata**: name, description, URLs
73
+ 2. **Versioning**: mike provider for multi-version docs
74
+ 3. **Theme**: Material with navigation features
75
+ 4. **Plugins**: search + mkdocstrings for API docs
76
+ 5. **Navigation**: Explicit nav structure
77
+
78
+ ## API Reference with mkdocstrings
79
+
80
+ Create minimal markdown files that reference Python modules:
81
+
82
+ ```markdown
83
+ # Panel API
84
+
85
+ ::: mypackage.panel.Panel
86
+
87
+ ::: mypackage.panel.PanelSync
88
+ ```
89
+
90
+ mkdocstrings auto-generates documentation from docstrings. Configure in `mkdocs.yml`:
91
+ - `docstring_style: google` - Use Google-style docstrings
92
+ - `show_source: false` - Hide source code
93
+ - `merge_init_into_class: true` - Combine `__init__` with class docs
94
+ - `filters: ["!^_"]` - Exclude private members
95
+
96
+ ## Commands
97
+
98
+ ```bash
99
+ # Serve locally with hot-reload
100
+ mkdocs serve
101
+
102
+ # Build static site
103
+ mkdocs build
104
+
105
+ # Deploy to GitHub Pages
106
+ mkdocs gh-deploy
107
+
108
+ # Version management (mike)
109
+ mike deploy --push --update-aliases 0.1.0 latest
110
+ mike set-default --push latest
111
+ ```
112
+
113
+ ## Writing Guidelines
114
+
115
+ 1. **index.md**: Brief overview, key features as bullet list, installation snippet, "Where to Next" links
116
+ 2. **getting-started.md**: Prerequisites, step-by-step setup, minimal working example
117
+ 3. **API docs**: Let mkdocstrings generate from docstrings; add brief intro if needed
118
+ 4. **Guides**: Task-oriented, include code examples, link to related API docs
119
+
120
+ ## Templates
121
+
122
+ - `templates/mkdocs.yml` - Configuration file
123
+ - `templates/index.md` - Home page
124
+ - `templates/getting-started.md` - Quickstart guide
125
+ - `templates/api-reference.md` - API doc page using mkdocstrings
@@ -0,0 +1,223 @@
1
+ # MkDocs Generation Examples
2
+
3
+ Real-world patterns from todoist-mcp and pydmp repositories.
4
+
5
+ ## Simple Documentation (todoist-mcp)
6
+
7
+ Flat structure for smaller projects:
8
+
9
+ ```
10
+ docs/
11
+ ├── index.md
12
+ ├── getting-started.md
13
+ ├── configuration.md
14
+ └── tools.md
15
+ ```
16
+
17
+ **mkdocs.yml nav:**
18
+ ```yaml
19
+ nav:
20
+ - Home: index.md
21
+ - Getting Started: getting-started.md
22
+ - Configuration: configuration.md
23
+ - MCP Tools: tools.md
24
+ ```
25
+
26
+ **index.md:**
27
+ ```markdown
28
+ # Todoist MCP Server
29
+
30
+ The Todoist MCP server is a Model Context Protocol (MCP) server for managing Todoist tasks from MCP clients like Claude Desktop.
31
+
32
+ Use this documentation to:
33
+
34
+ - Learn what the server can do
35
+ - Set up Docker-based or local development environments
36
+ - Configure environment variables and Redis caching
37
+ - Explore the available MCP tools for task and project management
38
+ ```
39
+
40
+ ## Complex Documentation (pydmp)
41
+
42
+ Nested structure for larger projects with API reference:
43
+
44
+ ```
45
+ docs/
46
+ ├── index.md
47
+ ├── compatibility.md
48
+ ├── guide/
49
+ │ ├── getting-started.md
50
+ │ ├── cli.md
51
+ │ ├── realtime-status.md
52
+ │ ├── encryption.md
53
+ │ └── migration.md
54
+ └── api/
55
+ ├── panel.md
56
+ ├── protocol.md
57
+ ├── status.md
58
+ ├── entities/
59
+ │ ├── area.md
60
+ │ ├── zone.md
61
+ │ ├── output.md
62
+ │ ├── user.md
63
+ │ └── profile.md
64
+ └── protocol/
65
+ └── encryption.md
66
+ ```
67
+
68
+ **mkdocs.yml nav:**
69
+ ```yaml
70
+ nav:
71
+ - Home: index.md
72
+ - Panel Compatibility: compatibility.md
73
+ - Guide:
74
+ - Getting Started: guide/getting-started.md
75
+ - CLI: guide/cli.md
76
+ - Realtime Status (S3): guide/realtime-status.md
77
+ - Encryption & User Data: guide/encryption.md
78
+ - Migration: guide/migration.md
79
+ - API Reference:
80
+ - Panel: api/panel.md
81
+ - Entities:
82
+ - Area: api/entities/area.md
83
+ - Zone: api/entities/zone.md
84
+ - Output: api/entities/output.md
85
+ - User Code: api/entities/user.md
86
+ - User Profile: api/entities/profile.md
87
+ - Protocol:
88
+ - Protocol: api/protocol.md
89
+ - Encryption: api/protocol/encryption.md
90
+ - Realtime Server: api/status.md
91
+ ```
92
+
93
+ ## Index Page with Code Examples
94
+
95
+ ```markdown
96
+ # PyDMP
97
+
98
+ PyDMP is a platform-agnostic Python library for controlling DMP alarm panels.
99
+
100
+ **Key Features:**
101
+
102
+ - **Dual APIs**: Choose async for modern applications or sync for simple scripts
103
+ - **High-level abstractions**: Work with panels, areas, zones, and outputs
104
+ - **Built-in rate limiting**: Automatic command throttling
105
+
106
+ ## Installation
107
+
108
+ \`\`\`bash
109
+ pip install pydmp
110
+ \`\`\`
111
+
112
+ ## Quick Start (Async)
113
+
114
+ \`\`\`python
115
+ import asyncio
116
+ from pydmp import DMPPanel
117
+
118
+ async def main():
119
+ panel = DMPPanel()
120
+ await panel.connect("192.168.1.100", "00001", "YOURKEY")
121
+ await panel.update_status()
122
+ areas = await panel.get_areas()
123
+ await panel.disconnect()
124
+
125
+ asyncio.run(main())
126
+ \`\`\`
127
+
128
+ ## Where to Next
129
+
130
+ - [Getting Started](guide/getting-started.md) - Installation and connection
131
+ - [CLI Guide](guide/cli.md) - Command-line interface
132
+ - [API Reference](api/panel.md) - Complete API documentation
133
+ ```
134
+
135
+ ## API Reference Page (mkdocstrings)
136
+
137
+ Minimal markdown that generates full API docs:
138
+
139
+ ```markdown
140
+ # Panel API
141
+
142
+ ::: pydmp.panel.DMPPanel
143
+
144
+ ::: pydmp.panel_sync.DMPPanelSync
145
+ ```
146
+
147
+ For entity docs:
148
+
149
+ ```markdown
150
+ # Area
151
+
152
+ ::: pydmp.area.Area
153
+
154
+ ::: pydmp.area.AreaSync
155
+ ```
156
+
157
+ ## CLI Documentation Pattern
158
+
159
+ ```markdown
160
+ # Command-Line Interface (CLI)
161
+
162
+ PyDMP ships with a CLI for common operations.
163
+
164
+ ## Installation
165
+
166
+ \`\`\`bash
167
+ pip install pydmp[cli]
168
+ \`\`\`
169
+
170
+ ## Configuration
171
+
172
+ The CLI expects a YAML config file:
173
+
174
+ \`\`\`yaml
175
+ panel:
176
+ host: 192.168.1.100
177
+ account: "00001"
178
+ remote_key: "YOURKEY"
179
+ \`\`\`
180
+
181
+ ## Commands
182
+
183
+ ### Areas & Zones
184
+ \`\`\`bash
185
+ pydmp get-areas [--json|-j]
186
+ pydmp get-zones [--json|-j]
187
+ \`\`\`
188
+
189
+ ### Arm/Disarm
190
+ \`\`\`bash
191
+ pydmp arm "1,2,3" [--bypass-faulted|-b] [--force-arm|-f]
192
+ pydmp disarm <AREA> [--json|-j]
193
+ \`\`\`
194
+
195
+ ## Examples
196
+
197
+ \`\`\`bash
198
+ # View areas with debug logs
199
+ pydmp --debug get-areas
200
+
201
+ # Arm area 1
202
+ pydmp arm "1" --bypass-faulted
203
+ \`\`\`
204
+ ```
205
+
206
+ ## pyproject.toml Integration
207
+
208
+ ```toml
209
+ [project.optional-dependencies]
210
+ docs = [
211
+ "mkdocs>=1.5",
212
+ "mkdocs-material>=9.4",
213
+ "mkdocstrings[python]>=0.24",
214
+ "mike>=2.0",
215
+ ]
216
+ ```
217
+
218
+ Install and build:
219
+ ```bash
220
+ pip install -e ".[docs]"
221
+ mkdocs serve
222
+ mkdocs build
223
+ ```
@@ -0,0 +1,33 @@
1
+ # API Reference
2
+
3
+ <!--
4
+ mkdocstrings generates API documentation from Python docstrings.
5
+ Use the ::: directive to include a module, class, or function.
6
+
7
+ Syntax:
8
+ ::: package.module.ClassName
9
+ ::: package.module.function_name
10
+
11
+ The plugin reads docstrings and type hints to generate documentation.
12
+ Use Google-style docstrings for best results.
13
+ -->
14
+
15
+ ## [MainClass]
16
+
17
+ ::: [package].[module].[MainClass]
18
+
19
+ ## [SecondaryClass]
20
+
21
+ ::: [package].[module].[SecondaryClass]
22
+
23
+ <!--
24
+ For nested API structure, create subdirectories:
25
+
26
+ docs/api/
27
+ ├── index.md - API overview
28
+ ├── client.md - ::: package.client.Client
29
+ ├── models.md - ::: package.models
30
+ └── entities/
31
+ ├── user.md - ::: package.entities.User
32
+ └── item.md - ::: package.entities.Item
33
+ -->
@@ -0,0 +1,46 @@
1
+ # Getting Started
2
+
3
+ This guide walks through [what the guide covers].
4
+
5
+ ## Prerequisites
6
+
7
+ - Python 3.9+
8
+ - [Other prerequisites]
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install [package-name]
14
+ ```
15
+
16
+ ## Configuration
17
+
18
+ [Explain any required configuration, environment variables, or config files.]
19
+
20
+ ```bash
21
+ # Example: copy and edit config
22
+ cp config.example.yaml config.yaml
23
+ ```
24
+
25
+ ## Basic Usage
26
+
27
+ ### [First Concept/Task]
28
+
29
+ ```python
30
+ from [package] import [Class]
31
+
32
+ # Example code
33
+ obj = [Class]()
34
+ result = obj.method()
35
+ ```
36
+
37
+ ### [Second Concept/Task]
38
+
39
+ ```python
40
+ # Example code for second task
41
+ ```
42
+
43
+ ## Next Steps
44
+
45
+ - [Configuration](configuration.md) - Advanced configuration options
46
+ - [API Reference](api.md) - Full API documentation
@@ -0,0 +1,32 @@
1
+ # [PROJECT_NAME]
2
+
3
+ [One-sentence description of what this project does and who it's for.]
4
+
5
+ **Key Features:**
6
+
7
+ - **[Feature 1]**: [Brief description]
8
+ - **[Feature 2]**: [Brief description]
9
+ - **[Feature 3]**: [Brief description]
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ pip install [package-name]
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```python
20
+ from [package] import [MainClass]
21
+
22
+ # Minimal working example
23
+ client = [MainClass]()
24
+ result = client.do_something()
25
+ print(result)
26
+ ```
27
+
28
+ ## Where to Next
29
+
30
+ - [Getting Started](getting-started.md) - Installation and setup walkthrough
31
+ - [Configuration](configuration.md) - Configuration options
32
+ - [API Reference](api.md) - Complete API documentation
@@ -0,0 +1,59 @@
1
+ # MkDocs Configuration Template
2
+ # Replace placeholders: [SITE_NAME], [DESCRIPTION], [GITHUB_USER], [REPO_NAME], [PACKAGE_NAME]
3
+
4
+ site_name: [SITE_NAME]
5
+ site_description: [DESCRIPTION]
6
+ site_url: https://[GITHUB_USER].github.io/[REPO_NAME]/
7
+ repo_url: https://github.com/[GITHUB_USER]/[REPO_NAME]
8
+ repo_name: [GITHUB_USER]/[REPO_NAME]
9
+
10
+ extra:
11
+ version:
12
+ provider: mike
13
+ default: latest
14
+
15
+ theme:
16
+ name: material
17
+ features:
18
+ - navigation.sections
19
+ - navigation.top
20
+ - content.code.copy
21
+
22
+ plugins:
23
+ - search
24
+ - mkdocstrings:
25
+ default_handler: python
26
+ handlers:
27
+ python:
28
+ options:
29
+ docstring_style: google
30
+ show_source: false
31
+ members_order: source
32
+ show_if_no_docstring: true
33
+ show_signature_annotations: true
34
+ separate_signature: true
35
+ merge_init_into_class: true
36
+ show_root_heading: true
37
+ show_root_full_path: false
38
+ filters:
39
+ - "!^_" # Exclude private members
40
+
41
+ # Simple navigation (flat structure)
42
+ nav:
43
+ - Home: index.md
44
+ - Getting Started: getting-started.md
45
+ - Configuration: configuration.md
46
+ - API Reference: api.md
47
+
48
+ # Complex navigation example (nested structure)
49
+ # nav:
50
+ # - Home: index.md
51
+ # - Guide:
52
+ # - Getting Started: guide/getting-started.md
53
+ # - CLI: guide/cli.md
54
+ # - Advanced: guide/advanced.md
55
+ # - API Reference:
56
+ # - Overview: api/index.md
57
+ # - Core:
58
+ # - Client: api/client.md
59
+ # - Models: api/models.md
@@ -66,8 +66,10 @@ jobs:
66
66
 
67
67
  pre-publish:
68
68
  name: Test package installation
69
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
70
69
  needs: [static-analysis, tests]
70
+ if: >-
71
+ (github.event_name == 'push' && github.ref == 'refs/heads/main') ||
72
+ (github.event_name == 'pull_request' && github.event.pull_request.draft == false)
71
73
  runs-on: ubuntu-latest
72
74
  steps:
73
75
  - name: Checkout
@@ -80,14 +82,29 @@ jobs:
80
82
  run: uv python install 3.10
81
83
 
82
84
  - name: Build package
83
- run: uv build
85
+ run: |
86
+ echo "Building ruff-sync package..."
87
+ uv build
84
88
 
85
- - name: Install and test packaged program
89
+ - name: Install packaged program
86
90
  run: |
91
+ echo "Installing built wheel..."
87
92
  uv tool install $(ls dist/*.whl)
88
- ruff-sync --version
93
+ echo "Version: $(ruff-sync --version)"
94
+
95
+ - name: Test package installation (Pull)
96
+ run: |
97
+ echo "Testing ruff-sync pull against Kilo59/ruff-sync..."
89
98
  ruff-sync https://github.com/Kilo59/ruff-sync
99
+
100
+ - name: Test package installation (Check)
101
+ run: |
102
+ echo "Testing ruff-sync check against Kilo59/ruff-sync..."
90
103
  ruff-sync check https://github.com/Kilo59/ruff-sync
104
+
105
+ - name: Verify semantic check failure
106
+ run: |
107
+ echo "Verifying that --semantic check fails for kitchen-sink config (expected failure)..."
91
108
  ! ruff-sync check --semantic https://github.com/Kilo59/ruff-sync --path configs/kitchen-sink
92
109
 
93
110
  publish:
@@ -28,11 +28,10 @@ jobs:
28
28
  DIFF=$(wily diff ruff_sync.py tasks.py tests/ --no-detail -r origin/${{ github.event.pull_request.base.ref }})
29
29
  echo "$DIFF"
30
30
 
31
- # Build multine output
32
- DIFF="${DIFF//'%'/'%25'}"
33
- DIFF="${DIFF//$'\n'/'%0A'}"
34
- DIFF="${DIFF//$'\r'/'%0D'}"
35
- echo "diff=$DIFF" >> "$GITHUB_OUTPUT"
31
+ # Build multiline output
32
+ echo "diff<<DIFF_EOF" >> "$GITHUB_OUTPUT"
33
+ echo "$DIFF" >> "$GITHUB_OUTPUT"
34
+ echo "DIFF_EOF" >> "$GITHUB_OUTPUT"
36
35
  - name: Add Wily PR Comment
37
36
  uses: marocchino/sticky-pull-request-comment@v2
38
37
  if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.number && steps.wily.outputs.diff != ''
@@ -0,0 +1,32 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ deploy:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v5
22
+ with:
23
+ enable-cache: true
24
+
25
+ - name: Set up Python
26
+ run: uv python install
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --all-extras --dev --group docs
30
+
31
+ - name: Build and deploy documentation
32
+ run: uv run mkdocs gh-deploy --force
@@ -6,6 +6,7 @@ repos:
6
6
  - id: check-json
7
7
  - id: check-yaml
8
8
  args: ["--unsafe"]
9
+ exclude: .agents/skills/mkdocs-generation/templates/mkdocs.yml
9
10
  - id: end-of-file-fixer
10
11
  - id: trailing-whitespace
11
12
  - id: no-commit-to-branch
@@ -21,6 +22,7 @@ repos:
21
22
  hooks:
22
23
  - id: prettier
23
24
  types_or: [yaml, json]
25
+ exclude: .agents/skills/mkdocs-generation/templates/mkdocs.yml
24
26
  - repo: https://github.com/rhysd/actionlint
25
27
  rev: v1.7.11
26
28
  hooks:
@@ -5,7 +5,7 @@
5
5
  **ruff-sync** is a CLI tool that synchronizes [Ruff](https://docs.astral.sh/ruff/) linter configuration across multiple Python projects. It downloads an upstream `pyproject.toml`, extracts the `[tool.ruff]` section, and merges it into a local project's `pyproject.toml` while preserving formatting, comments, and whitespace.
6
6
 
7
7
  - **GitHub Repository**: [`Kilo59/ruff-sync`](https://github.com/Kilo59/ruff-sync)
8
- - The entire application lives in a single module: `ruff_sync.py`.
8
+ - The application uses a `src` layout in `src/ruff_sync/`.
9
9
  - Dev tasks are defined in `tasks.py` using [Invoke](https://www.pyinvoke.org/).
10
10
 
11
11
  ## GitHub Context
@@ -54,11 +54,14 @@ gh label list # See available labels
54
54
 
55
55
  ## Project Structure
56
56
 
57
- ```
57
+ ```text
58
58
  .agents/ # Agent-specific instructions (Deep Standards)
59
59
  TESTING.md # Mandatory testing patterns and rules
60
60
  workflows/ # Step-by-step guides for common tasks
61
- ruff_sync.py # The entire application — CLI, merging logic, HTTP
61
+ src/ruff_sync/ # The application source
62
+ __init__.py # Public API
63
+ cli.py # CLI, merging logic, HTTP
64
+ __main__.py # -m support
62
65
  tasks.py # Invoke tasks: lint, fmt, type-check, deps, new-case
63
66
  pyproject.toml # Project config, dependencies, ruff/mypy settings
64
67
  tests/
@@ -114,7 +117,7 @@ uv run mypy .
114
117
  ```
115
118
 
116
119
  - mypy is configured in strict mode with `python_version = "3.10"`.
117
- - It checks `ruff_sync.py`, `tests/`, and `tasks.py`.
120
+ - It checks `src/`, `tests/`, and `tasks.py`.
118
121
  - Tests have relaxed rules: `type-arg` and `no-untyped-def` are disabled for `tests.*`.
119
122
  - `tomlkit` returns complex union types — use `cast(Any, ...)` in tests when indexing parsed TOML documents to satisfy mypy without verbose type narrowing.
120
123
 
@@ -130,7 +133,7 @@ Or with coverage:
130
133
  uv run coverage run -m pytest -vv
131
134
  ```
132
135
 
133
- - Coverage is tracked for `ruff_sync.py` only.
136
+ - Coverage is tracked for `src/ruff_sync/` only.
134
137
  - Tests use `respx` to mock HTTP calls and `pyfakefs` for filesystem mocking.
135
138
  - `pytest-asyncio` is in **strict** mode — async tests need the `@pytest.mark.asyncio` decorator.
136
139
 
@@ -165,13 +168,13 @@ uv run coverage run -m pytest -vv
165
168
 
166
169
  Defined in `tasks.py`. **ALWAYS** run these through uv: `uv run invoke <task>`
167
170
 
168
- | Task | Alias | Description |
169
- | ------------ | ------------ | ----------------------------------- |
170
- | `lint` | | Lint with ruff (auto-fixes by default) |
171
- | `fmt` | | Format with ruff format |
172
- | `type-check` | `types` | Type-check with mypy |
173
- | `deps` | `sync` | Sync dependencies with uv |
174
- | `new-case` | `new-lifecycle-tomls` | Scaffold lifecycle TOML fixtures (See [Workflow](.agents/workflows/add-test-case.md)) |
171
+ | Task | Alias | Description |
172
+ | ------------ | --------------------- | -------------------------------------- |
173
+ | `lint` | | Lint with ruff (auto-fixes by default) |
174
+ | `fmt` | | Format with ruff format |
175
+ | `type-check` | `types` | Type-check with mypy |
176
+ | `deps` | `sync` | Sync dependencies with uv |
177
+ | `new-case` | `new-lifecycle-tomls` | Scaffold lifecycle TOML fixtures |
175
178
 
176
179
  ## CI
177
180