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

Add flag for ignoring entries check pypi script #387

Conversation

jonathan-eq
Copy link
Collaborator

@jonathan-eq jonathan-eq commented Sep 5, 2023

Resolves #342
Resolves #414

Depends on #386

@jonathan-eq jonathan-eq self-assigned this Sep 5, 2023
@jonathan-eq jonathan-eq force-pushed the add-flag-for-ignoring-entrie-check-pypi-script branch 2 times, most recently from 57656f7 to 7fcfe34 Compare September 5, 2023 11:49
@xjules xjules self-requested a review September 19, 2023 08:40
@jonathan-eq jonathan-eq force-pushed the add-flag-for-ignoring-entrie-check-pypi-script branch 3 times, most recently from ac92823 to 29aecb1 Compare September 21, 2023 11:45
@jonathan-eq jonathan-eq force-pushed the add-flag-for-ignoring-entrie-check-pypi-script branch from 29aecb1 to bcc4d65 Compare October 2, 2023 14:16
try:
current_version = get_version.Version(versions["previous"])
except get_version.InvalidVersion:
print(f"Could not parse version {versions['previous']}")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is now printouts we will get if we have "main" as version but not filtered them out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

Choose a reason for hiding this comment

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

It's been too long to remember, but can this create noise in the output? main is an accepted version in bleeding.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but this only runs on packages which have pypi as a source in repository.yml. Main versions are sourced elsewhere, so it is filtered out at an earlier stage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

^usually sourced with git

@jonathan-eq jonathan-eq force-pushed the add-flag-for-ignoring-entrie-check-pypi-script branch 5 times, most recently from c11b4ba to 6c3e25f Compare October 3, 2023 10:14
Added argument flag for ignoring package_name/package_version from getting upgrade suggestions using regex.
@jonathan-eq jonathan-eq force-pushed the add-flag-for-ignoring-entrie-check-pypi-script branch from 6c3e25f to 992f1f2 Compare October 24, 2023 12:37
@jonathan-eq
Copy link
Collaborator Author

jonathan-eq commented Oct 27, 2023

There is another issue with the code. It skips versions marked as pre-release, but certain packages only have pre-release versions. In this case, it will try to run max() over an empty list and fail.
See issue #414

This commits adds a check to see if any valid pypi package versions were found. If not, it will let the user know that the package should be checked manually.
Copy link
Contributor

@berland berland left a comment

Choose a reason for hiding this comment

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

Nice improvement!

@jonathan-eq jonathan-eq merged commit 2b2d0a2 into equinor:main Oct 27, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants