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

Create new home for data files used in examples #1689

Merged
merged 8 commits into from
Apr 11, 2024
Merged

Conversation

speth
Copy link
Member

@speth speth commented Apr 5, 2024

Changes proposed in this pull request

This PR is the implementation of an idea I suggested in Cantera/enhancements#22 (comment).

  • Add the newly-created https://github.com/cantera/cantera-example-data repository as a Git submodule
  • Depending on the value of the new SCons option example_data, install these data files when installing Cantera
  • Refactor the automatic checkout of submodules in SConstruct
  • Eliminate the need for the redundant copy of the data files that ends up in build/data

I don't regard this as the final word on which files belong in the data directory of the of this repo and which ones should be moved to cantera-example-data. So far, I've only moved those data files that were only used in examples into the submodule. If we want to move any other files, it will take a bit of work to extricate them from the test suite.

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

Closes Cantera/enhancements#22

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

Files from the cantera-example-data repository can be loaded by specifying the path relative to the base Cantera data directory:

gas = ct.Solution('example_data/oxygen-plasma-itikawa.yaml')

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

@speth speth added Input Input parsing and conversion (for example, ck2yaml) Examples labels Apr 5, 2024
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.82%. Comparing base (0c89553) to head (ad64f36).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1689      +/-   ##
==========================================
+ Coverage   72.76%   72.82%   +0.05%     
==========================================
  Files         378      378              
  Lines       56986    56955      -31     
  Branches    20691    20681      -10     
==========================================
+ Hits        41468    41478      +10     
+ Misses      12463    12424      -39     
+ Partials     3055     3053       -2     

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

@speth speth marked this pull request as ready for review April 5, 2024 13:24
Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

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

Thanks! Minor comment but would also be interested in @bryanwweber’s input.

Copy link
Member

@bryanwweber bryanwweber 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, aside from the one minor comment!

@speth speth merged commit 2a57a96 into Cantera:main Apr 11, 2024
51 checks passed
@speth speth deleted the sample-mechs branch April 11, 2024 12:57
speth added a commit to speth/cantera that referenced this pull request Jun 11, 2024
This was broken by the removal of the build/data directory in Cantera#1689.
speth added a commit that referenced this pull request Jun 12, 2024
This was broken by the removal of the build/data directory in #1689.
pjsingal pushed a commit to pjsingal/cantera that referenced this pull request Sep 4, 2024
This was broken by the removal of the build/data directory in Cantera#1689.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Examples Input Input parsing and conversion (for example, ck2yaml)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What should we do with all our input files?
3 participants