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

Replace Cabinet in clib / update zeroD factory constructors #1507

Merged
merged 12 commits into from Jun 21, 2023

Conversation

ischoegl
Copy link
Member

@ischoegl ischoegl commented Jun 19, 2023

Changes proposed in this pull request

  • Make zeroD factory constructors return shared_ptr<ReactorBase>, etc.
  • Replace Cabinet by SharedCabinet in clib interface
  • Add some unit tests for ctfunc
  • Fix deprecation warnings in sofc.py and lithium_ion_battery.py samples

Caveat: Cabinet<Func1> remains as required updates go beyond the scope of this PR. While some functions can be replaced by classes, internal class methods Func1::derivative etc. would need extensive refactoring.

If applicable, fill in the issue number this pull request is fixing

Addresses Cantera/enhancements#164

If applicable, provide an example illustrating new features this pull request is introducing

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #1507 (2b8f5ed) into main (ded75f4) will increase coverage by 0.16%.
The diff coverage is 73.17%.

❗ Current head 2b8f5ed differs from pull request most recent head 59e2d64. Consider uploading reports for the commit 59e2d64 to get more accurate results

@@            Coverage Diff             @@
##             main    #1507      +/-   ##
==========================================
+ Coverage   70.25%   70.42%   +0.16%     
==========================================
  Files         375      375              
  Lines       58292    58285       -7     
  Branches    20828    20820       -8     
==========================================
+ Hits        40955    41046      +91     
+ Misses      14351    14229     -122     
- Partials     2986     3010      +24     
Impacted Files Coverage Δ
src/clib/ctrpath.cpp 0.00% <0.00%> (ø)
src/clib/ctreactor.cpp 6.25% <40.00%> (-0.22%) ⬇️
src/zeroD/FlowDeviceFactory.cpp 56.00% <60.00%> (-19.00%) ⬇️
src/zeroD/ReactorFactory.cpp 77.08% <60.00%> (-11.29%) ⬇️
src/zeroD/WallFactory.cpp 52.17% <60.00%> (-20.05%) ⬇️
interfaces/cython/cantera/reactor.pyx 89.62% <100.00%> (-0.22%) ⬇️
src/clib/ctfunc.cpp 28.00% <100.00%> (+28.00%) ⬆️
src/clib/ctmultiphase.cpp 2.27% <100.00%> (+2.27%) ⬆️

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ischoegl ischoegl requested a review from a team June 19, 2023 18:39
@ischoegl ischoegl marked this pull request as ready for review June 19, 2023 18:39
@ischoegl ischoegl added the clib label Jun 19, 2023
Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

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

Thanks, @ischoegl. I'm glad to see something that adds a bit of testing for Func1, even if that was somewhat incidental to what you were setting out to do. I had just one suggested change.

test/clib/test_ctfunc.cpp Outdated Show resolved Hide resolved
@ischoegl ischoegl mentioned this pull request Jun 21, 2023
5 tasks
@ischoegl
Copy link
Member Author

Thanks, @ischoegl. I'm glad to see something that adds a bit of testing for Func1, even if that was somewhat incidental to what you were setting out to do. I had just one suggested change.

It was indeed incidental. I did some testing for replacement options for the remaining Cabinet<Func1>, where the tests were the quickest way to see whether things worked as expected. Alas, Func1 does need some refactoring that I don't want to tackle at the moment.

@ischoegl ischoegl requested a review from speth June 21, 2023 00:31
Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

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

Thanks, @ischoegl. This looks good to me.

@speth speth merged commit ca7251d into Cantera:main Jun 21, 2023
37 of 38 checks passed
@ischoegl ischoegl deleted the remove-cabinet branch June 22, 2023 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants