Plesty Documentation

Workspace Setup

Directory layout, key environment variables, and editor setup for PLESTY development.

Directory layout

After pulling a module, the repo structure looks like this:

repos/
  core/
    plesty-sdk/
    plesty-lib/
    plesty-ci/
  hub/
    devices/
      thorlab/
        plesty-pm100d/
    analyzers/
    experiments/
  website/
    plesty-website/
    contributor-guide/
    reports/

Work always happens inside the repo directory. All plesty CLI commands and uv run commands are run from within repos/<group>/<repo>/.

Virtual environment

uv sync creates .venv/ in the repo root. To use the environment:

# Run a command in the env
uv run plesty check

# Or activate it
source .venv/bin/activate
plesty check

The uv run form is preferred — it ensures the correct env without activation.

Key files

File Purpose
pyproject.toml Package metadata, dependencies, [tool.plesty] config
CHANGELOG.md Required by Gate 5; must be updated before each release
.gitlab-ci.yml CI pipeline using plesty-standard-ci component
.git/hooks/pre-push Pre-push hook that runs plesty check before every push
assets/param_schema.json Device parameter definitions (devices only)
assets/op_schema.json Device operation definitions (devices only)

The [tool.plesty] section

pyproject.toml carries module metadata read by plesty check:

[tool.plesty]
standard = "quantum"        # compliance level enforced by pre-push hook and CI
module_type = "device"      # one of: device, experiment, analyzer, core

module_type activates the Device API Pipeline gate (d1) when set to "device".

CI/CD variables

The CI pipeline requires two variables set in GitLab project settings:

Variable Purpose Where to set
CI_BOT_TOKEN Push docs to docs-build branch (Gate 12) Settings → Access Tokens + CI/CD Variables
PYPI_TOKEN Publish to PyPI (Gate 14) Settings → CI/CD Variables

Both must be Masked + Protected and the CI_BOT_TOKEN token requires the Maintainer role.