- Code lives in
src/yads/; tests mirror modules undertests/withtest_<behavior>names. Specs sit inspec/; docs and executable examples live indocs/src/. CI helpers are underci/. - Do not edit generated doc blocks directly; example sources are in
docs/src/examples/and are injected into Markdown via markers.
- Use Python 3.10+ with
uv; never callpython/pipdirectly. Install dev deps and hooks withmake install(frozen lock) ormake install-all(all extras). - Run commands through
makeoruv run --group dev <cmd>;uv sync --group devupdates the env,uv sync --all-groupspulls every optional extra when needed. - Typical cycle:
make lint,make format,make test,make test-cov,make build.make helplists all targets. - Use
uvx ruff check src/ tests/ ci/anduvx ruff format src/ tests/ ci/(wired intomake lint/format). Type check locally withuv run --group dev pyright src/.
- Follow PEP 8 with a 90-character limit. Maintain strict typing (Pyright
strict); preferTypedDict,Protocol, and dataclasses over raw dicts. Fix all type errors and missing imports. - Add Google-style docstrings for any user-facing function/class/module; keep internal helpers self-documenting. Use explicit imports for
spec/typesto avoid collisions. - When adding code snipets as examples in Google-style docstrings, use the code in backticks so they are renderd as code blocks.
- Keep code deterministic and semantics-preserving per the design philosophy; surface explicit warnings/errors for lossy conversions.
- Add or update tests alongside code changes. Use
make testfor the suite andmake test-covwhen touching schema logic or converters. - Optional dependency matrices: run
make test-dependency DEP=<name> VER=<x.y.z>(ormake test-dependency-all) for compatibility changes. Runmake test-integration DIALECT=<spark|duckdb>(ormake test-integration-all) when touching SQL converters. - Clean artifacts with
make clean(ormake clean-all) if needed.
- Public behavior changes require docs updates in
docs/orspec/; leaveREADME.mdalone unless explicitly asked. - Executable examples live in
docs/src/examples/asExampleDefinitionobjects. Markdown uses<!-- BEGIN:example <id> <slug> -->/<!-- END:... -->blocks; treat them as generated. - Refresh snippets with
make sync-examples FILE=<path>ormake sync-examples-all. Do not hand-edit generated code/output blocks; adjust example definitions instead.
- Validate specs before merging:
uv run --group dev check-jsonschema --schema spec/yads_spec_latest.json <file>. - Keep optional dependency support aligned with
pyproject.tomlversion ranges; add new groups viauv addand update CI matrices/configs when extending compatibility.
- Branch from
main(e.g.,feature/<topic>orfix/<issue>); rebase frequently and avoid merge commits. One focused change per branch. - Use Conventional Commit-style PR titles/messages (
feat:,fix:,docs:). Run lint/tests before pushing; ensure CI parity with the commands above. - Do not commit secrets or credentials. Keep TODOs tied to an issue reference.
- CI runs pytest across Python 3.10–3.14; Pyright runs on 3.10. Dependency and integration workflows use Docker and matrices from
ci/dependency-tests/versions.jsonandci/integration-tests/config.json. Match local runs to these when relevant.