-
Notifications
You must be signed in to change notification settings - Fork 23
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 script that checks dependency conflicts #218
Conversation
Is this worth merging? |
I think that it's not, since it's not considering the actual, built distribution. I think the easier and more correct approach would be to have a |
In either case, added #219 |
I see your point, and having it at the end of the build process would make sense, but they are not exclusive. I see the use case of this more when bumping packages from pypi and needing to check dependencies. It will shorten the feedback loop significantly as opposed to having it as a part of the build process. It is of course not a fail safe, as some internal packages could have conflicting deps, but then we can at least find more of them earlier. |
Rename the script to "pypi_conflicts" or something, and add it to a pipeline so that you don't have to run it manually. |
The first part I agree on, the second also, but that would be up to the users of |
Something like this looks promising: |
The snyk job already does this 🙂 |
It transpiles only changed releases: https://github.com/equinor/komodo-releases/blob/master/.github/workflows/snyk.yml#L20-L50 |
Did not think about that - can create something based on that |
parser.add_argument( | ||
"--try-pip", | ||
action="store_true", | ||
help="If given, will try to install packages and check validity. Note that " | ||
"creates a virtual environment and is quite slow", | ||
) |
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.
Do I need to pass --try-pip
to actually have anything checked? What happens if this is not provided?
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.
Either way, I think invoking this program like so
komodo-check-conflicts bleeding.yml repository.yml
should
- if it finds conflict, exit with a non-zero exit code and output these to stdout;
- if no conflict, exit with 0 without any output.
The parser is called "Checks if pypi packages are compatible" and the command is called "komodo-check-conflicts", so introducing "output", "requirements", and "try-pip" as default false is a bit unexpected.
Maybe remove --try-pip
, rename --output-file
to --generate-requirements
. The latter should also
- have help text explaining that the program will "Output installed packages in pip requirements format.";
- not require a file, but generate the requirements on stdout. If the user needs something in a file, the unix philosophy warrants:
komodo-check-conflicts --generate-requirements > 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.
Yes you do, will remove that option so it always checks.
"install", | ||
*requirements, | ||
"--no-deps", | ||
"--force-reinstall", # Probably not needed |
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.
not needed
Encourage to either
|
I will have a look at it in the next week or so, if I dont get anywhere I will close it. |
No description provided.