PyPSA / PyPSA/pypsa-eur

Use imports and run directive instead of script directive for Snakefiles / clarify how to debug Snakemake scripts

Open
#1,122 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
615
Forks
459
Avg merge
4d 14h
Merged PRs (30d)
6

Description

Maybe you could

  • adapt the Snakemake rules to use run directives instead of script directives to allow for easier debugging in IDEs
    https://stackoverflow.com/questions/78677266/how-to-debug-scripts-for-pypsa-eur

  • and/or include some hints in the documentation,

    • that snakemake does not support debuggin in IDEs if script or shell directive is used instead of run directive.
    • explain how the mocksnackemake workaround can be used for the purpose of debugging.
    • how to handle issues with missing files for that workaround. Is there an extra set of files that are always present for purpose of testing/debugging? Or does it use "regular" files, that need to be created running corresponding scripts/rules beforehand?

Related:

https://github.com/PyPSA/pypsa-eur/issues/1118

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Snakefiles and the debugging discussion in issue #1118, then check how the script, shell, and run directives are currently used. Determine whether the contribution should document IDE debugging with mocksnakemake, including missing-file handling, or also change rules to use run directives. Done means the chosen scope is documented clearly and any agreed rule changes are covered by appropriate checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, tooling
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.