Ray Speth
40e7910183
[Test] Always use YAML input in reactor tests
...
Blessed output file changed because of addition of N2 to h2o2.yaml
2021-05-09 18:08:11 -04:00
Ray Speth
9df1f6474e
[Test] Speed up some reactor network tests
2021-05-09 18:08:11 -04:00
Ray Speth
ad5cad118f
[Test] Speed up bad transport geometry test
...
Use YAML input format to avoid repeated calls ctml_writer
2021-05-09 18:08:11 -04:00
Ray Speth
11d05a7759
[Test] Speed up TestTwinFlame.test_restart
2021-05-09 18:08:11 -04:00
Ray Speth
cfa96aa4e4
[Python] Fix memory error when deallocating reaction rate objects
...
Using the value of member variables that are Python objects in
__dealloc__ is not reliable, because they may have already been
deleted by the time __dealloc__ is called. Instead, we need a C data
member to check for whether or not the rate object owns the underlying
C++ object and should delete it.
2021-05-08 04:07:01 -05:00
Bryan Weber
f27c68e075
Allow print_level keyword argument in logger calls
...
This simplifies using the logger functions.
2021-05-04 21:36:21 -04:00
Bryan Weber
26a5175711
Use f-string in quoted function
2021-05-04 21:36:21 -04:00
Bryan Weber
27696feab8
Rename mglob function to multi_glob
2021-05-04 21:36:21 -04:00
Bryan Weber
f8d54f75d7
Update type hinting in buildutils
2021-05-04 21:36:21 -04:00
Bryan Weber
425aba0d27
Update CI for Conda and Windows
...
* Bintray is sunsetting, so download Boost from Sourceforge
* Use Miniforge in the Sundials builds, since Sundials comes from
conda-forge anyways
2021-05-04 21:36:21 -04:00
Bryan Weber
be04f1d423
Fix flake8 suggestions
2021-05-04 21:36:21 -04:00
Bryan Weber
edf5e4cc77
Limit exported functions from buildutils
...
Each SConscript module imports what it needs from the stdlib.
2021-05-04 21:36:21 -04:00
Bryan Weber
d1eacf7b40
Refactor the loggers to a single instance
...
Set up a filter and output formatter so that there is only a single
instance of a logger class. Whether or not the level name is printed
with the message is determined by the print_level key in the extra
dictionary argument. This change clarifies the purpose of the previous
two logger instances. The output of error level and higher is sent to
the stderr stream, all lower levels are sent to stdout.
2021-05-04 21:36:21 -04:00
Bryan Weber
f5dc022b33
Rename and refactor get_command_output
2021-05-04 21:36:21 -04:00
Bryan Weber
53e07ce4b4
Refactor and rename getSpawn
2021-05-04 21:36:21 -04:00
Bryan Weber
8c4fa0f013
Refactor help output for our configuration
2021-05-04 21:36:21 -04:00
Bryan Weber
2dfb3d677b
Use pathlib in mglob
...
Do not use pathlib.glob because SCons Glob is able to glob through Nodes
that may not be actual files on the disk.
2021-05-04 21:36:21 -04:00
Bryan Weber
97fc050bde
Rewrite which function to use pathlib
2021-05-04 21:36:21 -04:00
Bryan Weber
c7a5d1885e
Replace stripDrive with pathlib
...
Remove unused functions
2021-05-04 21:36:21 -04:00
Bryan Weber
1896a051ca
Bump SUNDIALS to 5.7 in CI
2021-05-04 21:36:21 -04:00
Bryan Weber
98825f1599
Remove Python 2 build from CI
2021-05-04 21:36:21 -04:00
Bryan Weber
87c1a3f70f
Refactor CSV and profile tests to better use NumPy
2021-05-04 21:36:21 -04:00
Bryan Weber
3749acc3bf
Refactor text file comparison
...
- Use an enum to represent the test state.
- Use the loggers to produce terminal output
2021-05-04 21:36:21 -04:00
Bryan Weber
bca7afcde6
Refactor regression_test function
2021-05-04 21:36:21 -04:00
Bryan Weber
83eacc021d
Rename print_report and test_results to snake case
2021-05-04 21:36:21 -04:00
Bryan Weber
febd00c6fe
Use f strings and brace format in config.h files
2021-05-04 21:36:21 -04:00
Bryan Weber
4bf244395e
Enforce Python 3.6 or higher for building
...
Exit immediately if Python 2 is running SCons
Going forward, we want to use Python 3 syntax features, which cause
SConstruct to raise a SyntaxError during parsing in Python 2 and no code
is executed. As such, it is not possible to use the standard exception
flow to raise a useful error message unless we force SConstruct to use
only Python 2 compatible syntax. Therefore, this change introduces an
"f"-string that will raise a SyntaxError in Python 2 with a message
about running SCons with Python 3.
2021-05-04 21:36:21 -04:00
Bryan W. Weber
1fb56b060f
Rename cleaning functions and add loggers
...
The loggers added here will eventually be used to produce all the output
from the build process that we control (that is, it won't replace
anything that SCons prints). The motivation for this change is to have
better configurability of when and where output is sent to the terminal,
for instance, this allows us to easily change to sending error messages
to stderr instead of stdout. Another thing this makes possible is builds
with varying levels of output, for instance, if a user only wants to see
error messages.
2021-05-04 21:36:21 -04:00
Ingmar Schoegl
3466422c2b
[Cython] document usage of 'long' instead of 'long int'
2021-04-30 12:14:30 -04:00
Ray Speth
1ab3e6a039
[Python] Explain some logic in get_types
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
9447dacc26
[Python] Add clarifications and streamline code
...
* Clarify empty AnyValue
* Fix docstrings
* Address review comments
2021-04-30 12:14:30 -04:00
Ray Speth
8de5bb4dc5
[Python] Test that AnyValue held types are correct
...
Remove tests for unhandled cases that are now handled
2021-04-30 12:14:30 -04:00
Ray Speth
ce57ed3166
Use alternative implementation of python_to_anyvalue
2021-04-30 12:14:30 -04:00
Ray Speth
84e0d4981e
Print nicer names for more AnyValue types
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
924c916ba9
[Python] streamline implementation
...
Simplify code using:
* explicit type conversions
* leverage of set properties
Co-authored-by: Ray Speth <speth@mit.edu >
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
ae7b54fed0
[Python] Improve error messages for conversions from Python to AnyValue
...
Also, add missing case for conversion of list of dictionaries
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
e3ee42f40a
[Python] Improve Python API for empty AnyValue/AnyMap objects
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
af5cd4abc7
[CI] Add unit tests for Python to AnyValue/AnyMap conversion
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
2035981258
[Python] Convert complex Python types to C++ AnyValue
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
2810433f1c
[Python] Convert simple Python types to AnyValue/AnyMap
2021-04-30 12:14:30 -04:00
Ray Speth
ddb394be99
Delete erroneous header comment
2021-04-28 17:11:51 -04:00
Ray Speth
5cce93edd9
[SCons] Add AnyMap.h to precompiled header
...
Speeds up overall compilation time because this header and all the
templated code in AnyMap.inl.h is directly or indirectly included in
many other files.
2021-04-28 17:11:51 -04:00
Ray Speth
40c40026d0
[CI] Use all three CPUs available on macOS builders
2021-04-28 17:11:51 -04:00
Ray Speth
f72bbf637d
[Test] Skip test_ignition_delay_sensitivity
...
This test is not reliable and causes lots of CI headaches.
Some of the problems are documented in
https://github.com/Cantera/enhancements/issues/55
2021-04-28 17:11:51 -04:00
Ray Speth
96c34dbcf7
[CI] Fix environment variable for pytest-github-actions-annotate-failures
2021-04-28 17:11:51 -04:00
Ray Speth
6015a46acf
[CI] Start coverage job immediately
2021-04-28 17:11:51 -04:00
Ray Speth
fd4131512f
[Input] Avoid over-eager conversions to double
...
Prevent strings like "E-1" from being identified as floating point values.
2021-04-28 17:11:51 -04:00
Ray Speth
0d45b1065d
[Test] Fix extinction test cases that weren't using the right temperature
2021-04-28 17:11:51 -04:00
Ray Speth
96abea8d0c
[Python] Fix set_initial_guess for CounterflowTwinPremixedFlame
2021-04-28 17:11:51 -04:00
Ray Speth
4db9e2cfc2
[Test] Parse pytest results with SCons
2021-04-28 17:11:51 -04:00