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

Use pip-compile-multi option --autoresolve #106

Merged
merged 10 commits into from
Nov 24, 2023
Merged

Use pip-compile-multi option --autoresolve #106

merged 10 commits into from
Nov 24, 2023

Conversation

nvaytet
Copy link
Member

@nvaytet nvaytet commented Nov 23, 2023

We use the --autoresolve option of pip-compile-multi to make sure we don't run into conflicts across multiple txt files.

According to the docs:

This feature works only if your project has a single requirements file, that references (directly or indirectly) all other files.

So I added the all.in file.

TBH, I don't really understand why this is needed, I thought the whole point of pip-compile-multi was to make sure that the versions were the same for all envs, but anyway.

@nvaytet
Copy link
Member Author

nvaytet commented Nov 23, 2023

It seems that virtualenv now supports platformdirs4 (see pypa/virtualenv#2664), so it now resolves fine without pinning to <3.

The issue with prompt-toolkit remains, but gets resolved by --autoresolve.

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment about the purpose of this file? We should communicate that nobody should make an env from it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe that all.in file should actually be generated from the list of files in the requirements folder?

Copy link
Member

Choose a reason for hiding this comment

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

Good point!

# NO ENVIRONMENT SHOULD BE CREATED FROM THIS FILE.
#
# We want to use the --autoresolve option of pip-compile-multi to make sure we do not run into conflicts across multiple txt files.
# This feature works only if the project has a single requirements file, that references (directly or indirectly) all other files.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# This feature works only if the project has a single requirements file, that references (directly or indirectly) all other files.
# This feature works only if the project has a single requirements file that references (directly or indirectly) all other files.

f.write(
"# This feature works only if the project has a single requirements file that "
"references (directly or indirectly) all other files.\n\n"
)
Copy link
Member

Choose a reason for hiding this comment

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

Minor: This would be more readable with a single multiline string.

@nvaytet nvaytet merged commit 532e7e3 into main Nov 24, 2023
2 checks passed
@nvaytet nvaytet deleted the autoresolve branch November 24, 2023 08:06
@nvaytet
Copy link
Member Author

nvaytet commented Nov 24, 2023

@jl-wynen this doesn't work with the nightly.in files.
It will then use e.g. scipp @ https://github.com/scipp/scipp/releases/download/nightly/scipp-nightly-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl in all .txt files.

So I think we need to go back to pinning the prompt-toolkit version :-(

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