plesty.pow_pl.__main__ ====================== .. py:module:: plesty.pow_pl.__main__ .. autoapi-nested-parse:: Entry point for running the power-PL experiment as a standalone process. Device addresses and the shared disk are deployment facts and come from the environment: ``HWP_ADDRESS``, ``SPEC_ADDRESS``, ``PM_ADDRESS`` — which the bench serving each device gives the run, see ``setup.yaml`` — and ``PLESTY_DATA``. Measurement tuning lives in ``config/default.yaml``. Typical use: .. code-block:: bash python -m plesty.pow_pl # run with config/default.yaml python -m plesty.pow_pl --config config/local/x.yaml python -m plesty.pow_pl --dry-run # print the plan, connect nothing python -m plesty.pow_pl --resume # continue an interrupted run ``ExperimentCLI`` owns everything that is the same for every experiment — ``--config``, ``--resume``, ``--run-root``, ``--dry-run`` and ``--manifest``, the preflight, the event loop, and the graceful stop. This module declares only what differs: :data:`SCHEMA`, what the run reads from the environment, and how the rig and the experiment are built. :data:`MANIFEST` is the contract. ``python -m plesty.pow_pl --manifest`` prints it, and a console builds this experiment's settings form from it. It and ``config/default.yaml`` must declare the same keys — gate e3 checks that they do. Attributes ---------- .. autoapisummary:: plesty.pow_pl.__main__.SCHEMA plesty.pow_pl.__main__.MANIFEST plesty.pow_pl.__main__.cli plesty.pow_pl.__main__._logger Functions --------- .. autoapisummary:: plesty.pow_pl.__main__.build_devices plesty.pow_pl.__main__.build_experiment Module Contents --------------- .. py:data:: SCHEMA :type: dict[str, list[plesty.lib.device.params.ConfigParameter]] .. py:data:: MANIFEST .. py:data:: cli .. py:data:: _logger .. py:function:: build_devices(args: Any, config: dict[str, Any], skip: frozenset[str]) -> plesty.pow_pl.rig.PowPlRig Build the rig, without the powermeter when the run takes no power reference. Each sub-device's address is read from its own ``_ADDRESS`` variable. Called again on every start-up retry, so an edited ``.env`` or a server started in the meantime is picked up. :param args: The parsed command line. :param config: The measurement configuration. :param skip: Optional sub-devices to build the rig without. .. py:function:: build_experiment(args: Any, config: dict[str, Any], run_root: Optional[str], devices: Any) -> plesty.lib.experiment.Experiment Build the experiment on the rig. A rig the operator let start without its powermeter measures spectra only, so the powermeter block leaves the configuration the plan freezes. :param args: The parsed command line. :param config: The measurement configuration, frozen into the run's plan. :param run_root: Where this run's directory goes. :param devices: The connected rig, or ``None`` for ``--dry-run``.