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

Fix/eliminate warnings #990

Merged
merged 30 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c4f9365
Delete useless test
p-snft Oct 11, 2023
860b742
Disuse network.Bus in warnings test
p-snft Oct 11, 2023
55f3fdc
Disuse subclasses of oemof.network.Node
p-snft Oct 11, 2023
ecb8c25
Use pytest.approx(x) instead of int(round(x))
p-snft Oct 11, 2023
3e02fc5
Embrace conformity
p-snft Oct 11, 2023
962abb6
Use full_load_time_min instead of summed_min
p-snft Oct 11, 2023
aa43b30
Sort imports
p-snft Oct 11, 2023
0156477
Delete unused import
p-snft Oct 11, 2023
91b14c2
Merge branch 'dev' into fix/eliminate_warnings
p-snft Oct 12, 2023
b5b3a81
Merge branch 'dev' into fix/eliminate_warnings
p-snft Oct 12, 2023
63e699e
Change deprecated API calls
p-snft Oct 12, 2023
fc403d3
Fix wrong replacement in TestsConstraint
p-snft Oct 12, 2023
01ebeaa
Fix implicit time step inference
p-snft Oct 12, 2023
f677ad9
Adhere to Black
p-snft Oct 12, 2023
f9c79ab
Adhere to Black
p-snft Oct 12, 2023
9fe9389
Merge branch 'dev' into fix/eliminate_warnings
p-snft Oct 12, 2023
2129b0a
Delete warning about timeincrement in EnergySystem
p-snft Oct 12, 2023
240746c
Fix include of example_genergic_invest
p-snft Oct 12, 2023
442c3a6
Avoid DataFrame.groupby(*args, axis=1, **kwargs)
p-snft Oct 12, 2023
1a681f0
Ignore ExperimentalFeatureWarning in pytest
p-snft Oct 12, 2023
b3ba6f2
Adhere to Black
p-snft Oct 12, 2023
8ef4c4c
Include pytest.ini in MANIFEST
p-snft Oct 13, 2023
cfc6966
Revert "Ignore ExperimentalFeatureWarning in pytest"
p-snft Oct 13, 2023
99385e6
Revert "Include pytest.ini in MANIFEST"
p-snft Oct 13, 2023
ceba43d
Delete tangling white space in docs
p-snft Oct 13, 2023
a849327
Merge branch 'dev' into fix/eliminate_warnings
p-snft Oct 13, 2023
6cb4bbf
Test Future warning in Flow invenstment
p-snft Oct 13, 2023
321a35a
Revert "Delete warning about timeincrement in EnergySystem"
p-snft Oct 16, 2023
561688d
Tell about need for timeincrement in MP models
p-snft Oct 16, 2023
5cb5b72
Merge branch 'dev' into fix/eliminate_warnings
jokochems Oct 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/oemof/solph/_energy_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,10 @@ def __init__(
"please report them."
)
warnings.warn(msg, debugging.ExperimentalFeatureWarning)
self.periods = periods
self._extract_periods_years()
self._extract_periods_matrix()
self._extract_periods_years()
self._extract_periods_matrix()
self._extract_end_year_of_optimization()
self.use_remaining_value = use_remaining_value

def _extract_periods_years(self):
"""Map years in optimization to respective period based on time indices
Expand Down
5 changes: 4 additions & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def test_multi_period_default_discount_rate():
warnings.filterwarnings("ignore", category=FutureWarning)
timeindex = pd.date_range(start="2017-01-01", periods=100, freq="D")
es = solph.EnergySystem(
timeindex=timeindex, periods={0: timeindex}, infer_last_interval=True
timeindex=timeindex,
timeincrement=[1] * len(timeindex),
periods=[timeindex],
infer_last_interval=False,
Comment on lines +76 to +79
Copy link
Member

Choose a reason for hiding this comment

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

I see that you where looking to explicitly set infer_last_interval.

I noticed that this test was somewhat outdated since I used the old periods definition (type dict) here which I fixed in #977 which I just merged.

Another thing is that though it was syntactically correct with the list attribute as in the current dev branch, it would not have worked to set up a model this way. Since the test is only to demonstrate a warning that occurs before the model setup, I'm sorry that have not detected this. Anyways, as it is now, also the model build would work.

Concerning the (not so nice) inconsistency to be resolved some day, see #979.

)
bel = solph.buses.Bus(label="bus")
es.add(bel)
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.