-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ttx_diff] Use pip-compile and requirements.in #1090
base: main
Are you sure you want to change the base?
Conversation
This is a more consistent way of ensuring we have pinned our python dependencies.
- `pip install -r resources/scripts/requirements.txt` | ||
- `pip freeze > resources/scripts/constraints.txt` | ||
- install pip-tools with `python -m pip install pip-tools` | ||
- delete `resources/scripts/requirements.txt` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to delete it as it will be overwritten, but it's ok
python pacakges we are comparing against; to ensure this we use `pip-compile` | ||
(part of [`pip-tools`]) to generate a pinned `requirements.txt` from a | ||
`requirements.in` file in the root `resources/scripts` directory. To update the | ||
set of python packages in use, you need to update this file: | ||
|
||
- `rm -rf` your existing venv | ||
- create a new venv and activate it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one doesn't need to delete and create a new venv when using pip-compile, it may well run from a global site-packages (e.g. I install it globally with pipx install pip-tools
) as pip-compile does not modify its environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
installing something in a venv is generally good practice especially when developing onto something, in this case we are simply using a development tool and it's not a requirement that it runs within a venv, so I don't think you should mention this here
This is a more consistent way of ensuring we have pinned our python dependencies.