opes — bundled OPES post-processing scripts¶
Vendored OPES post-processing scripts (see the script headers for provenance).
These are standalone command-line tools, not importable APIs: each parses its
arguments at module scope, so importing one would try to read sys.argv.
run_opes_fes() runs FES_from_State.py as
a subprocess, which is the only way they are meant to be used from Python.
Making this directory a package is what ensures the scripts ship in wheels, and
gives script_path() somewhere to resolve them from.
- script_path(name='FES_from_State.py')[source]¶
Filesystem path of a bundled OPES post-processing script.
Uses
__file__rather thanimportlib.resources, which hands back aTraversablethat only becomes a real path inside anas_fileblock – no use here, where the path goes into a command that outlives the call. The package is installed from a directory, never a zip, so__file__is always a real location.- Parameters:
name (str, optional) – File name of the script.
- Returns:
pathlib.Path – Absolute path to the script.
- Raises:
FileNotFoundError – If no such script is bundled, listing the ones that are.