rl-institut / oemof-B3

An open-source energy system model for Brandenburg/Berlin.
https://oemof-b3.readthedocs.io/
GNU Affero General Public License v3.0
9 stars 5 forks source link

snakemake rule to clean results does not work on Windows 10 #323

Closed Stefanie08 closed 1 year ago

Stefanie08 commented 1 year ago

Upon entering the snakemake rule snakemake -j1 clean the following error message is printed:

INFO -
Der Befehl "rm" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
[Wed Mar 22 12:22:26 2023]
INFO - [Wed Mar 22 12:22:26 2023]
Error in rule clean:
    jobid: 0
    shell:

        rm -r ./results/*
        echo "Removed all results."

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
MaGering commented 1 year ago

Could be resolved adding a separate rule for windows users to the snakefile:

rule clean_on_win_sys:
    shell:
        """
        rmdir /s /q ./results/*
        echo "Removed all results."
        """

Please adapt so that all content (files and directories) are deleted in ./results path. You'll need to adapt the windows shell command because rmdir /s /q ./results/* does not work yet.

Stefanie08 commented 1 year ago

This issue is resolved with PR #329. Thus this issue will be closed.