-
Notifications
You must be signed in to change notification settings - Fork 136
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
Prepare template documents for furo style docs #1131
base: dev
Are you sure you want to change the base?
Conversation
Hello @fwitte! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2025-01-16 07:00:41 UTC |
I added instructions to contribute to this change for the in person meeting in the respective issue #1074 |
… into docs/make-style-modern
… into docs/make-style-modern
… into docs/make-style-modern
… into docs/make-style-modern
…o docs/make-style-modern
…silon constraint) in this section
…o docs/make-style-modern
…t entry (epsilon constraint) in this section
…-section Fiy typos and buggy references
Docs/improve basic concepts section
add the section best pratices to the docs and add the first entry (ep…
I feel like we should merge this rather soon so that it does not diverge from the other branches. |
Good idea, should we make a mini sprint soon to collect, what to complete before merging, distributing tasks and implementing the changes? |
As you may have noticed, we have been busy with other things in the last time. But I agree with you that we need to hurry. @fwitte: Feel free to suggest a date. |
# %%[sec_11_start] | ||
import matplotlib.pyplot as plt | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we need to remove the first assignment to the variable fig
on line 101, as it is immediately redefined on line 107 without being used in between. This will eliminate the redundancy and make the code cleaner.
-
Copy modified line R101
@@ -100,3 +100,3 @@ | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) | ||
# fig, ax = plt.subplot(figsize=[10, 6]) | ||
# %%[sec_11_end] |
# %%[sec_11_start] | ||
import matplotlib.pyplot as plt | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) |
Check notice
Code scanning / CodeQL
Unused global variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
The best way to fix the problem is to remove the unused variable fig
. This will clean up the code and eliminate any confusion about the purpose of the variable. Since the variable is not used anywhere in the code, removing it will not affect the existing functionality.
-
Copy modified line R101
@@ -100,3 +100,3 @@ | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) | ||
ax = plt.subplot(figsize=[10, 6]) | ||
# %%[sec_11_end] |
# %%[sec_11_start] | ||
import matplotlib.pyplot as plt | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we need to remove the first assignment to the variable ax
on line 101, as it is immediately redefined on line 107 without being used in between. This will eliminate the redundancy and make the code cleaner and more efficient.
-
Copy modified line R101
@@ -100,3 +100,3 @@ | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) | ||
# fig, ax = plt.subplot(figsize=[10, 6]) | ||
# %%[sec_11_end] |
# %%[sec_11_start] | ||
import matplotlib.pyplot as plt | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) |
Check notice
Code scanning / CodeQL
Unused global variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we should remove the unused variable ax
. This involves deleting the assignment of ax
on line 101. Since ax
is not used anywhere in the code, removing it will not affect the functionality of the code.
-
Copy modified line R101
@@ -100,3 +100,3 @@ | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) | ||
fig = plt.subplot(figsize=[10, 6]) | ||
# %%[sec_11_end] |
# %%[sec_12_start] | ||
import matplotlib.pyplot as plt | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) |
Check notice
Code scanning / CodeQL
Unused global variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we need to remove the assignment of the unused variable fig
on line 107. This will clean up the code and eliminate the unnecessary variable. Since the variable is not used anywhere in the code, we can safely delete the entire line without affecting the functionality of the code.
-
Copy modified line R107
@@ -106,3 +106,3 @@ | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) | ||
|
||
# %%[sec_12_end] |
# %%[sec_12_start] | ||
import matplotlib.pyplot as plt | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) |
Check notice
Code scanning / CodeQL
Unused global variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we should remove the unused variable ax
. This will clean up the code and eliminate the warning. Since ax
is not used anywhere in the code, we can safely remove its assignment without affecting the functionality of the code.
-
Copy modified line R107
@@ -106,3 +106,3 @@ | ||
|
||
fig, ax = plt.subplot(figsize=[10, 6]) | ||
fig = plt.subplot(figsize=[10, 6]) | ||
# %%[sec_12_end] |
@@ -0,0 +1,7 @@ | |||
# %%[sec_1] | |||
import oemof.solph as solph |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we need to remove the unused import statement on line 2. This will eliminate the unnecessary dependency and make the code cleaner and easier to read. The import statement on line 5 should remain as it might be used in the subsequent code.
-
Copy modified line R2
@@ -1,3 +1,3 @@ | ||
# %%[sec_1] | ||
import oemof.solph as solph | ||
|
||
|
import oemof.solph as solph | ||
|
||
# %%[sec_2] | ||
import oemof.solph as solph |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we need to remove the redundant import statement on line 5. This will eliminate the unnecessary dependency and make the code cleaner and more readable. No additional methods, imports, or definitions are needed to implement this change.
-
Copy modified line R5
@@ -4,3 +4,3 @@ | ||
# %%[sec_2] | ||
import oemof.solph as solph | ||
|
||
|
@@ -0,0 +1,7 @@ | |||
# %%[sec_1] | |||
import oemof.solph as solph |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we need to remove the unused import statement import oemof.solph as solph
on line 2. This will eliminate the unnecessary dependency and make the code cleaner and easier to read.
-
Copy modified line R2
@@ -1,3 +1,3 @@ | ||
# %%[sec_1] | ||
import oemof.solph as solph | ||
|
||
|
import oemof.solph as solph | ||
|
||
# %%[sec_2] | ||
import oemof.solph as solph |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, we need to remove the redundant import statement on line 5. This will eliminate the unnecessary dependency and make the code cleaner. The best way to fix this issue is to delete the import statement on line 5 without affecting the existing functionality.
-
Copy modified line R5
@@ -4,3 +4,3 @@ | ||
# %%[sec_2] | ||
import oemof.solph as solph | ||
|
||
|
The model time is defined by the number of intervals and the length of intervals. The length of each interval does not have to be the same. This can be defined in two ways: | ||
|
||
1. Define the length of each interval in an array/Series where the number of the elements is the number of intervals. | ||
2. Define a `pandas.DatetimeIndex` with all time steps that encloses an interval. Be aware that you have to define n+1 time points to get n intervals. For non-leap year with hourly values that means 8761 time points to get 8760 interval e.g. 2018-01-01 00:00 to 2019-01-01 00:00. |
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.
Giving intervals is no longer supported.
The model time is defined by the number of intervals and the length of intervals. The length of each interval does not have to be the same. This can be defined in two ways: | |
1. Define the length of each interval in an array/Series where the number of the elements is the number of intervals. | |
2. Define a `pandas.DatetimeIndex` with all time steps that encloses an interval. Be aware that you have to define n+1 time points to get n intervals. For non-leap year with hourly values that means 8761 time points to get 8760 interval e.g. 2018-01-01 00:00 to 2019-01-01 00:00. | |
The model time is defined by the number of intervals and the length of intervals. The length of each interval does not have to be the same. The intervals are defined by giving a `pandas.DatetimeIndex` with all time steps that define the intervals. Be aware that you have to define n+1 time points to get n intervals. For non-leap year with hourly values that means 8761 time points to get 8760 interval e.g. 2018-01-01 00:00 to 2019-01-01 00:00. |
|
||
After defining an instance of the `EnergySystem` class, one need to add nodes and links between them to define the underlying network of the energy system. | ||
|
||
There are two types of *nodes* : *components* and *buses*. Every Component has to be connected with one or more *buses*. The link between a *component* and a *bus* is called a *flow*. |
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.
Make clear that bus -> bus is possible.
There are two types of *nodes* : *components* and *buses*. Every Component has to be connected with one or more *buses*. The link between a *component* and a *bus* is called a *flow*. | |
There are two types of *nodes* : *components* and *buses*. Every Component has to be connected with one or more *buses*. The link between a *component* and a *bus* (or between * two buses*) is called a *flow*. |
Resolve #1074 (docs with appealing look)
Resolve #1132 (docs story line)
Resolve #1141 (beginner tutorials)
Note: #1142 (advanced tutorials) will be added later.
This PR prepares the change of the docs layout to the furo template. The following things have to considered before merging:
On top of that, I updated the .readthedocs.yml configuration file to use the
[dev]
dependencies and a more up to date python version and delete the extra readthedocs specificrequirements.txt
file. It also introduces an announcement banner at the top of every page, where the content can be dynamically changed from theannouncement.html
file in the root of theannouncements
branch.The plan is to crowdsource the necessary updates at the upcoming user-meeting.
Update: