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

Add tests for API to add Flows between existing Nodes #28

Merged
merged 10 commits into from
Oct 10, 2023
Merged

Conversation

p-snft
Copy link
Member

@p-snft p-snft commented Sep 28, 2023

There is an option to add flows between existing nodes in an energy system. However, there was no test, so it could not be considered as part of the API. This PR adds tests to assure the option is there.

node1 = Node()
node2 = Node()
energy_system.add(node1, node2)
node2.inputs[node1] = Flow()
node1.inputs.update({node2: Flow()})

@p-snft p-snft self-assigned this Sep 28, 2023
@pep8speaks
Copy link

pep8speaks commented Sep 28, 2023

Hello @p-snft! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2023-10-10 08:58:11 UTC

@p-snft p-snft requested a review from uvchik September 29, 2023 10:00
@p-snft
Copy link
Member Author

p-snft commented Oct 6, 2023

I learned from @gnn (on another channel) that it was already possible to add Flows:

node1 = Node()
node2 = Node()
node2.inputs[node1] = Flow()
node1.inputs.update({node2: Flow()})

I think, I will rewrite my tests for that API and document it properly.

@p-snft p-snft changed the title Provide API to add Flows between existing Nodes Add tests for API to add Flows between existing Nodes Oct 6, 2023
@p-snft
Copy link
Member Author

p-snft commented Oct 10, 2023

As this is just adding tests and I got feedback on other channels, I will probably merge this after adding documentation.

@p-snft p-snft merged commit c81809d into dev Oct 10, 2023
9 checks passed
@p-snft p-snft deleted the features/add_flows branch October 10, 2023 09:00
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