Skip to content
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

Add dependency locking #34

Open
edmondop opened this issue Jul 16, 2023 · 3 comments
Open

Add dependency locking #34

edmondop opened this issue Jul 16, 2023 · 3 comments
Assignees

Comments

@edmondop
Copy link
Contributor

edmondop commented Jul 16, 2023

The current setup with a single requirements.txt files do not provide version for dependencies. This works in the short term, but in the longer term when things stop working it would be really complicated to know what version of each dependency we were using.

The best practice should be to commit a lock file under version control, such as a pipenv.lock. However, we could also take the opportunities to move to poetry, which is more popular (25 k stars vs 4.7k stars compared to hatch), and a better support from tools in the ecosystem (mypy, flake8, etC)

@arjunbansal
Copy link
Contributor

This sgtm.
Tagging @nqn for any thoughts.

@nqn
Copy link
Contributor

nqn commented Aug 4, 2023

@edmondop With your poetry update, this should be fixed right?

@edmondop
Copy link
Contributor Author

edmondop commented Aug 4, 2023

@edmondop With your poetry update, this should be fixed right?

That's correct. There is a poetry.lock under version control .

If you check the pyproject.toml, for example, the declared version for langchain is here https://github.com/log10-io/log10/blob/main/pyproject.toml#L31 and says: "anything including or above 0.0.242"

but the last time I performed an install and locked the dependencies, exactly 0.0.242 was installed (there was probably any newer). The poetry.lock is under version control, and shows this piece of information:

https://github.com/log10-io/log10/blob/main/poetry.lock#L994C1-L1004C2

So, whe you do a poetry install, the versions of the libraries are taken from the poetry.lock and not the pyproject.toml to ensure reproducibility over time, but you can update versions locally for development poetry install --upgrade I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants