Skip to content

Commit c702687

Browse files
authored
Adds codespaces support, closes HypothesisWorks#2735 (HypothesisWorks#2880)
1 parent af012ea commit c702687

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

.devcontainer/devcontainer.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "HypothesisWorks/hypothesis",
3+
"image": "python:3.8-slim-buster",
4+
5+
"settings": {
6+
"python.pythonPath": "${workspaceFolder}/.venv/bin/python3",
7+
},
8+
9+
// After container is created, we install all the requirements,
10+
// and show what commands there are in our own tooling:
11+
"postCreateCommand": "apt-get update && apt-get install -y make shellcheck && make check-installed",
12+
}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ htmlcov
3232
build
3333
dist
3434
.doctrees/
35+
.venv/
3536

3637
# encrypted files
3738
secrets.tar

CONTRIBUTING.rst

+10
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ You may wish to do all of this in a
6161
Will create an isolated environment where you can install and try out
6262
Hypothesis without affecting your system packages.
6363

64+
----------
65+
Codespaces
66+
----------
67+
68+
We support `GitHub Codespaces <https://github.com/features/codespaces>`_.
69+
It really helps us to make the contribution process easier.
70+
71+
It is pre-configured to install all the requirements for you.
72+
The only thing left for a contributor is to press "Open with Codespaces" button.
73+
6474
-----------------------
6575
Copyright and Licensing
6676
-----------------------

build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ SCRIPTS="$ROOT/tooling/scripts"
1717
# shellcheck source=tooling/scripts/common.sh
1818
source "$SCRIPTS/common.sh"
1919

20-
if [ -n "${GITHUB_ACTIONS-}" ] ; then
21-
# We're on GitHub Actions and already set up a suitable Python
20+
if [ -n "${GITHUB_ACTIONS-}" ] || [ -n "${CODESPACES-}" ] ; then
21+
# We're on GitHub Actions or Codespaces and already set up a suitable Python
2222
PYTHON=$(command -v python)
2323
else
2424
# Otherwise, we install it from scratch

0 commit comments

Comments
 (0)