2017-05-12 02:30:38 +02:00
|
|
|
The dependency graph of the requirements is as follows:
|
|
|
|
|
|
|
|
```
|
2020-04-18 01:45:40 +02:00
|
|
|
dev +-> prod +-> common
|
|
|
|
+
|
|
|
|
|
|
2017-05-12 02:30:38 +02:00
|
|
|
v
|
2022-09-08 02:44:58 +02:00
|
|
|
docs,pip
|
2017-05-12 02:30:38 +02:00
|
|
|
```
|
|
|
|
|
2022-09-08 02:44:58 +02:00
|
|
|
Of the files, only dev and prod have been used in the install
|
2017-08-09 09:45:00 +02:00
|
|
|
scripts directly. The rest are implicit dependencies.
|
2017-05-12 02:30:38 +02:00
|
|
|
|
2024-07-04 14:17:19 +02:00
|
|
|
Steps to update a lock file, e.g., to update ipython from 5.3.0 to latest version:
|
2021-08-20 23:37:38 +02:00
|
|
|
|
2021-03-03 22:40:57 +01:00
|
|
|
0. Remove entry for `ipython==5.3.0` in dev.txt.
|
2020-03-18 13:51:22 +01:00
|
|
|
1. Run `./tools/update-locked-requirements`, which will generate new entries, pinned to the latest version.
|
2017-08-30 00:45:33 +02:00
|
|
|
2. Increase `PROVISION_VERSION` in `version.py`.
|
2018-05-26 00:30:38 +02:00
|
|
|
3. Run `./tools/provision` to install the new deps and test them.
|
2017-08-30 00:45:33 +02:00
|
|
|
4. Commit your changes.
|
2023-03-21 12:11:48 +01:00
|
|
|
|
|
|
|
## Testing custom modifications of a dependency
|
|
|
|
|
|
|
|
When working on Zulip, sometimes it is necessary to also make
|
|
|
|
modifications to a dependency (either to add a feature that we will
|
|
|
|
rely on, or to fix a bug that needs to be fixed for the intended
|
|
|
|
changes to work in Zulip) - with the idea that eventually they will be
|
|
|
|
merged upstream and included in an official release.
|
|
|
|
|
|
|
|
That process can take time however, and sometimes it'd be good to be
|
|
|
|
able to create and test your Zulip changes on top of changes to the
|
|
|
|
upstream package, without waiting for the potentially lengthy code
|
|
|
|
review and release process of the upstream dependency.
|
|
|
|
|
|
|
|
You can do this forking the upstream project, making the changes on a
|
|
|
|
branch in your fork, and then replacing the package's entry in
|
|
|
|
`dev.in` or `prod.in` with an appropriate GitHub link to the branch
|
|
|
|
with your modifications. The files have various examples of how this
|
|
|
|
should be done, but essentially you will add an entry looking like
|
|
|
|
this:
|
|
|
|
|
|
|
|
```
|
|
|
|
https://github.com/<your GitHub>/<package name>/archive/<commit hash>.zip#egg=<package name>==<version>+git
|
|
|
|
```
|
|
|
|
|
|
|
|
After that, you can follow the above process involving
|
|
|
|
`./tools/update-locked-requirements` and the following steps to have
|
|
|
|
the modified package installed in your dev environment, where it can
|
|
|
|
be used for testing.
|