equinor / fmu-tools

fmu-tools is a library containing tools for pre- and post-processing in a Fast Model Update (FMU) context
https://equinor.github.io/fmu-tools/
GNU Lesser General Public License v3.0
10 stars 14 forks source link

Add rename_rms_scripts #176

Closed mferrera closed 1 year ago

mferrera commented 1 year ago

This PR adds a new script to fix some Python scripting annoyances in RMS, as well as gather useful information about said scripts. In particular it allows one to fix all non-.py file extensions and gather a list of scripts that are not currently used in any RMS workflow. It achieves this by parsing the pythoncomp/.master file, choosing the instance_name as the source of truth (the name displayed in RMS), and renaming the linked file on disk to this. It takes some precautions to avoid overwrites and includes the ability to take a backup.

A current limitation is that it ignores subdirectories in the pythoncomp directory.

This PR is being made at the suggestion of @jcrivenaes who has already done some testing with it. In includes fixes to feedback received from Jan already.