FESTIM icon indicating copy to clipboard operation
FESTIM copied to clipboard

First look to the addition of derived quantities, Issue 638

Open JonathanGSDUFOUR opened this issue 1 year ago • 5 comments

Proposed changes

A first look into what I have for now in trying to work on Issue #638 .

Types of changes

What types of changes does your code introduce to FESTIM?

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] 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

  • [x] 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)

Further comments

JonathanGSDUFOUR avatar Apr 04 '24 13:04 JonathanGSDUFOUR

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.95%. Comparing base (2f9f966) to head (dcccfc5). Report is 49 commits behind head on fenicsx.

Additional details and impacted files
@@             Coverage Diff             @@
##           fenicsx     #735      +/-   ##
===========================================
+ Coverage    98.90%   98.95%   +0.05%     
===========================================
  Files           28       35       +7     
  Lines         1550     1631      +81     
===========================================
+ Hits          1533     1614      +81     
  Misses          17       17              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 04 '24 13:04 codecov[bot]

@JonathanGSDUFOUR glad to see progress on this! Have you tried testing your implementation on an example?

RemDelaporteMathurin avatar Apr 04 '24 13:04 RemDelaporteMathurin

@JonathanGSDUFOUR glad to see progress on this! Have you tried testing your implementation on an example?

Not yet, but it's a good next step indeed

JonathanGSDUFOUR avatar Apr 04 '24 13:04 JonathanGSDUFOUR

Would it be better to test each quantity separately or can we test them all in one case ?

JonathanGSDUFOUR avatar Apr 05 '24 13:04 JonathanGSDUFOUR

Would it be better to test each quantity separately or can we test them all in one case ?

We want to test each quantity ensuring it computes the expected value. A way to do it would be to create a function, store it as the species.solution and then check that the value computed by the derived quantity is the expected one.

RemDelaporteMathurin avatar Apr 05 '24 14:04 RemDelaporteMathurin

@JonathanGSDUFOUR I don't know if you are aware but:

  • the tests don't pass with your changes. You can run the tests locally with python -m pytest .
  • there are a couple of unadressed comments

RemDelaporteMathurin avatar Jun 04 '24 13:06 RemDelaporteMathurin

@JonathanGSDUFOUR I don't know if you are aware but:

  • the tests don't pass with your changes. You can run the tests locally with python -m pytest .
  • there are a couple of unadressed comments

Yeah I currently have an issue with the version of dolfinx on my environment so the test don't run correctly, so I'm a bit blind on that, I wanted to share some of the new additions on the PR. I will go back to the comment next

JonathanGSDUFOUR avatar Jun 04 '24 14:06 JonathanGSDUFOUR

I currently have an issue with the version of dolfinx on my environment

What's the issue?

RemDelaporteMathurin avatar Jun 04 '24 14:06 RemDelaporteMathurin

I currently have an issue with the version of dolfinx on my environment

What's the issue?

I had the latest version of dolfinx in my conda env (0.8.0) but it's solved now (I have one with 0.7.3 that runs the test correctly)

JonathanGSDUFOUR avatar Jun 05 '24 08:06 JonathanGSDUFOUR

@JonathanGSDUFOUR tests pass yay 🎉

RemDelaporteMathurin avatar Jun 10 '24 14:06 RemDelaporteMathurin