apsbits.api.delete_instrument#

Delete an instrument and its associated qserver configuration.

This script moves an instrument directory and its corresponding qserver configuration directory to a .deleted directory in the workspace.

Functions

delete_instrument(instrument_dir, qserver_dir)

Move the instrument and qserver directories to a .deleted directory.

get_instrument_paths(name)

Get the paths to the instrument and qserver directories.

main()

Parse arguments and move the instrument to the .deleted directory.

validate_instrument_name(name)

Validate that the instrument name follows the required pattern.

apsbits.api.delete_instrument.delete_instrument(instrument_dir: Path, qserver_dir: Path) None[source]#

Move the instrument and qserver directories to a .deleted directory.

Parameters:
  • instrument_dir – Path to the instrument directory.

  • qserver_dir – Path to the qserver directory.

Returns:

None

apsbits.api.delete_instrument.get_instrument_paths(name: str) Tuple[Path, Path][source]#

Get the paths to the instrument and qserver directories.

Parameters:

name – The name of the instrument.

Returns:

A tuple containing the instrument directory path and qserver directory path.

apsbits.api.delete_instrument.main() None[source]#

Parse arguments and move the instrument to the .deleted directory.

Returns:

None

apsbits.api.delete_instrument.validate_instrument_name(name: str) bool[source]#

Validate that the instrument name follows the required pattern.

Parameters:

name – The instrument name to validate.

Returns:

True if the name is valid, False otherwise.