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

CI check to validate compatibility of requirements #2410

Open
kamil-certat opened this issue Sep 20, 2023 · 4 comments
Open

CI check to validate compatibility of requirements #2410

kamil-certat opened this issue Sep 20, 2023 · 4 comments

Comments

@kamil-certat
Copy link
Contributor

Some bots have incompatible dependency requirements. It should be possible to write a CI check that tries to resolve all required dependency together and fail if it's not possible.

@gethvi
Copy link
Contributor

gethvi commented Sep 20, 2023

I have this in my makefile for this (using pip-compile from pip-tools package):

requirements-all:
	rm intelmq/bots/collectors/blueliv/REQUIREMENTS.txt
	pip-compile --quiet setup.py intelmq/bots/*/*/REQUIREMENTS.txt --output-file requirements-all.txt
	git restore intelmq/bots/collectors/blueliv/REQUIREMENTS.txt

requirements-dev:
	pip-compile --extra=dev setup.py --output-file=requirements-dev.txt

The problem with blueliv collector is that it's requirements of requests package has upper boundry requests>=2.4.0,<= 2.5.1.

@kamil-certat
Copy link
Contributor Author

Hah, I thought exactly about using pip-compile ;)

@gethvi
Copy link
Contributor

gethvi commented Sep 20, 2023

It's also useful for building docker image as it is much faster (from my experience) to compile requirements and just run pip install -r requirements.txt only once. :)

@kamil-certat
Copy link
Contributor Author

It is, the pip needs to resolve dependencies only once - and with very specific versions. This process take some time.

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

No branches or pull requests

2 participants