-
Notifications
You must be signed in to change notification settings - Fork 6
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
I351 list results #358
I351 list results #358
Conversation
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.
Great, so I've had a play against NISMOD2 with this, and discovered a few things!
smif list
is now very slow. Each model run takes about 3 second, less if it doesn't have any results. This may well be our config code, or disk io? Not sure. I think the quick fix is to make the results functionality optional on thesmif list
command, and if necessary look into optimisation at a later date. Not a priority at present.- Results read out for
smif available_results
is really good. I don't think I would ever use it for every single model run as it just fills the screen, but the ability to see this for one model run is handy. I think this meets our requirements for now.
Example for digital comms:
(nismod) vagrant@vagrant:/vagrant$ smif available_results digital_comms_test
model run: digital_comms_test
- sos model: digital_comms_fixed_only
- sector model: digital_comms_fixed_network
/vagrant/smif/src/smif/data_layer/file/file_metadata_store.py:159: FionaDeprecationWarning: Use fiona.Env() instead.
with fiona.drivers():
- output: adoption_cap
- no results
- output: distribution_upgrades
- no results
- output: distribution_upgrade_costs_fttp
- no results
- output: premises_by_distribution
- no results
- output: interventions
- no results
- output: distribution_upgrades
- no results
- output: distribution_upgrade_costs_fttp
- no results
- output: distribution_upgrade_costs_fttdp
- no results
- output: premises_upgrade_costs_fttp
- no results
- output: premises_upgrade_costs_fttdp
- no results
- output: premises_by_distribution
- no results
- output: premises_adoption_desirability
- no results
- output: premises_connection_statistics
- no results
- output: premises_passed_with_fttp
- no results
- output: percentage_of_premises_passed_with_fttp
- no results
- output: premises_connected_with_fttp
- no results
- output: percentage_of_premises_connected_with_fttp
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: premises_passed_with_fttdp
- no results
- output: percentage_of_premises_passed_with_fttdp
- no results
- output: premises_connected_with_fttdp
- no results
- output: percentage_of_premises_connected_with_fttdp
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: percentage_of_premises_with_fttc
- no results
- output: lad_premises_with_fttp
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: lad_premises_with_fttdp
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: lad_premises_with_fttc
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: lad_premises_with_adsl
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: coverage
- no results
- output: percentage_of_premises_connected_with_fttc
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: percentage_of_premises_connected_with_adsl
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: percentage_of_premises_connected_with_docsis3
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: total_cost
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: total_potential_bcr
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: total_potential_benefit
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: rollout_costs
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
- output: rollout_bcr
- decision 1: 2019
- decision 2: 2019
- decision 3: 2020
Now requires smif list <-c/--complete>
Codecov Report
@@ Coverage Diff @@
## develop #358 +/- ##
===========================================
+ Coverage 70.59% 71.18% +0.58%
===========================================
Files 59 59
Lines 5183 5292 +109
Branches 615 647 +32
===========================================
+ Hits 3659 3767 +108
+ Misses 1431 1430 -1
- Partials 93 95 +2
Continue to review full report at Codecov.
|
@willu47 I have made the complete results checking optional: it's now an additional flag Would be interesting to what is actually slowing up the smif list, but unfortunately I've not been able to get my dev version of smif working with nismod2... I suspect the slowdown must be in |
I'm happy to ignore appveyor/branch failures here where they relate to conda-forge or dependency errors, so long as appveyor/pr and travis get ✔️s. |
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.
A few optional suggestions for refactoring to help enable #359. Would be good to also get some tests in place against the helper functions.
Method now just calls canonical_expected_results and available_results, and compares the two lists of tuples
The new functionality builds the list of available results based on calls to All methods (including new cli functionality) are now unit tested. Ready for another review @willu47 |
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.
That all looks great Fergus. I've tested it against the nismod2 repo and it works fine. Thanks a lot!
New behaviour
smif list
smif list
will now append an asterisk to model run names if full results existsmif available_results <run_name>
smif available_results <run_name>
will detail the results available for a single<run_name>
: for instance (with results):And, without results:
Omitting the
<run_name>
will print all information for every model run.Closes #351 and #352