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 MissingOutputException #324

Merged

Conversation

doneachh
Copy link
Collaborator

Closes # (if applicable).

Changes proposed in this Pull Request

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Newly introduced dependencies are added to envs/environment.yaml and envs/environment.docs.yaml.
  • Changes in configuration options are added in all of config.default.yaml, config.tutorial.yaml, and test/config.test1.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

@doneachh doneachh linked an issue May 31, 2024 that may be closed by this pull request
2 tasks
@doneachh
Copy link
Collaborator Author

Hi @davide-f & @energyLS ,
we are running into a MissingOutputException in prepare_gas_network when not using custom_data and !(len(pipelines.loc[pipelines.amount_states_passed >= 2]) > 0) as we dont create the pngs snakemake.output.gas_network_fig_1 and snakemake.output.gas_network_fig_2 there. Implemented a workaround to save empty pngs, when falling in this case.
Do you have an idea for a better solution or can we merge it like this?

Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

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

Hello @doneachh :D
Great for the interesting comments :)

Personally, I'd go in favor of having some additional plotting rule that could plot desired networks by option, gas being one of them.
I wouldn't be in favor of keeping the plotting within the function itself.

It may be good to discuss it with the others

@davide-f
Copy link
Member

Can we close this then?

@doneachh
Copy link
Collaborator Author

Can we close this then?

@davide-f Yes, but we should add a new issue for the plotting rule :)

@doneachh doneachh closed this Jun 20, 2024
@davide-f
Copy link
Member

Absolutely agree, feel free to do that:)

@doneachh doneachh reopened this Jun 20, 2024
@doneachh
Copy link
Collaborator Author

@energyLS as discussed in PyPSA-Earth-Sec Meeting --> workaround until plotting is an extra rule

@energyLS
Copy link
Collaborator

@doneachh it looks like the Missing Output Exception comes from snakemake? Or can you elaborate what the issue here is? If the issue comes from snakemake, then we should just remove the output defined by the snakefile?
Also, can you link here the new issue you have created which refers to a proper plotting rule?

@davide-f
Copy link
Member

davide-f commented Jul 1, 2024

@energyLS as discussed in PyPSA-Earth-Sec Meeting --> workaround until plotting is an extra rule

Does this mean you agreed to merge?
If so, an issue should be raised to track the #TODO

@doneachh
Copy link
Collaborator Author

doneachh commented Jul 2, 2024

@davide-f @energyLS we agreed on removing the plotting out of the workflow until #349 is implemented in order to keep the model run for all cases. Commented the plotting methods out in prepare_gas_network in order to reuse it in #349 .

@energyLS
Copy link
Collaborator

energyLS commented Jul 2, 2024

This all makes sense now, but the CI is failing @doneachh

@doneachh
Copy link
Collaborator Author

doneachh commented Jul 2, 2024

@energyLS ahh yeah i see, forgot to comment the call of the methods

Copy link
Collaborator

@energyLS energyLS left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@energyLS energyLS merged commit 3fb0747 into main Jul 4, 2024
5 checks passed
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.

MissingOutputException in rule prepare_gas_network
3 participants