mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-23 08:07:35 +00:00
.. | ||
base.in | ||
base.txt | ||
dev.in | ||
dev.txt | ||
README.md |
Readme
We use pip-tools to manage our pip requirement files.
Base Requirements
base.in
contains our non-dev requirements for our backend python environment and
base.txt
is the corresponding pip requirements file generated by pip-tools
:
pip-compile --output-file=base.txt base.in
We install the base.txt
requirements into the baserow/backend
docker image. You can launch an environment using these images by running
./dev.sh local restart --build
.
Dev Requirements
dev.in
contains our extra dev requirements on-top of base.in
.
dev.txt
is the corresponding pip requirements file generated by pip-tools
:
pip-compile --output-file=dev.txt dev.in
We install the dev.txt
requirements into the baserow/backend
docker image when built using the dev target (docker build ... --target dev
). This
dev backend image is the one used when running ./dev.sh restart --build
etc.
Common Operations
Add a new base dependency
- Add a line to
base.in
containing your new dependency - In the
backend lint
tab opened by running./dev.sh --build
, or an active virtual environment withpip-tools
installed. - Ensure you are using python 3.9 if not using
./dev.sh --build
cd requirements
- Run
pip-compile --output-file=base.txt base.in
, review the changes to base.txt, commit and push them to your MR.
Add a new dev dependency
- Add a line to
dev.in
containing your new dependency - In the
backend lint
tab opened by running./dev.sh --build
, or an active virtual environment withpip-tools
installed. - Ensure you are using python 3.9 if not using
./dev.sh --build
cd requirements
- Run
pip-compile --output-file=dev.txt dev.in
, review the changes to dev.txt, commit and push them to your MR.
Upgrade an existing dependency
- Change the version in the corresponding
.in
file. - Follow from step 2 above depending on which
.in
file you edited.