mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-02-06 13:50:10 +00:00
48 lines
2 KiB
Markdown
48 lines
2 KiB
Markdown
# Readme
|
|
|
|
We use [pip-tools](https://github.com/jazzband/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`](../Dockerfile)
|
|
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`](../Dockerfile)
|
|
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`
|
|
4. 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.
|