Skip to content

Commit

Permalink
dev: added dockerfiles and devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewMckee4 committed Aug 10, 2024
1 parent e6c5d13 commit bf8bfbf
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .devcontainer/Dockerfile.macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ghcr.io/codespaces/macOS:latest

RUN brew install [email protected]

WORKDIR /usr/src/app

COPY requirements-dev.txt .

RUN pip3 install --upgrade pip

RUN pip3 install --no-cache-dir -r requirements-dev.txt

COPY . .

CMD ["bash"]
13 changes: 13 additions & 0 deletions .devcontainer/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.12-slim

WORKDIR /usr/src/app

RUN pip install --upgrade pip

COPY requirements-dev.txt ./

RUN pip install --no-cache-dir -r requirements-dev.txt

COPY . .

CMD ["bash"]
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM mcr.microsoft.com/windows/servercore:ltsc2022

RUN powershell -Command \
Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe -OutFile python-installer.exe ; \
Start-Process -Wait -FilePath python-installer.exe -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1' ; \
Remove-Item -Force python-installer.exe

WORKDIR /workspace

COPY requirements-dev.txt .

RUN pip install --upgrade pip

RUN pip install --no-cache-dir -r requirements-dev.txt

COPY . .

CMD ["powershell"]
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Python Dev Container",
"dockerFile": "./Dockerfile.ubuntu",
"customizations": {
"vscode": {
"settings": {
"python.pythonPath": "/usr/bin/python3"
},
"extensions": [
"ms-python.python"
]
}
}
}
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ dev = [
"ruff",
"mypy",
"isort",
"pytest",
"hypothesis",
"pytest-randomly",
"pytest-xdist",
]

docs = [
Expand Down
9 changes: 9 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pytest
hypothesis
pytest-randomly
pytest-xdist
typing_extensions
maturin
ruff
mypy
isort
3 changes: 3 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdocs
mkdocstrings-python
mkdocs-material

0 comments on commit bf8bfbf

Please sign in to comment.