We use uv as our dependency manager and packager.
- Install
uv. We recommend referring to the documentations on installing uv. In short, you just need to run:
curl -LsSf https://astral.sh/uv/install.sh | sh-
Clone the project and navigate to the root directory
-
Install the project with all dependencies:
make installTo make it easier to track code style errors, we recommend installing the ruff extension for your IDE. For example, for VSCode:
https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff
With this extension, code style errors will be underlined directly in the editor.
A .vscode/settings.json file has been added to the project root, which points the extension to the linter configuration.
-
Create a branch for your work. To make it easier for others to understand the nature of your contribution, use brief but clear names. We recommend starting branch names with
feat/for new features,fix/for bug fixes,refactor/for refactoring, andtest/for adding tests. -
Commit, commit, commit, commit
-
If there are new features, it's advisable to add tests for them in the tests directory.
-
You can open a PR!
Every commit in any PR triggers github actions with automated tests. All checks block merging into the main branch (with rare exceptions).
Sometimes waiting for CI can be long, and sometimes it's more convenient to run individual tests:
- Check that your changes don't break existing features
make testOr run a specific test (using test_bert.py as an example):
uv run pytest tests/modules/scoring/test_bert.py- Check code style (it also applies formatter)
make lint- Check type hints:
make typingNote: If mypy shows different errors locally compared to github actions, you should update your local dependencies:
make installBut it still doesn't guarantee that the local type checker will give the same errors as CI. This is because CI is configured to check on Python 3.10 and your local python version is probably the latest one.
Build the HTML version in the docs/build folder:
make docsBuild the HTML version and host it locally:
make serve-docsUse this checklist when cutting a new package release (for example 0.3.0). Documentation is published to deeppavlov.github.io/AutoIntent via GitHub Pages; a published GitHub Release triggers the multi-version build and deploy.
- Align versions across
pyproject.toml,docs/source/conf.py(release), andCHANGELOG.md. - Update prose under
docs/source/(.rstfiles). - Update tutorials in the repo-root
user_guides/directory — not underdocs/source/user_guides/, which is generated at build time and gitignored. - Run doctests (same as CI on PRs and pushes to
dev):make test-docs
- Build HTML locally and fix any errors:
Optional preview:
make docs
If the build is stale or autoapi / tutorial links look wrong:make serve-docs
make clean-docs make docs
- Match CI dependencies when tutorials or API pages fail on missing imports:
Pandoc is required for nbsphinx (CI installs it via
uv sync --group docs --extra catboost --extra peft --extra transformers --extra sentence-transformers --extra openai
apt). - Regenerate the optimizer JSON schema if
OptimizerConfigor related Pydantic models changed:make schema
docs/build/docs/source/autoapi/docs/source/user_guides/(symlinks and notebook run artifacts)**/__pycache__/
docs/_static/versions.json is auto-generated on every Sphinx build from git tags matching vX.Y.Z (see docs/source/docs_utils/versions_generator.py). Do not hand-edit it for a release. Until the vX.Y.Z tag exists, local builds will still list the previous tag as stable — that is expected.
- Merge documentation and code changes into
dev(CI runsmake test-docsandmake docs). - Create a git tag
vX.Y.Zon the release commit (must matchv+ semver, for examplev0.3.0). - Publish a GitHub Release for that tag. This triggers:
- PyPI publish (
.github/workflows/release.yaml) - Multi-version docs build and deploy (
.github/workflows/build-docs.yaml→make multi-version-docs→ GitHub Pages under/versions/).
- PyPI publish (
- Verify the live site: the version switcher shows the new release as stable, and
https://deeppavlov.github.io/AutoIntent/versions/vX.Y.Z/loads.
To dry-run the multi-version build locally (requires full git history and tags):
make multi-version-docs