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

Add tests for ck2yaml #708

Merged
merged 5 commits into from
Oct 23, 2019
Merged

Add tests for ck2yaml #708

merged 5 commits into from
Oct 23, 2019

Conversation

speth
Copy link
Member

@speth speth commented Sep 17, 2019

The test suite re-uses the tests for ck2cti.

Also fix a few small issues identified by running the tests.

@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #708 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #708      +/-   ##
==========================================
+ Coverage   70.63%   70.64%   +0.01%     
==========================================
  Files         372      372              
  Lines       43567    43567              
==========================================
+ Hits        30773    30778       +5     
+ Misses      12794    12789       -5
Impacted Files Coverage Δ
src/base/AnyMap.cpp 86.03% <0%> (+0.2%) ⬆️
src/kinetics/Reaction.cpp 87.56% <0%> (+0.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 265a186...20e9740. Read the comment docs.

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.

Other than the one comment below, this all seems fine. Any reason not to use this to refactor the CTML tests too? I'm also asking because I'm wondering if I should use it for the ctml2yaml tests.

from cantera import ck2cti, cti2yaml
from cantera import ck2cti, ck2yaml, cti2yaml

class converterTestCommon:
Copy link
Member

Choose a reason for hiding this comment

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

I was going to suggest using pathlib here, to move away from string manipulation for paths, but I'm not sure it's worth it. Since the converter functions don't work with path-types, it night as well just still be string stuff...

@speth
Copy link
Member Author

speth commented Oct 8, 2019

Other than the one comment below, this all seems fine. Any reason not to use this to refactor the CTML tests too? I'm also asking because I'm wondering if I should use it for the ctml2yaml tests.

What do you mean by "the CTML tests"? The refactoring here is fairly easy since in both cases you're going from CK format to something that can be imported as a Solution, just with a different intermediate format. I think the tests for ctml2yaml are unique, since we don't have any other converter that starts from the XML format, and there should be tests of ctml2yaml that don't have corresponding input files in a different format (other than reference YAML files).

@speth speth merged commit a221c63 into Cantera:master Oct 23, 2019
@speth speth deleted the test-ck2yaml branch October 23, 2019 17:55
@speth speth restored the test-ck2yaml branch January 8, 2020 21:37
@speth speth deleted the test-ck2yaml branch January 8, 2020 21:38
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.

2 participants