Add unit tests for Port and Node base classes - #122
Open
mikejturner wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
✅ Code coverage on 🎉 No files have reduced coverage 🎉
|
| File | Details |
|---|---|
src/echo/__init__.py |
✅ 100% → 100% |
src/echo/configuration.py |
✅ 100% → 100% |
src/echo/constants.py |
✅ 100% → 100% |
src/echo/exceptions.py |
✅ 88% → 88% |
src/echo/functional.py |
✅ 100% → 100% |
src/echo/models/__init__.py |
✅ 100% → 100% |
src/echo/models/agnostic/__init__.py |
✅ 100% → 100% |
src/echo/models/agnostic/aggregation.py |
✅ 95% → 95% |
src/echo/models/agnostic/base.py |
✅ 96% → 96% |
src/echo/models/agnostic/bounded.py |
✅ 100% → 100% |
src/echo/models/agnostic/controlled.py |
✅ 100% → 100% |
src/echo/models/agnostic/flex.py |
✅ 100% → 100% |
src/echo/models/agnostic/input_output.py |
✅ 100% → 100% |
src/echo/models/agnostic/storage.py |
✅ 82% → 82% |
src/echo/models/agnostic/tellegen/__init__.py |
✅ 100% → 100% |
src/echo/models/agnostic/tellegen/base.py |
✅ 100% → 100% |
src/echo/models/agnostic/tellegen/multi_commodity.py |
✅ 38% → 38% |
src/echo/models/agnostic/tellegen/partitioned_multi_commodity.py |
✅ 96% → 96% |
src/echo/models/agnostic/tellegen/three_way_valve.py |
✅ 90% → 90% |
src/echo/models/agnostic/time_delay.py |
✅ 100% → 100% |
src/echo/models/agnostic/time_varying.py |
✅ 76% → 76% |
src/echo/models/base/__init__.py |
✅ 100% → 100% |
src/echo/models/base/base_model.py |
✅ 100% → 100% |
src/echo/models/base/edge.py |
✅ 69% → 69% |
src/echo/models/base/node.py |
✅ 86% → 98% |
src/echo/models/base/optimisation_graph.py |
✅ 76% → 76% |
src/echo/models/base/path.py |
✅ 92% → 92% |
src/echo/models/base/port.py |
✅ 96% → 98% |
src/echo/models/base/transform.py |
✅ 90% → 90% |
src/echo/models/base/types.py |
✅ 100% → 100% |
src/echo/models/carbon/__init__.py |
✅ 100% → 100% |
src/echo/models/carbon/aggregation.py |
✅ 100% → 100% |
src/echo/models/carbon/base.py |
✅ 100% → 100% |
src/echo/models/electrical/__init__.py |
✅ 100% → 100% |
src/echo/models/electrical/base.py |
✅ 100% → 100% |
src/echo/models/electrical/ev/__init__.py |
✅ 100% → 100% |
src/echo/models/electrical/ev/base.py |
✅ 94% → 94% |
src/echo/models/electrical/ev/deprecated.py |
✅ 33% → 33% |
src/echo/models/electrical/ev/ev_with_profile.py |
✅ 68% → 68% |
src/echo/models/electrical/ev/v0g.py |
✅ 100% → 100% |
src/echo/models/electrical/ev/v1g.py |
✅ 100% → 100% |
src/echo/models/electrical/ev/v2g.py |
✅ 100% → 100% |
src/echo/models/electrical/generation.py |
✅ 94% → 94% |
src/echo/models/electrical/inverter.py |
✅ 92% → 92% |
src/echo/models/gas/__init__.py |
✅ 100% → 100% |
src/echo/models/gas/base.py |
✅ 100% → 100% |
src/echo/models/gas/boiler_fixedcop.py |
✅ 86% → 86% |
src/echo/models/gas/boiler_tempcontrolled.py |
✅ 62% → 62% |
src/echo/models/prebuilt/__init__.py |
✅ 100% → 100% |
src/echo/models/prebuilt/battery.py |
✅ 71% → 71% |
src/echo/models/prebuilt/diesel_generator.py |
✅ 45% → 45% |
src/echo/models/prebuilt/flex.py |
✅ 79% → 79% |
src/echo/models/prebuilt/load.py |
✅ 91% → 91% |
src/echo/models/prebuilt/scaled_solar.py |
✅ 67% → 67% |
src/echo/models/prebuilt/solar.py |
✅ 50% → 50% |
src/echo/models/scenario.py |
✅ 100% → 100% |
src/echo/models/thermal/__init__.py |
✅ 100% → 100% |
src/echo/models/thermal/base.py |
✅ 0% → 0% |
src/echo/models/thermal/parameterised_chiller.py |
✅ 85% → 85% |
src/echo/models/thermal/parameterised_heatpump.py |
✅ 88% → 88% |
src/echo/models/thermal/simple_chiller.py |
✅ 85% → 85% |
src/echo/models/thermal/simple_heatpump.py |
✅ 92% → 92% |
src/echo/models/thermal/simple_heatpump_dualoutput.py |
✅ 92% → 92% |
src/echo/models/thermal/storage.py |
✅ 78% → 78% |
src/echo/objectives/__init__.py |
✅ 100% → 100% |
src/echo/objectives/base.py |
✅ 98% → 98% |
src/echo/objectives/contingency.py |
✅ 93% → 93% |
src/echo/objectives/power.py |
✅ 86% → 86% |
src/echo/objectives/tariff.py |
✅ 80% → 80% |
src/echo/optimiser.py |
✅ 73% → 73% |
src/echo/tracker.py |
✅ 43% → 43% |
src/echo/utils.py |
✅ 61% → 61% |
src/echo/validators.py |
✅ 89% → 91% |
src/echo/visualization.py |
✅ 91% → 91% |
TOTAL |
✅ 82% → 82% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds unit tests for Port and Node base classes.
Makes a few small improvements to Port and Node (these are noted in the Changelog file):
FlowConstraint.SeriesorFlowConstraint.InRangenow raises aNotImplementedError.set_active_periods_from_arraymethod now accepts a list of booleans in addition to a list of 0's and 1's.get_portmethod on Node now returns None rather than raising a ValueError, if no such port with that name can be found.verify_nodenow called when adding nodes to models andverify_nodemodified to now verify not only check the node but also verify (via call toverify_port) any ports attached to the node.