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

feat: save all inputs in standardized locations, use on extract #111

Merged
merged 2 commits into from
Jun 17, 2021

Conversation

danielolsen
Copy link
Contributor

@danielolsen danielolsen commented Jun 17, 2021

Pull Request doc

Purpose

Following discussion in #108, we:

  • save, in standardized locations, all relevant inputs that the user provides to the prepare_inputs function.
  • refactor the get_output_scenarios function to take only the root folder that inputs were prepared into, so that we can automatically use the standardized locations to load relevant data for output processing

What the code is doing

In prepare.py, we save all user inputs that will be relevant for processing outputs, in a new subfolder of the switch inputs root names.

In switch_extract.py, we change the get_output_scenarios function to only require the switch project folder, since we know where all other files will live relative to this root.

Usage example

from switchwrapper.switch_extract import get_output_scenarios
scenarios = get_output_scenarios("prepared")

Time estimate

15 minutes.

@danielolsen danielolsen self-assigned this Jun 17, 2021
Copy link
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

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

Indeed, it looks cleaner!

@danielolsen
Copy link
Contributor Author

When rebased onto the latest commits from #104, this runs successfully end-to-end. Scenario preparation as in #104, and extraction as:

from switchwrapper.switch_extract import get_output_scenarios
scenarios = get_output_scenarios("prepared")

@danielolsen danielolsen merged commit 69c2bf7 into output_processing Jun 17, 2021
@danielolsen danielolsen deleted the daniel/simplify_ux branch June 17, 2021 18:50
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.

2 participants