AI4OPT / OPFGenerator

Instance generator for OPF problems
MIT License
2 stars 3 forks source link

Put cleanup script into julia function #78

Closed mtanneau closed 2 months ago

mtanneau commented 2 months ago

I also added a check that JSON/H5/slurm directories do exist before attempting to delete them. Previously, the cleanup code would error if we tried to delete a directory that was already deleted.

The if abspath(PROGRAM_FILE) == @__FILE__ check at the end ensures that code only gets executed if the script is called from the command line as julia slurm/cleanup.jl. This makes it easier to include the file in a REPL session, without triggering any code execution at include time.

No impact on source code.