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

Docs examples #45

Merged
merged 47 commits into from
Mar 18, 2024
Merged

Docs examples #45

merged 47 commits into from
Mar 18, 2024

Conversation

samgdotson
Copy link
Collaborator

@samgdotson samgdotson commented Feb 15, 2024

This PR adds an initial example notebook for osier and adds more guidance on how to install linear programming solvers on different operating systems.

Edit: This PR actually adds two three example notebooks. One simple example introducing the osier.Technology class, a second example introducing the osier.DispatchModel, and a third demonstrating the osier.CapacityExpansion model.

To reviewers: Please do not request more examples in this PR. Instead, please make an issue describing the example you would like to see! Documentation of this type will never be complete. Thanks.

Edit:

Closes #48 and Closes #49

@samgdotson samgdotson self-assigned this Feb 15, 2024
@samgdotson samgdotson added Difficulty:1-Beginner This issue does not require expert knowledge and may be a good issue for new contributors. Priority:2-Normal This work is important and should be completed ASAP. Status:5-In Review This issue has been handled, and the solution is being reviewed. (probably as a PR) Type:Docs Is related to API documentation, website content, etc. Comp:Build This issue has to do with the build system of the code/doc (makefiles, cmake, install errors) labels Feb 15, 2024
Copy link
Contributor

@yardasol yardasol left a comment

Choose a reason for hiding this comment

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

Hi @samgdotson, great PR.

Quick think I noticed was that in certain places in the docs you write Osier and in other places you put osier. I think it is best to be consistent with the capitalization of the software, but maybe you did this intentionally.

Some of the cells in the example notebooks are rendering strangely. See comments below.

setup.py Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Show resolved Hide resolved
docs/source/examples/index.md Show resolved Hide resolved
Comment on lines 341 to 348
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
}

Get rid of empty cell

Copy link
Contributor

Choose a reason for hiding this comment

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

Please address this.

docs/source/getting-started/solver_install.md Show resolved Hide resolved
Copy link

@ZoeRichter ZoeRichter left a comment

Choose a reason for hiding this comment

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

It seems like some of your headings and sub headings are not following consistent capitalization rules. I have recommendations for further things to add, which I will make issues for.

docs/source/examples/dispatch_tutorial.ipynb Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Show resolved Hide resolved
docs/source/examples/tech_tutorial.ipynb Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Show resolved Hide resolved
"with plt.style.context(\"dark_background\"):\n",
" plt.plot(hours, demand, color='cyan')\n",
" plt.ylabel('Demand [MW]')\n",
" plt.grid(alpha=0.2)\n",

Choose a reason for hiding this comment

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

Can you also add x labels?

Choose a reason for hiding this comment

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

Please add x and y axis labels to all figures that do not have them. For the graph of demand and wind vs time(?), you can use a double y axis to label them.

docs/source/examples/capacity_expansion_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/capacity_expansion_tutorial.ipynb Outdated Show resolved Hide resolved
@samgdotson
Copy link
Collaborator Author

Thanks for the review @yardasol!

Quick think I noticed was that in certain places in the docs you write Osier and in other places you put osier. I think it is best to be consistent with the capitalization of the software, but maybe you did this intentionally.

I thought I capitalized osier at the beginning of a sentence, only. For the most part I do not capitalize. But I'll look through it again.

@samgdotson
Copy link
Collaborator Author

samgdotson commented Feb 21, 2024

I think I'll convert this PR to a draft PR -- seems like more work needs to be done. @yardasol I am curious about the build system issue with pandoc, though. Can you install it that way? I recall having issues with it...

@samgdotson samgdotson marked this pull request as draft February 21, 2024 22:17
@samgdotson samgdotson requested a review from smpark7 March 2, 2024 17:06
@samgdotson
Copy link
Collaborator Author

Thanks for the review @smpark7! I added most of your suggestions to the notebooks. I didn't change the order of the capacity expansion notebook -- but I did clarify each of the problems covered in the notebook. Hopefully that's fine for now. As for numbering, I know that's what you do in the moltres docs, but it's not a pattern I committed to here and it seems like mostly a matter of preference.

README.md Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
Copy link

@ZoeRichter ZoeRichter left a comment

