-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add auto-generated docs for custom math examples #508
Conversation
Old backend run stuff fails now - time to remove it all!
doc/index.rst
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently put generated files into user/includes
. Don't mind either way, but should be consistent.
|
||
|
||
def process_file(path): | ||
with open(path, "r") as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path.read_text()
handles this without the need for the context manager.
# Licensed under the Apache 2.0 License (see LICENSE file). | ||
|
||
""" | ||
generate_custom_constraints.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate_custom_math_examples
?
generate_custom_constraints.py | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Generates an `.rst` file listing all custom constraints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generates an `.rst` file listing all custom constraints. | |
Generates an `.rst` file listing all custom math examples. |
# capacity_factor_max | ||
# downtime_periods (from CSV as a timeseries) | ||
# uptime_limit | ||
# description: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the pipe leave the result with the line breaks when loaded in, >
ignores the line breaks. Do we have a preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pipe is needed to keep formatting like paragraphs intact, so I think we should always go with the pipe.
Closing this because it is superseded by #526 (which addresses all of the issues pointed out in the review, with the possible exception of the question on |
Summary of changes in this pull request:
# ---
comment marks the end of the "docs comment")Reviewer checklist: