-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unify calls to read json resource from e-mission-common in generate_plots.py #164
Open
iantei
wants to merge
13
commits into
e-mission:main
Choose a base branch
from
iantei:unify_read_json_resource
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Contributor
iantei
commented
Oct 3, 2024
- We had multiple calls to emcu.read_json_resource("label-options.default.json"). I have moved the call for emcu.read_json_resource("label-options.default.json") into generate_plots.py such that we can pass either dynamic labels or default labels based on availability for program/study in their respective config file.
- Replaced "dynamic_labels" with "labels", as we it can be either dynamic labels or default labels.
- Removed all checks for dynamic_labels as we are already passing the proper labels from the generate_plots.py
…e program/study name from the database name of the dataset.
- Pass labels instead of dynamic_labels to the notebooks - labels can either be: - Custom labels from the program deployment config, from nrel-openpath-deploy-configs - In case, we do not have custom labels for the program/study, load default labels from e-mission-common with read_json_resource
…e-mission-common in scaffolding.py Replace dynamic_labels with "labels" - labels could be either default labels or dynamic labels (provided for program/study) depending on availability in config file - Use labels passed from notebook instead of calling read_json_resource("label-options.default.json") from e-mission-common Remove async and await for mapping_color_labels() and translate_values_to_labels() Remove filtering for dynamic_labels availability, as we will only have either labels or dynamic_labels. Update load_viz_notebook_* functions to use labels instead of dynamic_labels
…abels() and translate_values_to_labels().
…move filter for dynamic_labels, since we pass either dynamic_labels or labels based on the availability of dynamic labels in program/study config.
… Remove await for mapping_color_labels() and translate_values_to_labels().
…ince we pass dynamic labels or labels based on the availabilty in study/program's config file.
Testing Scenario: Dataset used: Detailed execution of notebooks using generate_plots.py:
Note: We cannot run the mode_specific_* notebooks and survey_notebook_* since this is not a program or a survey related study. Results:
All charts are loading properly. |
Tested for both configuration of |
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.