DiamondLightSource / DiamondLightSource/dodal

Load dials env as a pre-launch task for tests

Open
#437 5 comments 0 reactions 0 assignees View on GitHub
Developer Experience
Dominant language
Python
Stars
5
Forks
13
Avg merge
3d 2h
Merged PRs (30d)
10

Description

As a developer, I want to run the unit tests via the vscode GUI without having to run the `load_dials_env` prelaunch task, as it is currently configured to do, so that I can develop against beamlines that are unrelated to dials without extra setup and develop in a non-dls_sw environment (e.g. my laptop or a devcontainer).

See below snippet from `launch.json`:

```json
...
"purpose": [
"debug-test"
],
"console": "integratedTerminal",
"preLaunchTask": "load_dials_env",
"env": {
// The default config in setup.cfg's "[tool:pytest]" adds coverage.
// Cannot have coverage and debugging at the same time.
// https://github.com/microsoft/vscode-python/issues/693
"PYTEST_ADDOPTS": "--no-cov"
},
...
```

@DominicOram @dperl-dls is the dials env still a requirement for dodal? If so then maybe we can make `load_dials_env` be a no-op if the environment is unavailable.

## Acceptance Criteria
* The vscode test launch config no longer requires the fake dials env to start

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.