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 LooseVersion from easybuild.tools in all easyblocks #3018

Merged
merged 2 commits into from Oct 22, 2023

Conversation

appolloford
Copy link
Contributor

No description provided.

from pkgutil import extend_path

from easybuild.tools.loose_version import LooseVersion
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's specifically this import that trips up the CI, this is the thing that's used for installed the easyblocks pip package itself.

Really not sure how we fix this though...

Copy link
Member

Choose a reason for hiding this comment

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

Well the easy way out is to make the VERSION a string value, rather than a LooseVersion instance, Same goes for VERBOSE_VERSION, so we don't need to import LooseVersion at all here...

Wherever we are using these constants, we have to change accordingly (like in setup.py, test/easyblocks/general.py in here, and in easybuild/tools/version.py in framework).

Copy link
Contributor

Choose a reason for hiding this comment

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

@boegel boegel added bug fix EasyBuild-5.0 EasyBuild 5.0 labels Oct 11, 2023
@boegel boegel added this to the 5.0 milestone Oct 11, 2023
@boegel boegel changed the title Use LooseVersion from easybuild tools and sort imports Use LooseVersion from easybuild.tools and sort imports Oct 11, 2023
easybuild/easyblocks/a/abaqus.py Outdated Show resolved Hide resolved
@Micket
Copy link
Contributor

Micket commented Oct 16, 2023

So, I suggested to @appolloford to isort these to get the import in the right place, but perhaps this is a painful list to deal with when merging this into develop later since there were so many places where this wasn't followed strictly.

I tried to see in the isort conf if there was some way to limit it to not change so much, like only sorting on type nor alphabetical, but couldn't find anything like that. :(

Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel boegel marked this pull request as ready for review October 22, 2023 10:31
@boegel boegel changed the title Use LooseVersion from easybuild.tools and sort imports Use LooseVersion from easybuild.tools in all easyblocks Oct 22, 2023
@boegel boegel added change and removed bug fix labels Oct 22, 2023
@boegel
Copy link
Member

boegel commented Oct 22, 2023

This is good to go, so I've promoted this from "draft" to "ready to review".

A corresponding change in the framework repo may be needed because both VERSION and VERBOSE_VERSION are not string values rather than LooseVersion instances...

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

Successfully merging this pull request may close these issues.

None yet

3 participants