Choose a reason for hiding this comment

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

I like the changes to the technology tutorial section, I think you've satisfied the other two learning objectives. I've left some other comments for requested changes, but I don't believe any of it is big enough to create a new issue over.

"with plt.style.context(\"dark_background\"):\n",
" plt.plot(hours, demand, color='cyan')\n",
" plt.ylabel('Demand [MW]')\n",
" plt.grid(alpha=0.2)\n",

Choose a reason for hiding this comment

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

Please add x and y axis labels to all figures that do not have them. For the graph of demand and wind vs time(?), you can use a double y axis to label them.

docs/source/examples/capacity_expansion_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/capacity_expansion_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/capacity_expansion_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Outdated Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Show resolved Hide resolved
docs/source/examples/dispatch_tutorial.ipynb Show resolved Hide resolved
@smpark7
Copy link
Contributor

smpark7 commented Mar 4, 2024

@samgdotson Good work on addressing my comments.

I didn't change the order of the capacity expansion notebook -- but I did clarify each of the problems covered in the notebook. Hopefully that's fine for now.

Yes that is good enough

As for numbering, I know that's what you do in the moltres docs, but it's not a pattern I committed to here and it seems like mostly a matter of preference.

That's fair too.

Copy link
Contributor

@yardasol yardasol left a comment

Choose a reason for hiding this comment

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

Good improvements, found a few more things to work on.

README.md Outdated Show resolved Hide resolved
Comment on lines 341 to 348
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please address this.

docs/source/examples/dispatch_tutorial.ipynb Show resolved Hide resolved
docs/source/examples/capacity_expansion_tutorial.ipynb Outdated Show resolved Hide resolved
@samgdotson
Copy link
Collaborator Author

Thanks for the reviews @smpark7 @ZoeRichter @yardasol.

I tried to address as much as I could, some things I simply don't agree with. For instance, tone. It makes sense to have a formal tone in the API documentation, but I don't see a reason to enforce formality in a more instructional notebook.

The main request I saw was the addition of labels to all axes and all plots, as well as removing empty cells at the end of the notebooks. Both requests have been fulfilled.

If you're satisfied, please merge whenever.

@samgdotson
Copy link
Collaborator Author

Nudge @ZoeRichter @yardasol @smpark7

@smpark7
Copy link
Contributor

smpark7 commented Mar 8, 2024

Go ahead and merge if yall approve too

@samgdotson
Copy link
Collaborator Author

@ZoeRichter @yardasol nudge

@samgdotson
Copy link
Collaborator Author

@ZoeRichter @yardasol nudge.

@smpark7 if you're satisfied you can merge.

@smpark7
Copy link
Contributor

smpark7 commented Mar 18, 2024

Merging is blocked because of the requested changes. You will have to dismiss their reviews first.

@samgdotson samgdotson dismissed stale reviews from yardasol and ZoeRichter March 18, 2024 18:59

Comments addressed, re-review delayed.

@samgdotson
Copy link
Collaborator Author

@smpark7 try now?

@ZoeRichter
Copy link

Now it seems merging is blocked for another reason?

@samgdotson
Copy link
Collaborator Author

The was an issue with the ruleset preventing merging. The ruleset has been fixed (readthedocs build is done through read the docs, not GitHub, so I changed the source of the status check. Nothing has been removed).

@ZoeRichter
Copy link

If there's no other issues that @yardasol wants addressed, I can merge now.

@smpark7
Copy link
Contributor

smpark7 commented Mar 18, 2024

Given that you addressed their comments and Olek's status indicates that he is currently away, I'm merging this PR.

@smpark7 smpark7 merged commit 976abcc into arfc:main Mar 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp:Build This issue has to do with the build system of the code/doc (makefiles, cmake, install errors) Difficulty:1-Beginner This issue does not require expert knowledge and may be a good issue for new contributors. Priority:2-Normal This work is important and should be completed ASAP. Status:5-In Review This issue has been handled, and the solution is being reviewed. (probably as a PR) Type:Docs Is related to API documentation, website content, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Technology Tutorial - Satisfy Objective 3 Docs: Technology Tutorial - Satisfy Objective 2
5 participants