pyforce-rosie 2.0.0__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 (129) hide show
  1. pyforce_rosie-2.0.0/.dockerignore +15 -0
  2. pyforce_rosie-2.0.0/.env.test +1 -0
  3. pyforce_rosie-2.0.0/.git-blame-ignore-revs +3 -0
  4. pyforce_rosie-2.0.0/.github/workflows/qa.yml +15 -0
  5. pyforce_rosie-2.0.0/.github/workflows/release.yml +43 -0
  6. pyforce_rosie-2.0.0/.gitignore +223 -0
  7. pyforce_rosie-2.0.0/.pre-commit-config.yaml +23 -0
  8. pyforce_rosie-2.0.0/.python-version +1 -0
  9. pyforce_rosie-2.0.0/.readthedocs.yaml +23 -0
  10. pyforce_rosie-2.0.0/AGENTS.md +47 -0
  11. pyforce_rosie-2.0.0/CODEOWNERS +1 -0
  12. pyforce_rosie-2.0.0/DEVELOPMENT.md +390 -0
  13. pyforce_rosie-2.0.0/Dockerfile +69 -0
  14. pyforce_rosie-2.0.0/LICENSE +21 -0
  15. pyforce_rosie-2.0.0/Makefile +66 -0
  16. pyforce_rosie-2.0.0/PKG-INFO +166 -0
  17. pyforce_rosie-2.0.0/README.md +142 -0
  18. pyforce_rosie-2.0.0/assets/logo.svg +4 -0
  19. pyforce_rosie-2.0.0/docker/nginx.conf +47 -0
  20. pyforce_rosie-2.0.0/docker/run.sh +27 -0
  21. pyforce_rosie-2.0.0/docs/about.md +25 -0
  22. pyforce_rosie-2.0.0/docs/client.md +87 -0
  23. pyforce_rosie-2.0.0/docs/getting-started.md +136 -0
  24. pyforce_rosie-2.0.0/docs/how-rosie-works.md +121 -0
  25. pyforce_rosie-2.0.0/docs/images/logo.svg +4 -0
  26. pyforce_rosie-2.0.0/docs/images/webrosie.png +0 -0
  27. pyforce_rosie-2.0.0/docs/index.md +43 -0
  28. pyforce_rosie-2.0.0/docs/integration.md +88 -0
  29. pyforce_rosie-2.0.0/docs/javascripts/mathjax.js +19 -0
  30. pyforce_rosie-2.0.0/docs/motion-control.md +240 -0
  31. pyforce_rosie-2.0.0/docs/navigation.md +109 -0
  32. pyforce_rosie-2.0.0/docs/reference.md +3 -0
  33. pyforce_rosie-2.0.0/docs/robots.md +161 -0
  34. pyforce_rosie-2.0.0/docs/teaching.md +80 -0
  35. pyforce_rosie-2.0.0/pyproject.toml +158 -0
  36. pyforce_rosie-2.0.0/scripts/convert_map.py +69 -0
  37. pyforce_rosie-2.0.0/scripts/create_remote.py +230 -0
  38. pyforce_rosie-2.0.0/scripts/worktree.sh +225 -0
  39. pyforce_rosie-2.0.0/src/rosie/__init__.py +1 -0
  40. pyforce_rosie-2.0.0/src/rosie/__main__.py +17 -0
  41. pyforce_rosie-2.0.0/src/rosie/apis/__init__.py +0 -0
  42. pyforce_rosie-2.0.0/src/rosie/apis/models.py +11 -0
  43. pyforce_rosie-2.0.0/src/rosie/apis/web/__init__.py +0 -0
  44. pyforce_rosie-2.0.0/src/rosie/apis/web/models.py +57 -0
  45. pyforce_rosie-2.0.0/src/rosie/apis/web/routes.py +228 -0
  46. pyforce_rosie-2.0.0/src/rosie/apis/web/server.py +59 -0
  47. pyforce_rosie-2.0.0/src/rosie/builtin/maps/house.geojson +23 -0
  48. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/blubot/profile.toml +40 -0
  49. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/blubot/thumbnail.png +0 -0
  50. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/blubot/vector.svg +177 -0
  51. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/kevin/profile.toml +39 -0
  52. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/kevin/thumbnail.png +0 -0
  53. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/kevin/vector.svg +253 -0
  54. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/ltl/profile.toml +42 -0
  55. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/ltl/thumbnail.png +0 -0
  56. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/ltl/vector.svg +217 -0
  57. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/rovert/profile.toml +40 -0
  58. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/rovert/thumbnail.png +0 -0
  59. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/rovert/vector.svg +115 -0
  60. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/simubot/profile.toml +32 -0
  61. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/simubot/thumbnail.png +0 -0
  62. pyforce_rosie-2.0.0/src/rosie/builtin/profiles/simubot/vector.svg +232 -0
  63. pyforce_rosie-2.0.0/src/rosie/cli.py +96 -0
  64. pyforce_rosie-2.0.0/src/rosie/client/__init__.py +16 -0
  65. pyforce_rosie-2.0.0/src/rosie/client/api.py +183 -0
  66. pyforce_rosie-2.0.0/src/rosie/client/models.py +22 -0
  67. pyforce_rosie-2.0.0/src/rosie/control/__init__.py +0 -0
  68. pyforce_rosie-2.0.0/src/rosie/control/models.py +72 -0
  69. pyforce_rosie-2.0.0/src/rosie/control/movement.py +136 -0
  70. pyforce_rosie-2.0.0/src/rosie/control/regulation.py +34 -0
  71. pyforce_rosie-2.0.0/src/rosie/control/teleoperation.py +28 -0
  72. pyforce_rosie-2.0.0/src/rosie/control/tracking.py +42 -0
  73. pyforce_rosie-2.0.0/src/rosie/core.py +216 -0
  74. pyforce_rosie-2.0.0/src/rosie/errors.py +19 -0
  75. pyforce_rosie-2.0.0/src/rosie/hardware/__init__.py +0 -0
  76. pyforce_rosie-2.0.0/src/rosie/hardware/buses.py +37 -0
  77. pyforce_rosie-2.0.0/src/rosie/hardware/drive/__init__.py +19 -0
  78. pyforce_rosie-2.0.0/src/rosie/hardware/drive/devices/__init__.py +0 -0
  79. pyforce_rosie-2.0.0/src/rosie/hardware/drive/devices/arduino.py +96 -0
  80. pyforce_rosie-2.0.0/src/rosie/hardware/drive/devices/md25.py +157 -0
  81. pyforce_rosie-2.0.0/src/rosie/hardware/drive/devices/virtual.py +69 -0
  82. pyforce_rosie-2.0.0/src/rosie/hardware/drive/kinematics.py +12 -0
  83. pyforce_rosie-2.0.0/src/rosie/hardware/drive/models.py +63 -0
  84. pyforce_rosie-2.0.0/src/rosie/hardware/drive/pid.py +22 -0
  85. pyforce_rosie-2.0.0/src/rosie/hardware/models.py +19 -0
  86. pyforce_rosie-2.0.0/src/rosie/hardware/sensors/__init__.py +19 -0
  87. pyforce_rosie-2.0.0/src/rosie/hardware/sensors/models.py +12 -0
  88. pyforce_rosie-2.0.0/src/rosie/hardware/sensors/usound.py +207 -0
  89. pyforce_rosie-2.0.0/src/rosie/localization/__init__.py +0 -0
  90. pyforce_rosie-2.0.0/src/rosie/localization/odometry.py +40 -0
  91. pyforce_rosie-2.0.0/src/rosie/models.py +144 -0
  92. pyforce_rosie-2.0.0/src/rosie/planning/__init__.py +0 -0
  93. pyforce_rosie-2.0.0/src/rosie/planning/models.py +36 -0
  94. pyforce_rosie-2.0.0/src/rosie/planning/path.py +25 -0
  95. pyforce_rosie-2.0.0/src/rosie/planning/search.py +47 -0
  96. pyforce_rosie-2.0.0/src/rosie/planning/trajectory.py +156 -0
  97. pyforce_rosie-2.0.0/src/rosie/planning/visibility.py +68 -0
  98. pyforce_rosie-2.0.0/src/rosie/profile.py +91 -0
  99. pyforce_rosie-2.0.0/src/rosie/py.typed +0 -0
  100. pyforce_rosie-2.0.0/src/rosie/recording.py +102 -0
  101. pyforce_rosie-2.0.0/src/rosie/robot.py +51 -0
  102. pyforce_rosie-2.0.0/src/rosie/service.py +86 -0
  103. pyforce_rosie-2.0.0/src/rosie/world/__init__.py +0 -0
  104. pyforce_rosie-2.0.0/src/rosie/world/maps.py +69 -0
  105. pyforce_rosie-2.0.0/src/rosie/world/models.py +16 -0
  106. pyforce_rosie-2.0.0/tests/apis/web/test_routes.py +181 -0
  107. pyforce_rosie-2.0.0/tests/client/test_api.py +142 -0
  108. pyforce_rosie-2.0.0/tests/conftest.py +108 -0
  109. pyforce_rosie-2.0.0/tests/control/test_movement.py +76 -0
  110. pyforce_rosie-2.0.0/tests/control/test_regulation.py +9 -0
  111. pyforce_rosie-2.0.0/tests/control/test_teleoperation.py +26 -0
  112. pyforce_rosie-2.0.0/tests/hardware/drive/devices/test_arduino.py +71 -0
  113. pyforce_rosie-2.0.0/tests/hardware/drive/devices/test_md25.py +90 -0
  114. pyforce_rosie-2.0.0/tests/hardware/drive/devices/test_virtual.py +26 -0
  115. pyforce_rosie-2.0.0/tests/hardware/drive/test_kinematics.py +18 -0
  116. pyforce_rosie-2.0.0/tests/hardware/drive/test_pid.py +29 -0
  117. pyforce_rosie-2.0.0/tests/hardware/sensors/test_usound.py +139 -0
  118. pyforce_rosie-2.0.0/tests/hardware/test_buses.py +55 -0
  119. pyforce_rosie-2.0.0/tests/planning/test_path.py +66 -0
  120. pyforce_rosie-2.0.0/tests/planning/test_trajectory.py +45 -0
  121. pyforce_rosie-2.0.0/tests/test_cli.py +113 -0
  122. pyforce_rosie-2.0.0/tests/test_core.py +207 -0
  123. pyforce_rosie-2.0.0/tests/test_main.py +19 -0
  124. pyforce_rosie-2.0.0/tests/test_profile.py +88 -0
  125. pyforce_rosie-2.0.0/tests/test_robot.py +164 -0
  126. pyforce_rosie-2.0.0/tests/test_service.py +141 -0
  127. pyforce_rosie-2.0.0/tests/world/test_maps.py +81 -0
  128. pyforce_rosie-2.0.0/uv.lock +1974 -0
  129. pyforce_rosie-2.0.0/zensical.toml +83 -0
