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 compatible-release specifier for dependency versions #748

Merged
merged 3 commits into from Nov 30, 2023

Conversation

paulf81
Copy link
Collaborator

@paulf81 paulf81 commented Nov 30, 2023

Use compatible release specifiers for dependency versions

This pull request adds version specifications for the dependencies with the compatible release specifier. The change uses the latest release of each dependent version of the requirement without incrementing a major version which in semantic versioning could include breaking changes.

From the docs:

For a given release identifier V.N, the compatible release clause is approximately equivalent to the pair of comparison clauses:
>= V.N, == V.*

Some examples from the docs:

~= 2.2                     # <- this line is approximately equivalent
>= 2.2, == 2.*         # <- to this line

~= 1.4.5                   # <- this line is approximately equivalent
>= 1.4.5, == 1.4.*.    # <- to this line

More concretely, if we say numpy~=1.20, it means that FLORIS requires Numpy to be at least v1.20 and any other larger v1 is valid but not v2.

Related issue

Closes #745

Impacted areas of the software

setup.py and the dependencies chosen during installation

@kflemin

@paulf81
Copy link
Collaborator Author

paulf81 commented Nov 30, 2023

ok @rafmudaf all tests passing now and I got rid of the overly picky versions, good to go?

@paulf81 paulf81 self-assigned this Nov 30, 2023
@paulf81 paulf81 added the enhancement An improvement of an existing feature label Nov 30, 2023
@rafmudaf
Copy link
Collaborator

Can you show that you tested the "docs" extra dependencies? These are not covered by the tests unless the documentation is built, and in this case it isn't

@rafmudaf rafmudaf added this to the v3.6 milestone Nov 30, 2023
setup.py Show resolved Hide resolved
setup.py Show resolved Hide resolved
@rafmudaf rafmudaf changed the title switch to compatible release Use compatible-release specifier for dependency versions Nov 30, 2023
@paulf81
Copy link
Collaborator Author

paulf81 commented Nov 30, 2023

@rafmudaf , I just cloned the latest version into a clean conda environment and ran:

pip install -e ".[docs, develop]"

without conflicts

@paulf81
Copy link
Collaborator Author

paulf81 commented Nov 30, 2023

And all tests pass

@rafmudaf
Copy link
Collaborator

Thanks for checking that. Well done fixing this!

@rafmudaf rafmudaf merged commit e1dd6b7 into NREL:develop Nov 30, 2023
8 checks passed
@paulf81 paulf81 deleted the feature/compatible_version branch December 1, 2023 19:43
@misi9170 misi9170 mentioned this pull request Apr 5, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants