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

Toggle for skipping dependency if it cannot be parsed #224

Merged
merged 5 commits into from
Dec 7, 2023

Conversation

CasperWA
Copy link
Collaborator

@CasperWA CasperWA commented Dec 6, 2023

This is a broad-fix for #208.

A new input is created for the CI - Check pyproject.toml dependencies callable workflow: skip_unnormalized_python_package_names. A boolean to toggle "whether to skip dependencies with unnormalized Python package names. Normalization is outlined here: https://packaging.python.org/en/latest/specifications/name-normalization. Default is false."

To implement this functionality a new flag is created for ci-cd update-deps: --skip-unnormalized-python-package-names.

Additionally, the argument tables for the pre-commit hooks have been updated slightly, replacing the type boolean with flag and switching the columns Type and Default due to a different sense of importance.

Skipping toggle for unparseable dependencies when running 'ci-cd
update-deps'.
@CasperWA CasperWA linked an issue Dec 6, 2023 that may be closed by this pull request
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7f11bdb) 80.85% compared to head (a77d38c) 81.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #224      +/-   ##
==========================================
+ Coverage   80.85%   81.11%   +0.25%     
==========================================
  Files          12       12              
  Lines         888      900      +12     
==========================================
+ Hits          718      730      +12     
  Misses        170      170              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

"package naming is allowed by user. Note, the requirements could "
f"not be parsed: {exc}"
)
LOGGER.info(msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if I like the fact that both LOGGER and print are being used to pass messages to the user

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The logs are for the developers, not users. The context for this function is that it is run through the command line. So I use print-statements to communicate with the user (in the respective streams (stdout or stderr) depending on the message "level".
So again, the logs are used for debugging and testing, while print statements are used to communicate with the user.

Copy link
Contributor

@daniel-sintef daniel-sintef left a comment

Choose a reason for hiding this comment

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

See my comment regarding logger & print statements side-by-side

@CasperWA CasperWA merged commit 01f2ddc into main Dec 7, 2023
24 checks passed
@CasperWA CasperWA deleted the cwa/close-208-toogle-invalid-package-chars branch December 7, 2023 10:47
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.

Toggle allowing invalid package name chars
2 participants