Skip to content

Qol auto detect surface to volume#1122

Merged
RemDelaporteMathurin merged 15 commits intomainfrom
qol-auto-detect-subdomaisn
Apr 28, 2026
Merged

Qol auto detect surface to volume#1122
RemDelaporteMathurin merged 15 commits intomainfrom
qol-auto-detect-subdomaisn

Conversation

@RemDelaporteMathurin
Copy link
Copy Markdown
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin commented Apr 23, 2026

Description

Needs #1118

Summary

This PR removes the need to explicitly define surface_to_volume when initiliasing a HydrogenTransportProblemDiscontinuous class

Related Issues

Fixes #1117

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🔨 Code refactoring (no functional changes, no API changes)
  • 📝 Documentation update
  • ✅ Test update (adding missing tests or correcting existing tests)
  • 🔧 Build/CI configuration change

Testing

  • All existing tests pass locally (pytest)
  • I have added new tests that prove my fix is effective or that my feature works

Code Quality Checklist

  • My code follows the code style of this project (Ruff formatted: ruff format .)
  • My code passes linting checks (ruff check .)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

Documentation

  • I have updated the documentation accordingly (if applicable)
  • I have added docstrings to new functions/classes following the project conventions

Breaking Changes

Screenshots/Examples

Additional Notes

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.80%. Comparing base (33ea49e) to head (fd21218).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/festim/subdomain/volume_subdomain.py 86.11% 5 Missing ⚠️
src/festim/hydrogen_transport_problem.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1122      +/-   ##
==========================================
- Coverage   94.92%   94.80%   -0.12%     
==========================================
  Files          44       44              
  Lines        3270     3310      +40     
==========================================
+ Hits         3104     3138      +34     
- Misses        166      172       +6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@jhdark jhdark left a comment

Choose a reason for hiding this comment

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

This is a great little quality of life change! Just made some small suggestions to allow things to still work in parallel.

Comment thread src/festim/subdomain/volume_subdomain.py
Comment thread src/festim/subdomain/volume_subdomain.py
Comment thread src/festim/subdomain/volume_subdomain.py
Comment thread src/festim/hydrogen_transport_problem.py
Comment thread src/festim/subdomain/volume_subdomain.py
)
self.interfaces = interfaces or []
self.surface_to_volume = surface_to_volume or {}
self.surface_to_volume = {}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we add some kind of "deprecation" warning only for the next release, just noting that this is no longer required to be given by the user if a non-empty dict is given? Even though its not a deprecation

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes there is a a DeprecationWarning in HydrogenTransportProblemDiscontinuous.initialise()

https://github.com/festim-dev/FESTIM/pull/1122/changes#diff-586fa3ee395f75eb89f7d327f2f051a08b9d4f0cb520918f7e112d3ac7271af8R1142-R1150

RemDelaporteMathurin and others added 3 commits April 27, 2026 19:23
Co-authored-by: James Dark <65899899+jhdark@users.noreply.github.com>
@RemDelaporteMathurin RemDelaporteMathurin merged commit 3d92caf into main Apr 28, 2026
14 of 18 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the qol-auto-detect-subdomaisn branch April 28, 2026 01:00
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.

QoL: remove surface_to_subdomains

2 participants