Advanced development environment¶
See System dependencies for base system requirements.
See getting-started for installation instructions.
This is not mandatory unless you’re actively contributing to the project.
$ pre-commit install
pip-tools uses the
.in files in
requirements/ as input to generate the
.pip files we rely on to install
If you need to add or modify a dependency, do it in the
.in files and commit them. The pre-commit hook will compile the
.pip files and warn you.
You can also generate the
.pip files manually from the
.in files without commiting them beforehand. For example, if you modified
pip-compile requirements/install.in --output-file requirements/install.pip
Optmizing performances with Cython¶
Some dependencies have an optional compilation support for Cython resulting in better performances (mostly XML harvesting). To enable it, you need to install Cython before all other dependencies:
$ pip install Cython $ pip install -r requirements/develop.pip $ pip install -e .
Macos Big Sur caveat¶
brew install openssl export LDFLAGS="-Lfirstname.lastname@example.org/lib" export CPPFLAGS="-Iemail@example.com/include" pip install -r requirements/develop.pip
brew install libjpeg pip install -r requirements/develop.pip
You should be to start using and contributing to udata.
Running the project¶
You can use invoke to launch the application services (you might want to have each one runnning in a terminal):
$ inv serve # Start the development server $ inv work # Start a worker process $ inv beat # Start a scheduler process $ inv assets-watch # Continously watch and build assets $ inv widgets-watch # Continously watch and build widgets $ inv oembed-watch # Continously watch and build oembed
Most of the common tasks are scripted in the
tasks.py file (which is using invoke).
You can get the documentation related to all tasks with:
$ inv -l
# Update dependencies $ inv update # Update dependencies and migrate data $ inv update -m
It’s advised to update your dependencies when you pull upstream changes or switch branch:
# Update dependencies, migrate data, recompile translations... $ inv update -m i18nc
Now check out our advanced documentation for a focus on some specific tasks. You may want to be able to run the tests to for a backend contribution, maybe create a full theme or simply provide some fixes to the translations or the documentation.