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:

http://github.com/slaclab/slactwin/LICENSE

class slactwin.pkcli.CommandsBase(*args, **kwargs)[source]

Bases: object

Common functionality between all pkclis

quest_start()[source]

Begin a request which wraps all APIs.

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:

http://github.com/slaclab/slactwin/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 *.h5 files, 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 archive directory 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 .h5 files

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:

http://github.com/slaclab/slactwin/LICENSE

class slactwin.pkcli.mock.Commands(*args, **kwargs)[source]

Bases: CommandsBase

live(period=30)[source]

Mock the lume-live directory :param period: how often to move summary files into position :type period: float

slactwin.pkcli.service module

slactwin.pkcli.simrun_bmad module

slactwin.pkcli.simrun_elegant module

slactwin.pkcli.simrun_impact module

slactwin.pkcli.slactwin module

slactwin.pkcli.util module