Skip to content

Commit

Permalink
custom devcontainer
Browse files Browse the repository at this point in the history
Avoid default with NumPy 2.x
  • Loading branch information
clorton committed Nov 22, 2024
1 parent 2a4c133 commit fbb96cf
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"image": "mcr.microsoft.com/devcontainers/python:3.9",
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.debugpy",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-renderers",
"charliermarsh.ruff",
"github.codespace",
"github.copilot",
"github.copilot-chat",
"mechatroner.raincsv",
"vscode-icons-team.vscode-icons"
]
}
},
"postCreateCommand": {
// Run commands after the container is created.
"command": "./.devcontainer/postCreateCommands.sh"
}
}
3 changes: 3 additions & 0 deletions .devcontainer/postCreateCommands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pip install --upgrade pip > /tmp/pip.stdout.log 2> /tmp/pip.stderr.log
pip install uv > /tmp/uv.stdout.log 2> /tmp/uv.stderr.log
uv tool install tox --with tox-uv > /tmp/tox.stdout.log 2> /tmp/tox.stderr.log
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
# Note the order is intentional to avoid multiple passes of the hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.7.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ formats: all
build:
os: ubuntu-22.04
tools:
python: "3"
python: "3.9"
python:
install:
- requirements: docs/requirements.txt
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ include LICENSE
include README.rst
include README.MD

recursive-exclude .devcontainer *
global-exclude *.py[cod] __pycache__/* *.so *.dylib
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Overview
* - package
- |version| |wheel| |supported-versions| |supported-implementations| |commits-since|
.. |docs| image:: https://readthedocs.org/projects/laser-cholera/badge/?style=flat
:target: https://laser-cholera.readthedocs.org/en/latest/
:target: https://laser-cholera.readthedocs.io/en/latest/
:alt: Documentation Status

.. |github-actions| image:: https://github.com/InstituteforDiseaseModeling/laser-cholera/actions/workflows/github-actions.yml/badge.svg
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ basepython =
py310: {env:TOXPYTHON:python3.10}
py311: {env:TOXPYTHON:python3.11}
py312: {env:TOXPYTHON:python3.12}
{bootstrap,clean,check,report,docs,codecov}: {env:TOXPYTHON:python3}
{bootstrap,clean,check,report,docs,codecov}: {env:TOXPYTHON:python3.9}
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
Expand Down

0 comments on commit fbb96cf

Please sign in to comment.