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

Revise and split requirements files #340

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Conversation

marbre
Copy link
Collaborator

@marbre marbre commented Oct 26, 2024

Moves dependencies defined in the root requirements.txt to sharktank/ and splits out test only deps to requirements-tests.txt file. Dependencies only used for development / in the CI are moved to requirements-dev.txt and the root requirements file is now used to pull in all the deps. Furthermore, some no longer used dependencies are removed.

@marbre marbre force-pushed the requirements branch 7 times, most recently from 99ea7b9 to 6d3d0a3 Compare October 26, 2024 02:19
Moves dependencies defined in the root `requirements.txt` to
`sharktank/` and splits out test only deps to `requirements-tests.txt`
file. Dependencies only used for development / in the CI are moved to
`requirements-dev.txt` and the root requirements file is now used to
pull in all the deps. Furthermore, some no longer used dependencies
are removed.
@marbre marbre requested a review from ScottTodd October 28, 2024 10:48
@marbre marbre marked this pull request as ready for review October 28, 2024 10:48
@marbre
Copy link
Collaborator Author

marbre commented Oct 28, 2024

This will need some further work but hopefully is the right step to untangle all the deps.

Comment on lines 101 to -102
f"pytest{get_version_spec('pytest')}",
f"pytest-xdist{get_version_spec('pytest-xdist')}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why drop pytest-xdist from here? It's useful for running tests. I'm not sure what the best practices are for testing deps in extras_require, but I could see an argument for this being minimal (just pytest).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest-xdist isn't used, as pytest -n is only called in the CI. Thus I would rather go with the minimal requirements instead of pulling in non-strictly required packages.

Comment on lines +1 to +4
-r sharktank/requirements.txt
-r sharktank/requirements-tests.txt
-r shortfin/requirements-tests.txt
-r requirements-dev.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting... top level requirements that pulls in all the others. That seems like a good idea. I hope it works out in practice :P

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our CI says yes ;) Well I hope to get rid off it at some point to be honest but this would mean to refactor the CI at the same time whereas this relaxes the required changes a little and let us iterate more easily.

@marbre marbre enabled auto-merge (squash) October 28, 2024 18:32
@marbre marbre merged commit f925a5b into nod-ai:main Oct 28, 2024
3 checks passed
@marbre marbre deleted the requirements branch October 28, 2024 18:44
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

Successfully merging this pull request may close these issues.

2 participants