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

F.Materials -> subclass of list #694

Merged
merged 5 commits into from
Feb 1, 2024

Conversation

KulaginVladimir
Copy link
Collaborator

@KulaginVladimir KulaginVladimir commented Jan 31, 2024

Proposed changes

This PR modifies F.Materials to be a subclass of list following #494.

@RemDelaporteMathurin, @jhdark, please, let me know what do you think and if this is what is needed.

Types of changes

What types of changes does your code introduce to FESTIM?

  • Bugfix (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
  • Documentation Update (if none of the other choices apply)
  • New tests

Checklist

  • Black formatted
  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0353514) 98.94% compared to head (e85cf4a) 98.94%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #694   +/-   ##
=======================================
  Coverage   98.94%   98.94%           
=======================================
  Files          58       58           
  Lines        2188     2188           
=======================================
  Hits         2165     2165           
  Misses         23       23           

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

Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

@KulaginVladimir this is exactly what we need to do. I hope you see why it increases the readibility of the code base, and is just more logical overall.

We'd have to do the same for other classes.

A few small comments on my side

festim/generic_simulation.py Show resolved Hide resolved
festim/materials/materials.py Outdated Show resolved Hide resolved
test/unit/test_materials.py Outdated Show resolved Hide resolved
festim/materials/materials.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

Looks good to me! Apologies for the back and forth discussion on equlity!

We should do the same for other classes too!

@RemDelaporteMathurin RemDelaporteMathurin added the enhancement New feature or request label Feb 1, 2024
@RemDelaporteMathurin RemDelaporteMathurin merged commit ff6daff into festim-dev:main Feb 1, 2024
5 checks passed
@KulaginVladimir KulaginVladimir mentioned this pull request Feb 1, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants