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/add tests #357

Draft
wants to merge 64 commits into
base: dev
Choose a base branch
from
Draft

Features/add tests #357

wants to merge 64 commits into from

Conversation

MaGering
Copy link
Collaborator

With this PR tests of the pipeline are added.

The aim is to test each of oemof-B3's rules. So far we collected the rules we had to test in this excel table. Now we want implement tests for this.

I already created a first draft, where I started by testing the rule "create_empty_scalars".
The basic idea is to check if the output, which would be created by the rule, already exists. If so it is renamed first. Then the rule is run and it is checked if there is an output from snakemake and if the path exists. If so, the created output is deleted and the original file is named back. There is a try and exception around this, to make sure, that original data is named back no matter what error there might occure from the renaming on.

@MaGering MaGering marked this pull request as draft November 23, 2023 18:50
@MaGering MaGering added this to the v0.0.5 milestone Mar 1, 2024
@MaGering
Copy link
Collaborator Author

MaGering commented Apr 30, 2024

@Stefanie08, here are some open TODOs:

  • Add docstrings to scripts
  • Add docstrings to functions
  • Add comments where needed

Copy link
Collaborator Author

@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.

Hey @Stefanie08,

could you please check my comments? Thank you! :)

tests/test_pipeline.py Outdated Show resolved Hide resolved
oemof_b3/tools/testing_pipeline.py Outdated Show resolved Hide resolved
oemof_b3/tools/testing_pipeline.py Outdated Show resolved Hide resolved
oemof_b3/tools/testing_pipeline.py Outdated Show resolved Hide resolved
oemof_b3/tools/testing_pipeline.py Outdated Show resolved Hide resolved
oemof_b3/tools/testing_pipeline.py Outdated Show resolved Hide resolved
oemof_b3/tools/testing_pipeline.py Outdated Show resolved Hide resolved
oemof_b3/tools/testing_pipeline.py Outdated Show resolved Hide resolved
oemof_b3/tools/testing_pipeline.py Show resolved Hide resolved
tests/test_pipeline_raw_data.py Outdated Show resolved Hide resolved
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.

2 participants