bramw_baserow/backend/requirements
Bram Wiepjes 495b840952 Generate formula with AI initial 2024-05-02 14:37:53 +00:00
..
README.md Resolve "Bump backend deps" 2023-04-13 08:16:07 +00:00
base.in Generate formula with AI initial 2024-05-02 14:37:53 +00:00
base.txt Generate formula with AI initial 2024-05-02 14:37:53 +00:00
dev.in Django 4.1 2024-01-24 02:19:14 +00:00
dev.txt AI field 2024-04-02 19:50:44 +00:00

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

  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.