Skip to content
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

Close minor issues before release #375

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Close minor issues before release #375

wants to merge 3 commits into from

Conversation

jtlangevin
Copy link
Collaborator

Changes to close issues #211, #210, #369, and #255.

Note that code on master does not currently pass the pycodestyle lint, which is causing CI build on these commits to fail.

Through try/except handling, errors preparing individual ECMs or ECM packages are now captured and written out to a TXT file in a new ./logs folder. Skipped ECMs are also now registered to a new list (“skipped”) in ./generated/run_setup.json, and users are warned if there are any wqECMs in this list when executing run.py.

Fixes #255.

Additionally, pulled check_mkt_inputs() function out of fill_mkts() such that it is executed across all ECMs in the site before individual ECM markets are prepared.

Fixes #369.
The read-in of individual measure JSON now checks for duplicate keys and raises an error if present. Fixes #210.

The check_mkt_inputs function was broadened to check key measure inputs (market entry year, performance, cost, lifetime, and market scaling fraction) in addition to checking for valid market inputs. Fixes #211.
@jtlangevin jtlangevin requested review from trynthink and aspeake and removed request for aspeake March 13, 2024 17:19
scout/ecm_prep.py Outdated Show resolved Hide resolved
Comment on lines +13917 to +13920
"WARNING: " +
str(len(handyvars.skipped_ecms)) + single_plural +
"not prepared due to exceptions. See TXT file with the "
"appropriate timestamp in ./logs for details.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So could there be multiple log files during a single run of ecm_prep.py? I though they would all be in one file

Copy link
Collaborator Author

@jtlangevin jtlangevin Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's all in one file per run, but with a unique time stamp. So each run of ecm_prep would get its own file. Make sense?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a task for #373, but it might make sense to write logs as "<timestamp>_<my_yaml_name>.txt". When running in batches as it could be confusing to look through logs otherwise.

scout/run.py Outdated Show resolved Hide resolved
scout/run.py Outdated Show resolved Hide resolved
scout/run.py Outdated Show resolved Hide resolved
@jtlangevin jtlangevin added this to the v1.0.0 milestone Mar 19, 2024
@aspeake aspeake mentioned this pull request Mar 28, 2024
@jtlangevin jtlangevin removed this from the v1.0.0 milestone Apr 11, 2024
@trynthink trynthink added this to the v1.0.0 milestone Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants