Loading noctua/sequencer.py +11 −8 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ Sequencer module for Observation Blocks (OBs) in JSON format ''' # System modules import argparse # New import import argparse import importlib import json import os Loading @@ -18,7 +18,6 @@ from pathlib import Path # New import # Other templates from .utils.logger import log # Corrected relative import class Sequencer(): ''' Manage a sequence of JSON Observation Blocks (OBs) Loading Loading @@ -303,6 +302,8 @@ class Sequencer(): sys.exit(1) # Exit if running standalone def cli(): ''' Command line interface for sequencer Loading Loading @@ -343,14 +344,13 @@ def cli(): ) args = parser.parse_args() seq = Sequencer(embedded=False) # For CLI, always run not embedded # If no arguments are given, or only 'target' is missing without --script if not args.target and not args.script: parser.print_help() sys.exit(0) seq = Sequencer(embedded=False) # For CLI, always run not embedded if args.script: if not args.params: log.error("Error: --params must be provided when using --script.") Loading Loading @@ -397,5 +397,8 @@ def cli(): if __name__ == "__main__": # This allows running with `python -m noctua.sequencer ...` ''' If called alone ''' cli() Loading
noctua/sequencer.py +11 −8 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ Sequencer module for Observation Blocks (OBs) in JSON format ''' # System modules import argparse # New import import argparse import importlib import json import os Loading @@ -18,7 +18,6 @@ from pathlib import Path # New import # Other templates from .utils.logger import log # Corrected relative import class Sequencer(): ''' Manage a sequence of JSON Observation Blocks (OBs) Loading Loading @@ -303,6 +302,8 @@ class Sequencer(): sys.exit(1) # Exit if running standalone def cli(): ''' Command line interface for sequencer Loading Loading @@ -343,14 +344,13 @@ def cli(): ) args = parser.parse_args() seq = Sequencer(embedded=False) # For CLI, always run not embedded # If no arguments are given, or only 'target' is missing without --script if not args.target and not args.script: parser.print_help() sys.exit(0) seq = Sequencer(embedded=False) # For CLI, always run not embedded if args.script: if not args.params: log.error("Error: --params must be provided when using --script.") Loading Loading @@ -397,5 +397,8 @@ def cli(): if __name__ == "__main__": # This allows running with `python -m noctua.sequencer ...` ''' If called alone ''' cli()