Closed mcgibbon closed 6 years ago
I'm still working on some of these changes, but they've mostly been implemented already. I still have to write tests to confirm that TimeStepper
, DiagnosticComposite
, and PrognosticComposite
have accurate properties dictionaries, and I still have to update documentation. I should also remember to describe get_constants_string
somewhere in the documentation.
Merging #26 into master will increase coverage by
12.09%
. The diff coverage is90.63%
.
@@ Coverage Diff @@
## master #26 +/- ##
==========================================
+ Coverage 76% 88.1% +12.09%
==========================================
Files 15 23 +8
Lines 1313 2026 +713
==========================================
+ Hits 998 1785 +787
+ Misses 315 241 -74
Impacted Files | Coverage Δ | |
---|---|---|
sympl/_core/get_np_arrays.py | 100% <100%> (ø) |
|
sympl/_core/dataarray.py | 94.73% <100%> (ø) |
|
sympl/_core/units.py | 97.22% <100%> (+1.06%) |
:arrow_up: |
sympl/_core/state.py | 100% <100%> (ø) |
|
sympl/_core/exceptions.py | 100% <100%> (ø) |
:arrow_up: |
sympl/_components/plot.py | 24.24% <100%> (ø) |
:arrow_up: |
sympl/_components/__init__.py | 100% <100%> (ø) |
:arrow_up: |
sympl/__init__.py | 100% <100%> (ø) |
:arrow_up: |
sympl/_core/constants.py | 83.69% <33.33%> (-6.43%) |
:arrow_down: |
sympl/_core/time.py | 81.48% <80%> (-2.52%) |
:arrow_down: |
... and 25 more |
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 ec9b4df...b5d5de5. Read the comment docs.
Some of the main ideas of things that are changing, particularly breaking changes:
array_call
method for the subclass which takes in a numpy array state satisfying the component's input properties, and returns numpy arrays satisfying the output properties. The base class automatically handles unwrapping and wrapping arrays in its__call__
implementation.TimeStepper
s are written by writing a_call
method, which has the same signature as the previous__call__
method.ScalingWrapper
,UpdateFrequencyWrapper
, andTendencyInDiagnosticsWrapper
have been removed, and their functionality is implemented in base component classes.'time'
must now always be present in the model state dictionary.TimeStepper
s should be called using individualPrognostic
s as args, rather than using a list.TimeStepper
s and Composites now properly have properties dictionaries implementedUpdate: These bullets are no longer entirely accurate. Check
HISTORY.rst
in the latest version for complete changes.