• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nismod / smif / 598
91%

Build:
DEFAULT BRANCH: master
Ran 18 Jan 2018 11:14AM UTC
Jobs 2
Files 32
Run time 20s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
598

push

travis-ci

web-flow
Merge pull request #119 from tomalrussell/feature/model_data_interface

Feature/model data interface

Implement a DataHandle to read/write from models straight to a DataInterface which implements a backing store for inputs, parameters and results.

Removes responsibility for data- and parameter-juggling from SosModel and ModelSet.

Intends to expose a friendly interface to anyone implementing a SectorModel, particularly within simulate(), hiding details of modelrun id and dependency-converging or decision-resolving iterations.

Extends DataInterface to read/write scenario data and results. Also provides a MemoryInterface implementation for convenience and testing.

ScenarioModel is no longer pre-loaded with data. A SectorModel requesting data will transparently read directly from the backing store if the data is provided by a scenario. This also means the get_scenario_data method can be (and has been) removed from SectorModel.

For discussion, but not necessarily blocking: this version is currently raising NotImplementedError for any dependency which would require any conversion. This could be implemented implicitly, but if we prefer explicit to implicit, we might design small data-conversion modules to sit in the dependency graph alongside SectorModel and ScenarioModel, maybe pulling from a smif library of handy default conversion functions.

734 of 820 branches covered (89.51%)

535 of 535 new or added lines in 17 files covered. (100.0%)

2442 of 2704 relevant lines covered (90.31%)

1.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
smif/cli/__init__.py
1
100.0
smif/model/model_set.py
1
100.0
smif/model/scenario_model.py
1
100.0
smif/sample_project/models/energy_demand.py
2
100.0
smif/model/dependency.py
3
100.0
smif/data_layer/data_interface.py
10
100.0
smif/data_layer/datafile_interface.py
27
100.0
smif/data_layer/data_handle.py
31
100.0
smif/data_layer/memory_interface.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
smif/modelrun.py
1
100.0
smif/model/sos_model.py
5
100.0
smif/model/dependency.py
Jobs
ID Job ID Ran Files Coverage
1 598.1 (DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="true") 18 Jan 2018 11:14AM UTC 0
90.31
Travis Job 598.1
2 598.2 (DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="true") 18 Jan 2018 11:14AM UTC 0
90.31
Travis Job 598.2
Source Files on build 598
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #598
  • 48e7ea56 on github
  • Prev Build on master (#596)
  • Next Build on master (#599)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc