ruff-sync 0.1.0.dev0__tar.gz → 0.1.0.dev2__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.0.dev2/.agents/skills/mkdocs-generation/SKILL.md +125 -0
- ruff_sync-0.1.0.dev2/.agents/skills/mkdocs-generation/examples.md +223 -0
- ruff_sync-0.1.0.dev2/.agents/skills/mkdocs-generation/templates/api-reference.md +33 -0
- ruff_sync-0.1.0.dev2/.agents/skills/mkdocs-generation/templates/getting-started.md +46 -0
- ruff_sync-0.1.0.dev2/.agents/skills/mkdocs-generation/templates/index.md +32 -0
- ruff_sync-0.1.0.dev2/.agents/skills/mkdocs-generation/templates/mkdocs.yml +59 -0
- ruff_sync-0.1.0.dev2/.agents/skills/release-notes-generation/SKILL.md +82 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.pre-commit-config.yaml +2 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/AGENTS.md +1 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/PKG-INFO +13 -8
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/README.md +11 -6
- ruff_sync-0.1.0.dev2/docs/ci-integration.md +106 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/docs/configuration.md +13 -1
- ruff_sync-0.1.0.dev2/docs/index.md +56 -0
- ruff_sync-0.1.0.dev2/docs/installation.md +64 -0
- ruff_sync-0.1.0.dev2/docs/troubleshooting.md +46 -0
- ruff_sync-0.1.0.dev2/docs/usage.md +100 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/mkdocs.yml +16 -4
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/pyproject.toml +2 -2
- ruff_sync-0.1.0.dev2/skills-lock.json +10 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/src/ruff_sync/__init__.py +7 -3
- ruff_sync-0.1.0.dev2/src/ruff_sync/cli.py +426 -0
- ruff_sync-0.1.0.dev0/src/ruff_sync/cli.py → ruff_sync-0.1.0.dev2/src/ruff_sync/core.py +192 -418
- ruff_sync-0.1.0.dev2/tests/lifecycle_tomls/multi_upstream_final.toml +8 -0
- ruff_sync-0.1.0.dev2/tests/lifecycle_tomls/multi_upstream_initial.toml +7 -0
- ruff_sync-0.1.0.dev2/tests/lifecycle_tomls/multi_upstream_up1.toml +5 -0
- ruff_sync-0.1.0.dev2/tests/lifecycle_tomls/multi_upstream_up2.toml +5 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_basic.py +190 -99
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_check.py +65 -6
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_deprecation.py +1 -1
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_e2e.py +51 -6
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_scaffold.py +6 -6
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/uv.lock +1 -1
- ruff_sync-0.1.0.dev0/docs/ci-integration.md +0 -59
- ruff_sync-0.1.0.dev0/docs/index.md +0 -40
- ruff_sync-0.1.0.dev0/docs/installation.md +0 -47
- ruff_sync-0.1.0.dev0/docs/usage.md +0 -75
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.agents/TESTING.md +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.agents/workflows/add-test-case.md +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.git-blame-ignore-revs +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.github/dependabot.yml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.github/workflows/ci.yaml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.github/workflows/complexity.yaml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.github/workflows/docs.yaml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/.gitignore +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/LICENSE.md +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/codecov.yml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/configs/fastapi/ruff.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/configs/kitchen-sink/ruff.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2/docs/assets}/ruff_sync_banner.png +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/docs/gen_ref_pages.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/scripts/check_dogfood.sh +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/scripts/gitclone_dogfood.sh +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/scripts/pull_dogfood.sh +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/src/ruff_sync/__main__.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tasks.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/__init__.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/conftest.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_changes_final.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_changes_initial.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_changes_upstream.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_dotted_keys_final.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_dotted_keys_initial.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_dotted_keys_upstream.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_ruff_cfg_final.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_ruff_cfg_initial.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/no_ruff_cfg_upstream.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/readme_excludes_final.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/readme_excludes_initial.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/readme_excludes_upstream.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/standard_final.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/standard_initial.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/lifecycle_tomls/standard_upstream.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/ruff.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_config_validation.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_corner_cases.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_git_fetch.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_project.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_toml_operations.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_url_handling.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/test_whitespace.py +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/w_ruff_sync_cfg/pyproject.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/tests/wo_ruff_cfg/pyproject.toml +0 -0
- {ruff_sync-0.1.0.dev0 → ruff_sync-0.1.0.dev2}/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
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-notes-generation
|
|
3
|
+
description: Draft professional and categorized release notes for ruff-sync using GitHub CLI, git history, and the `invoke release` task.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Release Notes Generation
|
|
7
|
+
|
|
8
|
+
This skill guides you through drafting high-quality release notes for `ruff-sync`. It leverages the `invoke release` task and GitHub CLI for context.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
- **GitHub CLI (`gh`)**: Must be authenticated.
|
|
13
|
+
- **Invoke**: Dev tasks are defined in `tasks.py`.
|
|
14
|
+
- **Git**: Recent history and tags must be available.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### 1. Gather Context
|
|
19
|
+
|
|
20
|
+
Before drafting, understand what has changed since the last release.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Get the latest release tag and notes
|
|
24
|
+
gh release list --limit 1
|
|
25
|
+
gh release view <tag>
|
|
26
|
+
|
|
27
|
+
# List merged PRs since the last tag
|
|
28
|
+
# Replace <tag> with the tag found above
|
|
29
|
+
gh pr list --state merged --search "merged:><tag-date>"
|
|
30
|
+
|
|
31
|
+
# Or simple git log
|
|
32
|
+
git log <tag>..HEAD --oneline
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. Create Draft Release
|
|
36
|
+
|
|
37
|
+
Use the project's built-in release task to scaffold the release. This task automatically tags the release based on the version in `pyproject.toml` and uses GitHub's `--generate-notes` feature to create a starting point.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Create a draft release (default behavior of invoke release)
|
|
41
|
+
uv run invoke release --draft --skip-tests
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
> [!NOTE]
|
|
45
|
+
> `invoke release` will:
|
|
46
|
+
> 1. Check if you are on `main`.
|
|
47
|
+
> 2. Check for clean git state.
|
|
48
|
+
> 3. Create a GitHub Release with `--generate-notes`.
|
|
49
|
+
|
|
50
|
+
### 3. Refine Release Notes
|
|
51
|
+
|
|
52
|
+
GitHub's automatically generated notes are a good start but often lack professional categorization and narrative. Use the following structure for final refinement:
|
|
53
|
+
|
|
54
|
+
#### Categorization
|
|
55
|
+
- **🚀 Features**: New capabilities added to `ruff_sync`.
|
|
56
|
+
- **🐞 Bug Fixes**: Issues resolved in CLI, merging logic, or HTTP handling.
|
|
57
|
+
- **✨ Improvements**: Enhancements to existing features, performance, or logging.
|
|
58
|
+
- **📖 Documentation**: Updates to `README.md`, `docs/`, or docstrings.
|
|
59
|
+
- **🛠️ Maintenance**: Dependency updates, CI changes, or test refactoring.
|
|
60
|
+
|
|
61
|
+
#### Writing Style
|
|
62
|
+
- Use clear, action-oriented language (e.g., "Add support...", "Fix issue where...", "Refactor...").
|
|
63
|
+
- Link to PRs and contributors using their GitHub handles.
|
|
64
|
+
- Include a "Breaking Changes" section if applicable (use `[!WARNING]` alerts).
|
|
65
|
+
|
|
66
|
+
### 4. Finalize
|
|
67
|
+
|
|
68
|
+
Once the notes are drafted and refined, you can view the draft on GitHub or update it via CLI.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# View the draft notes
|
|
72
|
+
gh release view v<version>
|
|
73
|
+
|
|
74
|
+
# Edit the draft (opens your editor)
|
|
75
|
+
gh release edit v<version> --notes "your new notes"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Tips
|
|
79
|
+
|
|
80
|
+
- **Consistency**: Refer to the `AGENTS.md` for project-specific terminology (e.g., "Upstream Layers").
|
|
81
|
+
- **Screenshots**: If the release includes significantly visible changes (e.g., new logging or CLI output formats), consider embedding a screenshot or recording in the notes.
|
|
82
|
+
- **Automated Summary**: You can ask the AI assistant to "Draft release notes based on the git log since <tag>" to get a structured summary before applying it to the release.
|
|
@@ -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:
|
|
@@ -150,6 +150,7 @@ uv run coverage run -m pytest -vv
|
|
|
150
150
|
- Use `pathlib` over `os.path` (enforced by `PTH` rules).
|
|
151
151
|
- Prefer f-strings for logging (we ignore `G004`).
|
|
152
152
|
- Do not create custom exception classes for simple errors (`TRY003` is ignored).
|
|
153
|
+
- **Prefer `NamedTuple` for return types** over plain tuples to improve readability and type safety.
|
|
153
154
|
|
|
154
155
|
### TOML Handling
|
|
155
156
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ruff-sync
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev2
|
|
4
4
|
Summary: Synchronize Ruff linter configuration across projects
|
|
5
5
|
Project-URL: Homepage, https://github.com/Kilo59/ruff-sync
|
|
6
|
-
Project-URL: Documentation, https://github.
|
|
6
|
+
Project-URL: Documentation, https://kilo59.github.io/ruff-sync/
|
|
7
7
|
Project-URL: Repository, https://github.com/Kilo59/ruff-sync
|
|
8
8
|
Project-URL: Issues, https://github.com/Kilo59/ruff-sync/issues
|
|
9
9
|
Project-URL: Changelog, https://github.com/Kilo59/ruff-sync/releases
|
|
@@ -30,7 +30,7 @@ Requires-Dist: typing-extensions>=4.5.0
|
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
|
-
<img src="https://raw.githubusercontent.com/Kilo59/ruff-sync/main/ruff_sync_banner.png" alt="ruff-sync banner" style="max-width: 600px; width: 100%; height: auto; margin-bottom: 1rem;">
|
|
33
|
+
<img src="https://raw.githubusercontent.com/Kilo59/ruff-sync/main/docs/assets/ruff_sync_banner.png" alt="ruff-sync banner" style="max-width: 600px; width: 100%; height: auto; margin-bottom: 1rem;">
|
|
34
34
|
<br>
|
|
35
35
|
<a href="https://pypi.org/project/ruff-sync/"><img src="https://img.shields.io/pypi/v/ruff-sync" alt="PyPI version"></a>
|
|
36
36
|
<a href="https://codecov.io/gh/Kilo59/ruff-sync"><img src="https://codecov.io/gh/Kilo59/ruff-sync/graph/badge.svg?token=kMZw0XtoFW" alt="codecov"></a>
|
|
@@ -163,6 +163,7 @@ Run `ruff-sync --help` for full details on all available options.
|
|
|
163
163
|
## Key Features
|
|
164
164
|
|
|
165
165
|
- 🏗️ **Format-preserving merges** — Uses [tomlkit](https://github.com/sdispater/tomlkit) under the hood, so your comments, whitespace, and TOML structure are preserved. No reformatting surprises.
|
|
166
|
+
- 📂 **Upstream Layers** — Merge configurations from several sources sequentially (e.g., base company config + team-specific overrides).
|
|
166
167
|
- 🌐 **GitHub & GitLab URL support** — Automatically converts GitHub/GitLab repository URLs, tree (directory) URLs, or blob (file) URLs to raw content URLs.
|
|
167
168
|
- 🔍 **Smart configuration discovery** — Point at a directory and `ruff-sync` will automatically find your config. It checks `pyproject.toml`, `ruff.toml`, and `.ruff.toml` (in that order).
|
|
168
169
|
- 📥 **Git clone support** — If the URL starts with `git@` or uses the `ssh://`, `git://`, or `git+ssh://` schemes, `ruff-sync` will perform an efficient shallow clone (using `--filter=blob:none` and `--no-checkout`) to safely extract the configuration with minimal network traffic.
|
|
@@ -200,8 +201,9 @@ Here are all the possible values that can be provided in `[tool.ruff-sync]` alon
|
|
|
200
201
|
|
|
201
202
|
```toml
|
|
202
203
|
[tool.ruff-sync]
|
|
203
|
-
# The source of truth URL for your Ruff configuration. (Required, unless passed via CLI)
|
|
204
|
-
|
|
204
|
+
# The source of truth URL(s) for your Ruff configuration. (Required, unless passed via CLI)
|
|
205
|
+
# Accepts a single string URL or a list of URLs.
|
|
206
|
+
upstream = ["https://github.com/my-org/standards", "https://github.com/my-org/team-tweaks"]
|
|
205
207
|
|
|
206
208
|
# A list of config keys to exclude from being synced. (Default: ["lint.per-file-ignores"])
|
|
207
209
|
# Use simple names for top-level keys, and dotted paths for nested keys.
|
|
@@ -329,10 +331,13 @@ When you run `ruff-sync check`, it follows this process to determine if your pro
|
|
|
329
331
|
```mermaid
|
|
330
332
|
flowchart TD
|
|
331
333
|
Start([Start]) --> Local[Read Local Configuration]
|
|
332
|
-
Local -->
|
|
333
|
-
|
|
334
|
+
Local --> Upstreams{For each Upstream}
|
|
335
|
+
Upstreams --> Download[Download/Clone Configuration]
|
|
336
|
+
Download --> Extract[Extract section if needed]
|
|
334
337
|
Extract --> Exclude[Apply Exclusions]
|
|
335
|
-
Exclude --> Merge[
|
|
338
|
+
Exclude --> Merge[Merge into in-memory Doc]
|
|
339
|
+
Merge --> Upstreams
|
|
340
|
+
Upstreams -- Done --> Comparison
|
|
336
341
|
|
|
337
342
|
subgraph Comparison [Comparison Logic]
|
|
338
343
|
direction TB
|