Contributing#
How to setup the repository#
Warning
All internal tools and scripts are designed only to work on Linux. You have to use WSL to develop the project on Windows.
Install Just
Just is a command runner that is used here instead of
make
.Install all needed python interpreters
CPython 3.8
CPython 3.9
CPython 3.10
CPython 3.11
CPython 3.12
PyPy 3.8
PyPy 3.9
PyPy 3.10
Clone repository with submodules
git clone --recurse-submodules https://github.com/reagento/adaptix
If you already cloned the project and forgot
--recurse-submodules
, directorybenchmarks/release_data
will be empty. You can fix it executinggit submodule update --init --recursive
.Create venv and run
just bootstrap
Run main commands to check that everything is ok
just lint just test-all
Tools overview#
Venv managing#
Bootstrap#
Initial preparation of venv and repo for developing.
just bootstrap
Deps sync#
Sync all dependencies. Need to run if committed dependencies are changed.
just venv-sync
Compile dependencies#
Compile raw dependencies (requirements/raw/*
)
into file with locked versions via pip-tools.
just deps-compile
By default, pip-tools
try keep previous locked version. To upgrade locked dependencies use:
just deps-compile-upgrade
Linting#
Run linters#
Run all linters. Should be executed before tests.
just lint
Testing#
Run basic tests#
Sequentially run basic tests on all python versions. It is useful to rapidly check that the code is working.
just test
Run all tests#
Parallelly run all tests on all python versions.
just test-all
Run all tests (sequentially)#
Sequentially run all tests on all python versions. Failed parallel runs can have unclear output.
just test-all-seq
Produce coverage report#
Create coverage report. All coverage reports will be merged into coverage.xml
file at working directory.
You can import it to IDE. Instruction for
PyCharm.
just cov
Documentation#
Build documentation#
Generate html files with documentation. Output files will be placed in docs-build/html
.
just doc
Clean generated documentation#
Clean generated documentation and build cache. Sometimes sphinx can not detect changes in non-rst files. This command fixes it.
just doc-clean