@@ -0,0 +1,15 @@
1
+ .venv
2
+ .uv
3
+ .pytest_cache
4
+ .mypy_cache
5
+ .ruff_cache
6
+ __pycache__
7
+ dist
8
+ build
9
+ .git
10
+ .cookie-pyrate
11
+ .env
12
+ .env.test
13
+ tests
14
+ docs
15
+ site
@@ -0,0 +1 @@
1
+ # Environment for the test suite (pytest-env loads it before collection)
@@ -0,0 +1,3 @@
1
+ # Formatting-only commits: `git blame` skips them
2
+ # (git config blame.ignoreRevsFile .git-blame-ignore-revs; GitHub does it by itself)
3
+ a80a0490e6bdef9040f868d24e9fe5dc4a9650d5 # Format the code with ruff format
@@ -0,0 +1,15 @@
1
+ name: QA
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ qa:
10
+ uses: gvieralopez/cookie-pyrate/.github/workflows/reusable-qa.yml@v1.1.0
11
+ with:
12
+ cookie-pyrate-ref: v1.1.0
13
+ python-version: "3.15"
14
+ # the client runs on users' own Pythons; the robot's image uses 3.15
15
+ test-python-versions: '["3.12", "3.13", "3.14", "3.15"]'
@@ -0,0 +1,43 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: ["QA"]
6
+ branches: [main]
7
+ types: [completed]
8
+
9
+ concurrency:
10
+ group: release
11
+ cancel-in-progress: false
12
+
13
+ jobs:
14
+ release:
15
+ if: github.event.workflow_run.conclusion == 'success'
16
+ uses: gvieralopez/cookie-pyrate/.github/workflows/reusable-release.yml@v1.1.0
17
+ permissions:
18
+ contents: write
19
+ packages: write
20
+ with:
21
+ cookie-pyrate-ref: v1.1.0
22
+ create-github-release: true
23
+ attach-distribution: false
24
+ # ghcr.io/pyforce/rosie, with WebRosie (the release in the Dockerfile's WEBROSIE_VERSION)
25
+ publish-docker-image: true
26
+ prepare-next-version: true
27
+ secrets:
28
+ # Created by `make repo`; lets the version bumps land on a protected main.
29
+ RELEASE_SSH_KEY: ${{ secrets.RELEASE_SSH_KEY }}
30
+
31
+ pypi:
32
+ needs: release
33
+ runs-on: ubuntu-latest
34
+ environment:
35
+ name: pypi
36
+ url: https://pypi.org/project/pyforce-rosie/
37
+ permissions:
38
+ contents: read
39
+ id-token: write
40
+ steps:
41
+ - uses: gvieralopez/cookie-pyrate/.github/actions/publish-to-pypi@v1.1.0
42
+ with:
43
+ sha: ${{ needs.release.outputs.sha }}
@@ -0,0 +1,223 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock is intentionally committed for reproducible environments.
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ .vscode/
203
+
204
+ # Ruff stuff:
205
+ .ruff_cache/
206
+
207
+ # PyPI configuration file
208
+ .pypirc
209
+
210
+ # Marimo
211
+ marimo/_static/
212
+ marimo/_lsp/
213
+ __marimo__/
214
+
215
+ # Streamlit
216
+ .streamlit/secrets.toml
217
+
218
+ # Checkout of the shared Cookie Pyrate actions, made by the CI workflows in the
219
+ # workspace root. It is a separate repository and is linted where it lives.
220
+ .cookie-pyrate/
221
+
222
+ # rosie
223
+ recordings/
@@ -0,0 +1,23 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: lint
5
+ name: Ruff Lint
6
+ entry: make lint
7
+ language: system
8
+ types: [python]
9
+ pass_filenames: false
10
+
11
+ - id: format
12
+ name: Ruff Format
13
+ entry: make format
14
+ language: system
15
+ types: [python]
16
+ pass_filenames: false
17
+
18
+ - id: typecheck
19
+ name: Mypy Typecheck
20
+ entry: make typecheck
21
+ language: system
22
+ types: [python]
23
+ pass_filenames: false
@@ -0,0 +1 @@
1
+ 3.15
@@ -0,0 +1,23 @@
1
+ # Read the Docs builds the documentation with Zensical, from the locked docs group.
2
+ version: 2
3
+
4
+ build:
5
+ os: ubuntu-26.04
6
+ tools:
7
+ # Read the Docs may not offer the project's Python yet; uv installs it from .python-version.
8
+ python: "latest"
9
+ jobs:
10
+ pre_create_environment:
11
+ - asdf plugin add uv
12
+ - asdf install uv latest
13
+ - asdf global uv latest
14
+ create_environment:
15
+ - uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
16
+ install:
17
+ - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --no-default-groups --group docs
18
+ build:
19
+ html:
20
+ - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv run --no-sync zensical build --clean
21
+ post_build:
22
+ - mkdir -p "${READTHEDOCS_OUTPUT}/html"
23
+ - cp -r dist/docs/. "${READTHEDOCS_OUTPUT}/html/"
@@ -0,0 +1,47 @@
1
+ # rosie
2
+
3
+ Modular robot control system
4
+
5
+ Style, conventions and tooling for this project.
6
+
7
+ ## Layout
8
+
9
+ 1. `src/rosie/{models,errors,__main__}.py`; sub-domains as sub-packages (e.g. `motion/`).
10
+ 2. Data structures live in `models.py`, error types in `errors.py`, unless the framework in use recommends a different file structure.
11
+ 3. Order functions top-down — callers before callees, private helpers (`_name`) last — so the most important read first.
12
+ 4. Do not write docstrings or descriptive comments unless the user asks for them or they provide context that cannot be inferred by reading the code.
13
+
14
+ ## Design
15
+
16
+ 1. Prefer immutable dataclasses for plain data: `@dataclass(frozen=True)` (add `slots=True` when it fits).
17
+ 2. Where a framework owns the type — ORM entities, pydantic models, settings objects — follow its idiom instead of forcing a dataclass.
18
+ 3. Avoid default arguments in functions.
19
+ 4. If a function takes a bool that drives an `if`, prefer splitting into two functions (one delegating to the other, or factoring out shared logic when it saves ≥2 LoC).
20
+
21
+ ## Hygiene
22
+
23
+ 1. No commented-out code.
24
+ 2. Every `# noqa` must specify a rule code, e.g. `# noqa: E501` and should be avoided unless the user asks for it.
25
+ 3. Serialise JSON with `indent=2`.
26
+ 4. Wrap any disk I/O in `TemporaryDirectory()` and operate via `Path` objects.
27
+
28
+ ## Python
29
+
30
+ 1. Always use f-strings, `pathlib`, and idiomatic constructs.
31
+ 2. Avoid `open()` for reading or writing — use `Path.read_text()` / `Path.write_text()` / `Path.read_bytes()` / `Path.write_bytes()` (ruff `PTH`).
32
+ 3. Never use `print` outside `scripts/`. Use `logger = logging.getLogger(__name__)` at module level (ruff `T20`).
33
+ 4. Annotate everything; mypy runs with `disallow_untyped_defs = true`. Use modern typing (`list[...]`, `dict[...]`, `X | None`, `collections.abc.MutableMapping`, etc.).
34
+
35
+ ## Tests
36
+
37
+ 1. Function-based pytest with `@pytest.mark.parametrize`. No test classes.
38
+ 2. The test tree mirrors the package tree: a module at `validation/rules.py` is tested by `tests/validation/test_rules.py`.
39
+ 3. Shared fixtures, env dicts and fixture-path constants live in `tests/conftest.py`. Test data under `tests/data/` or `tests/fixtures/`.
40
+ 4. `.env.test` holds the suite's baseline environment; `pytest-env` loads it before collection. Override a single variable in a single test with `monkeypatch.setenv` / `monkeypatch.delenv` — never assign to `os.environ` directly, so nothing leaks between tests.
41
+ 5. Don't lower the `--cov-fail-under` threshold configured in `pyproject.toml`; add tests instead.
42
+
43
+ ## Tooling
44
+
45
+ 1. Use **ruff + mypy + pytest** with **uv**.
46
+ 2. Standard QA invocation: `make qa` — it covers lint, format, type checks and tests. `make test` runs the suite on its own.
47
+ 3. Never call `python3` directly in agent scripts; use `uv run` so inline script metadata can declare dependencies.
@@ -0,0 +1 @@
1
+ * @gvieralopez @rolurq @frndmg @alxrcs @nilox94