Contributing¶
Contributions are welcome — new procedures, instrument drivers, bug fixes and documentation.
Set up a dev environment¶
git clone https://github.com/nanolab-fcfm/laser_setup.git
cd laser_setup
uv sync # runtime + dev dependencies, Python 3.12 (pinned)
Run the app and tests through uv so nothing is installed system-wide:
Workflow¶
- Create a branch off
main. - Make your change. Keep edits consistent with the surrounding code.
-
Lint:
-
Build the docs if you touched them:
-
Open a pull request describing the change.
Code style¶
flake8:max-line-length = 100,max-complexity = 15.F401(unused import) is ignored in__init__.pyfiles (which re-export symbols).- Add module-level loggers:
log = logging.getLogger(__name__)with aNullHandler, matching existing modules. - Build on PyMeasure idioms; prefer config (YAML) over hard-coding.
Adding things¶
| You want to add… | Read |
|---|---|
| A measurement | Creating a New Procedure |
| An instrument | Adding an Instrument |
| A parameter | Defining Parameters |
| A sequence / script | Registering in YAML |
Dependencies¶
- Runtime deps →
[project].dependenciesinpyproject.toml. - Dev tools → the
devdependency group; docs tools → thedocsgroup. -
After editing dependencies, refresh the lockfile:
Documentation¶
The docs are MkDocs Material in docs/. Prose
lives in Markdown; keep examples runnable and link generously between pages.
Preview locally with:
Versioning¶
The version is laser_setup.__version__ (exposed dynamically in
pyproject.toml). Bump it in laser_setup/__init__.py when releasing.