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 mock_snakemake functionality to clio? #7

Open
irm-codebase opened this issue Mar 7, 2025 · 2 comments
Open

Add mock_snakemake functionality to clio? #7

irm-codebase opened this issue Mar 7, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@irm-codebase
Copy link
Member

Is this suggestion related to a problem? Please describe.
One of the most annoying bits of using snakemake is the lack of proper debugging functions in most IDEs, slowing developement.

Describe the solution you'd like
The folks at PyPSA get around this with a 'mock' function
https://github.com/PyPSA/pypsa-eur/blob/master/scripts/_helpers.py

I've tested it and it works decently enough. Should we consider including it as part of clio-tools?

Additional context
One problem is that it requires snakemake to be 'embedded' in clio-tool dependencies.
This could cause conflicts when other projects use it.

Also, we should try to avoid 'fattening' clio-tools too much. Maybe this could be an optional dependency?

@irm-codebase irm-codebase added the enhancement New feature or request label Mar 7, 2025
@brynpickering
Copy link
Member

Could it be part of the data module template?

@irm-codebase
Copy link
Member Author

Probably? It'd be repeated code in many modules, though.

Check here: https://github.com/PyPSA/pypsa-eur/blob/master/scripts/build_shapes.py
It's a conditional import under if __main__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants