1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-07-21 14:41:48 +00:00
bramw_baserow/backend/requirements
2024-06-25 11:35:04 +00:00
..
base.in Introduce Celery Flower 2024-06-25 11:35:04 +00:00
base.txt Introduce Celery Flower 2024-06-25 11:35:04 +00:00
dev.in Django 4.2 2024-06-17 09:00:48 +00:00
dev.txt Django 4.2 2024-06-17 09:00:48 +00:00
README.md Resolve "Bump backend deps" 2023-04-13 08:16:07 +00:00

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

  1. Add a line to base.in containing your new dependency
  2. In the backend lint tab opened by running ./dev.sh --build, or an active virtual environment with pip-tools installed.
  3. Ensure you are using python 3.9 if not using ./dev.sh --build
  4. cd requirements
  5. 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

  1. Add a line to dev.in containing your new dependency
  2. In the backend lint tab opened by running ./dev.sh --build, or an active virtual environment with pip-tools installed.
  3. Ensure you are using python 3.9 if not using ./dev.sh --build
  4. cd requirements
  5. 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

  1. Change the version in the corresponding .in file.
  2. Follow from step 2 above depending on which .in file you edited.