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

Features/update tabular #335

Merged
merged 67 commits into from
Sep 20, 2023
Merged

Features/update tabular #335

merged 67 commits into from
Sep 20, 2023

Conversation

Stefanie08
Copy link
Collaborator

@Stefanie08 Stefanie08 commented Jul 27, 2023

Resolves #316

With this PR oemof-tabular is updated.

Stefanie08 and others added 30 commits July 27, 2023 14:26
…perently prefers a value compared to nan and keeps it if it exists
Due to a pandas upgrade from version 1.1.5 to 2.0.3 there is an inaccuracy and the value only adds up to about one. For this reason pytest.approx is applied.
Due to a pandas upgrade from version 1.1.5 to 2.0.3, df.groupby(df.index.date)["sum UC work"].apply(lambda x: balance_between_hours(ts=x, start=WORK_START, end=WORK_END)) contains a MultiIndex.
Due to this there is an error in the assignment to the dataframe df and np.nan values are entered.
This can be fixed by using the values of the series.
After pandas upgrade from version 1.1.5 to 2.0.3
After upgrade of oemof.tabular the import of all component's classes via oemof.tabular.facades.Facade fails because facades is both a module and directory.
To keep the check if component is a class in facades this work around has been invented
Due to oemof.solph upgrade es.timeincrement is set to a series.
This series has to be resticted to 3 timesteps just as es.timeindex is.
@MaGering MaGering marked this pull request as ready for review September 13, 2023 14:06
@MaGering MaGering self-requested a review September 13, 2023 15:26
Copy link
Collaborator

@MaGering MaGering left a comment

Choose a reason for hiding this comment

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

Only the oemoflex version needs to be updated after oemoflex is released.
Besides that this PR is good to go!

pyproject.toml Outdated
numpy = ">=1.21.0"
rtree = ">=0.9.7"
pyyaml = ">=6.0"
dynaconf = "^3.1.7"
snakemake = ">=5"
oemoflex = { git = "https://git@github.com/rl-institut/oemoflex", tag = "0.0.1"}
oemoflex = { git = "https://git@github.com/rl-institut/oemoflex", tag = "features/update_tabular"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be updated as soon as oemoflex v0.0.2 is released.

Sphinx = {version = "^4.3.2", optional = true}
sphinx-rtd-theme = {version = "^1.0.0", optional = true}
sphinxcontrib-bibtex = {version = "^2.4.1", optional = true}
docutils = "^0.17"
geopandas = {version = "^0.10.2", optional = true}
demandlib = "^0.1.8"
pandas = ">=1.1.0"
boto3 = "1.26.125"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional: Check if this can be dropped:

  1. Drop
  2. Execute poetry lock
  3. Revert in case poetry lock takes a disproportionately long time or other difficulties
  4. In case poetry lock file is build after a short while execute poetry install and test all important oemof-B3 functionalities

If this can't be done due to time constraints, move this to a issue with milestone v0.0.4.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I dropped boto3 = "1.26.125". We had it because the log file would not been created without it. I tested it and the workflow runs normally without it.

pyproject.toml Outdated Show resolved Hide resolved
@MaGering MaGering self-requested a review September 20, 2023 21:28
Copy link
Collaborator

@MaGering MaGering left a comment

Choose a reason for hiding this comment

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

Changes work as expected.

@MaGering MaGering merged commit 0a7a9fb into dev Sep 20, 2023
3 checks passed
@MaGering MaGering deleted the features/update_tabular branch September 20, 2023 21:29
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.

Python versions >3.8 not supported in github checks
3 participants