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

Drop Python 3.9 support and add DOLFINx v0.8 support #22

Merged
merged 5 commits into from
Jul 23, 2024

Conversation

matt-graham
Copy link
Collaborator

@matt-graham matt-graham commented Jul 22, 2024

Adds DOLFINx v0.8 to test matrix and updates usages of DOLFINx API to ensure compatibility across versions v0.6 through v0.8.

Also drops Python 3.9 support on the basis this is now > 3 years old and out of both NEP29 and SPEC0 recommended support windows, and our test matrix is getting a bit unwieldy.

Also updates our type hints to use | in place of explicit Union or Optional where appropriate, and adds strict=True argument to a call to zip.

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.9%. Comparing base (ad756b7) to head (c57e835).

Files Patch % Lines
src/dxh.py 92.9% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main     #22     +/-   ##
=======================================
+ Coverage   96.3%   96.9%   +0.7%     
=======================================
  Files          1       1             
  Lines        186     191      +5     
  Branches      37      38      +1     
=======================================
+ Hits         179     185      +6     
+ Misses         5       4      -1     
  Partials       2       2             

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

@matt-graham matt-graham changed the title Drop Python 3.9 support and test against DOLFINx v0.8 Drop Python 3.9 support and add DOLFINx v0.8 support Jul 22, 2024
@matt-graham
Copy link
Collaborator Author

@samcunliffe not sure if you have bandwidth to review this at the moment - no problem if you want to leave it till you're on project in August! From meeting last week it seems that dxh is getting used 🎉 but lack of DOLFINx v0.8 support was flagged as a pain.

The codecov/patch fail I think is just because codecov doesn't seem to hit bits of code in if TYPECHECKING blocks.

Copy link
Member

@samcunliffe samcunliffe left a comment

Choose a reason for hiding this comment

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

Nice!

Yeah, the type-hints become much nicer. And ...

think is just because codecov doesn't seem to hit bits of code in if TYPECHECKING blocks.

Yeah, we don't coverage-check that so it's unavoidable.

@@ -23,7 +23,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.x
Copy link
Member

Choose a reason for hiding this comment

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

except ImportError:
# Compatibility w [email protected]: if the new functionspace function is not in DOLFINx
# then use the class constructor directly.
from dolfinx.fem import FunctionSpace as functionspace # noqa: N813
Copy link
Member

Choose a reason for hiding this comment

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

👍

@matt-graham matt-graham merged commit fad6e67 into main Jul 23, 2024
10 of 11 checks passed
@matt-graham matt-graham deleted the mmg/update-py-and-dolfinx-versions branch July 23, 2024 09:42
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.

2 participants