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 py311 to ci.yml and pyproject.toml #601

Merged
merged 14 commits into from
Feb 14, 2024

Conversation

veenstrajelmer
Copy link
Collaborator

No description provided.

@veenstrajelmer veenstrajelmer linked an issue Jan 31, 2024 that may be closed by this pull request
6 tasks
@@ -2,7 +2,7 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![ci](https://github.com/Deltares/HYDROLIB-core/actions/workflows/ci.yml/badge.svg)](https://github.com/Deltares/HYDROLIB-core/actions/workflows/ci.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Deltares_HYDROLIB-core&metric=alert_status)](https://sonarcloud.io/dashboard?id=Deltares_HYDROLIB-core)

[![Supported versions](https://img.shields.io/pypi/pyversions/hydrolib-core.svg)](https://pypi.org/project/hydrolib-core)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I propose to add this badge to the readme.md: https://img.shields.io/pypi/pyversions/hydrolib-core.svg

@priscavdsluis
Copy link
Contributor

Replaced our str, Enum mixins with the StrEnum from the strenum package.
The built-in module enum also offers an StrEnum, but this class is only available from python >= 3.11.
Since we also support earlier versions, I decided to use the strenum package, which offers the same functionality across all python versions, without breaking changes such as using the mixin.

https://blog.pecar.me/python-enum

Copy link
Contributor

@MRVermeulenDeltares MRVermeulenDeltares left a comment

Choose a reason for hiding this comment

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

I think the change is good, since the StrEnum package can be used in version prior to 3.11.
Git actions also seems to run fine on version 3.8 till 3.11.
Please have a look at my last comment, once that has been resolved the PR is Ok in my opinion.
Do resolve the conflicts before merging :)

pyproject.toml Outdated
@@ -20,6 +20,7 @@ numpy = "^1.21"
pydantic = "^2.5"
lxml = "^4.6"
meshkernel = "^4.0.2"
strenum = "^0.4.15"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the latest version, please consider loosening this constraint to avoid dependency conflicts when combining it with other packages in an environment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Updated version requirement for strenum to ^0: >= 0.0.0, <1.0.0

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@priscavdsluis priscavdsluis merged commit f60f9b5 into main Feb 14, 2024
10 checks passed
@priscavdsluis priscavdsluis deleted the 598-add-support-for-python-311 branch February 14, 2024 08:25
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.

Add support for Python 3.11
4 participants