Closed zchmielewska closed 11 months ago
import argparse
def main():
parser = argparse.ArgumentParser(description="Your script description")
parser.add_argument("--version", type=int, help="Specify the version")
parser.add_argument("--id", type=int, help="Specify the ID")
args = parser.parse_args()
if args.version is not None:
version = args.version
# You can use the 'version' variable in your code
print(f"Version: {version}")
if args.id is not None:
id_value = args.id
# You can use the 'id_value' variable in your code
print(f"ID: {id_value}")
if __name__ == "__main__":
main()
I did it only for a single model point id as this is the main point if this feature.
If we find it helpful to also have a list of ids (two or three model points) this can be implemented in the future.
Corresponding PR: 9e1fbc7bdc00e9dce724406d987947fec0cb127d
For various checks or debugging purposes, it's common to run the model for a single or a subset model points.
We can do that by manipulating the
input.py
script. But maybe it would be handy to have a dedicated command for it too.Now we have only dedicated command for running a specific version:
will run the 2nd version of the runplan.
What could be nice is to have:
Runs 2nd version of the runplan for model point 374164.
Runs the base version (1st version of the runplan) for model points 374164 and 536473.