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

Unify calls to read json resource from e-mission-common in generate_plots.py #164

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

iantei
Copy link
Contributor

@iantei 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
…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.
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.

1 participant