Skip to content

Commit 002a1c5

Browse files
authored
Drop support for developing in a local venv in favour of devcontainers (#249)
We have unofficially been opinionated about devcontainers for a few months now, and have been directing support requests from people using venvs to start by making one. Since supporting devcontainers is now a matter of policy in all-but-name, it should be documented and referred to in future.
2 parents 6efc60c + 15ae31b commit 002a1c5

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# 20. Support devcontainers as the opinionated way to contribute
2+
3+
Date: 2025-04-07
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
The Python copier template is growing more opinionated over time. It includes a `.devcontainer` and `.vscode` directory committed to version control, providing out-of-box configuration for contributors to set up development environments. In general we have preferred contributors to use the devcontainer rather than a local [venv](https://docs.python.org/3/library/venv.html), as it means development takes place in a consistent environment and it is much easier to support contributors and diagnose their problems by locally reproducing their environments. We can also vend a consistent, tested set of recommended vscode plugins.
12+
13+
## Decision
14+
15+
[Devcontainers](https://code.visualstudio.com/docs/devcontainers/containers) are the opinionated way to contribute to projects based on this template. The template will be developed, maintained and tested on the assumption that a contributor is using a devcontainer.
16+
17+
## Consequences
18+
19+
The Python copier template development environment is no longer guaranteed to work outside of a devcontainer. Support is not guaranteed for contributors not using a devcontainer, in the first instance requests for such support should be answered with gentle encouragement to adopt them.
20+
21+
This does not mean non-devcontainer environments are forbidden or designed out, but it does mean the individual contributor is responsible for maintaining such environments, making them work and dealing with any breaking changes themselves. The devcontainer environment is provided for contributors who want something that works out-of-box and is supported, so they can get started quickly.

docs/how-to/dev-install.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,7 @@ First clone the repository locally using [Git](https://git-scm.com/downloads). T
88

99
## Install dependencies
1010

11-
You can choose to either develop on the host machine using a `venv` (which requires python 3.10 or later) or to run in a container under [VSCode](https://code.visualstudio.com/)
12-
13-
<!-- https://sphinx-design.readthedocs.io/en/latest/tabs.html# -->
14-
::::{tab-set}
15-
16-
:::{tab-item} Local virtualenv
17-
```
18-
python3 -m venv venv
19-
source venv/bin/activate
20-
pip install -e '.[dev]'
21-
```
22-
:::
23-
24-
:::{tab-item} VSCode devcontainer
11+
It is recommended that developers use a [vscode devcontainer](https://code.visualstudio.com/docs/devcontainers/containers). This repository contains configuration to set up a containerized development environment that suits its own needs.
2512

2613
Ensure you have the [vscode devcontainer extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) installed.
2714

@@ -32,10 +19,8 @@ code .
3219
```
3320

3421
Click on 'Reopen in Container' when prompted on startup or, if vscode is already running, open the command menu with CTRL+SHIFT+P, search for and run 'Reopen in Container'.
35-
Open a new terminal
36-
:::
3722

38-
::::
23+
Open a new terminal
3924

4025
## Build and test
4126

0 commit comments

Comments
 (0)