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

refactor: move code snippets to files #302

Merged
merged 2 commits into from
May 28, 2021
Merged

refactor: move code snippets to files #302

merged 2 commits into from
May 28, 2021

Conversation

jenhagg
Copy link
Collaborator

@jenhagg jenhagg commented May 28, 2021

Purpose

It should help with simplifying the process to regenerate the plots. Not entirely sure what that looks like yet - ideally something fully automated but more likely just loading the files into a notebook. Either way, the code is more accessible since it's in .py files and broken up by plot.

What the code is doing

Just moving things around, small fix to indentation, and running the formatting on the code.

Testing

Built the docs locally and compared result with the plotting section currently deployed.

Time estimate

10 min

@jenhagg jenhagg self-assigned this May 28, 2021
@jenhagg jenhagg requested review from BainanXia and rouille May 28, 2021 19:49
@jenhagg jenhagg added this to the Welcome interns! milestone May 28, 2021
@@ -0,0 +1,7 @@
from bokeh.io import show
from powersimdata import Scenario

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems I forgot to declare scenario. Can you add scenario = Scenario("3287"). Sorry

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No problem - done

@rouille
Copy link
Collaborator

rouille commented May 28, 2021

I imagine black and flake8 went through the new python files

@jenhagg
Copy link
Collaborator Author

jenhagg commented May 28, 2021

I imagine black and flake8 went through the new python files

Actually looks like we only run flake8 on the postreise folder otherwise it would have found the undefined scenario you caught

@rouille
Copy link
Collaborator

rouille commented May 28, 2021

I imagine black and flake8 went through the new python files

Actually looks like we only run flake8 on the postreise folder otherwise it would have found the undefined scenario you caught

Yeah. Also, I noticed that there was only one new line after the import statements in some of the files

Copy link
Collaborator

@rouille rouille left a comment

Choose a reason for hiding this comment

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

Looks good

@jenhagg jenhagg merged commit f428f3d into develop May 28, 2021
@jenhagg jenhagg deleted the jon/plots branch May 28, 2021 22:59
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