-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
General cleanup of tests, SCons building, and submodules #803
Conversation
Codecov Report
@@ Coverage Diff @@
## master #803 +/- ##
=======================================
Coverage 71.57% 71.57%
=======================================
Files 372 372
Lines 44501 44501
=======================================
Hits 31851 31851
Misses 12650 12650
Continue to review full report at Codecov.
|
Can you rebase this on current master and fix the merge conflicts? |
80181a3
to
d16b72f
Compare
@speth Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the logic of fully specifying the path to the newly-converted input file, but I'm a little confused by a couple of things here.
First, what's wrong with loading the reference file from the Cantera data path? This is presumably what's making it necessary to add another copy of gri30.xml
to that location?
Second, doesn't this logic also apply to the other sets of tests in test_convert.py
, i.e. cti2yamlTest
and ctml2yamlTest
. Right now, this PR is affects the ck2cti
and ck2yaml
tests. And in that case, we definitely wouldn't want to have to copy all of the reference files that are currently in the common data directory to test/data
.
d16b72f
to
d573cd7
Compare
d573cd7
to
4927488
Compare
If I recall correctly, the reason I added the test data directory explicitly was to avoid loading a file with the same name from the data directory. It may have been the
Yes, I was trying to limit the fix to the one that would solve the problem I was having.
Eventually, those files are going to go away, at least my understanding of the plan is that we're going to stop distributing all CTI and XML files with 3.0. So they will have to be copied at some point. I think the change to that line can be deferred until that happens. |
a70aa06
to
2bf8316
Compare
I'm not able to compile the version of Googletest introduced in this PR branch using MSVC 14.0 (aka Visual Studio 2015). I get the following error:
I haven't been able to find anything searching for this error, and I'm not sure what versions of MSVC this version of Googletest is meant to support. |
Interestingly, the builds pass with MSVC 14.0 on the Windows GitHub actions builds: https://github.com/Cantera/cantera/pull/775/checks?check_run_id=713201352 Those have VS 2019 with the 14.0 build tools installed. |
01969c0
to
da2d2b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this seems fine to me, except I think there is a better solution to the issue of compiler intermediates that aren't being cleaned up.
I pushed an alternative commit that fixes this for more compilers and without requiring additional arguments to the test cases to my version of this branch (https://github.com/speth/cantera/commits/fix-python-tests), along with a commit refactoring of how the classes used for building these test cases. I can push these changes to this PR branch if you want to consider them as a friendly amendment.
yaml = ("phases:\n- name: gas\n elements: [C, H]\n " | ||
"species: [dummy-thermo.yaml/species: [R1A, R1B, P1]]\n " | ||
"thermo: ideal-gas") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a good place to use the YAML flow style.
Also, the elements
declaration is almost never required in YAML.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I included elements
since the CTI test did as well 🤷♂️
@speth Thanks! Feel free to push the changes for the test file cleanup. |
The YAML test was still loading the CTI file
The original test file was checking the conversion of a file not related to this test.
Ensures that all converted files are loaded from the work directory and all reference files are loaded from the test/data directory. This fixes a test failure due to an incorrectly explicitly specified CTI file extension.
Since the staging directory can be set when the prefix is the current directory, the install should be able to continue in that case.
Resolves errors when compling the VCS solver related to incomplete type specifications
SUNDIALS: 5.1 -> 5.3 Eigen: 3.3.4 -> 3.3.7 Google Test: 1.8.0 -> 1.10 fmt: 6.1.2 -> 6.2.1
fmtlib v6.2.0 and 6.2.1 changed their includes so that windows.h is included without defining NOMINMAX. This caused the max macro from windows.h to collide with the function from the stdlib leading to an error from the ValueCache.h header.
The previous check was too specific for the output of --version and did not work with Clang 11.0. I hope that Xcode being somewhere in the output will be more stable than the output starting with Apple LLVM. I checked the output of Clang installed with Homebrew and it did not include Xcode anywhere in it.
The MATLAB docs files are no longer in the code-docs folder.
Some of the build files in the test_problems folder were not being cleaned by scons test-clean. This seems to be because they were not the same name as the executable.
- Use more standard approach to handling constructor kwargs - Provide default values for additional arguments - Integrate handling of programs used for multiple tests
921ef33
to
6a320ee
Compare
Thanks @speth! |
The changes from Cantera#803 regarding explicitly specifying the converted output file didn't get included when this test was added in Cantera#822.
The changes from Cantera#803 regarding explicitly specifying the converted output file didn't get included when this test was added in Cantera#822.
The changes from Cantera#803 regarding explicitly specifying the converted output file didn't get included when this test was added in Cantera#822.
Checklist
scons build
&scons test
) and unit tests address code coverageChanges proposed in this pull request
instRoot
instead ofenv['prefix']
to see if this is the source directoryThis branch is rebased on top of #796 so I can continue to use it to test the Conda packages