slactwin.pkcli package¶
Base class and common routines for other pkcli’s to inherit/use.
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
- class slactwin.pkcli.CommandsBase(*args, **kwargs)[source]¶
Bases:
objectCommon functionality between all pkclis
Submodules¶
slactwin.pkcli.db module¶
Database command-line utilities
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
- class slactwin.pkcli.db.Commands(*args, **kwargs)[source]¶
Bases:
CommandsBase- insert_runs(archive_dir)[source]¶
Load data from slactwin runs into db.
Recursively searches archive_dir for any
*.h5files, calling slactwin.run_importer.insert_run_summary for each file. Commits after each run summary import. Terminates on first run summary report in error or on successful completion.Typically, archive_dir points to the
archivedirectory in the slactwin root which as subdirectories of the form YYYY/MM/DD, e.g.archive/2024/11/02/*.h5.- Parameters:
archive_dir (str) – directory containing archive
.h5files
slactwin.pkcli.mock module¶
Support for testing
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
- class slactwin.pkcli.mock.Commands(*args, **kwargs)[source]¶
Bases:
CommandsBase