From d6bbe447fd503078ab58f8599b2bffe30f040274 Mon Sep 17 00:00:00 2001 From: Bryan Harter <41062454+bryan-harter@users.noreply.github.com> Date: Thu, 14 Mar 2024 23:51:55 +0000 Subject: [PATCH] Adding devcontainer tools for easier development on Github --- .devcontainer/Dockerfile | 5 +++++ .devcontainer/devcontainer.json | 24 ++++++++++++++++++++++++ setup.cfg | 3 +++ 3 files changed, 32 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..b66eaba --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,5 @@ +# OS +FROM mcr.microsoft.com/devcontainers/python:3.11 + +# This installs a graphical interface so we can plot the data if needed +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get install -y libgtk-3-dev diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..a702593 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,24 @@ +{ + "name": "imap_processing", + "build": { + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/desktop-lite:1": { + "version": "latest" + } + }, + "forwardPorts": [6080], + //Pip install the requriements, and then install the pre-commit hooks + "postCreateCommand": "pip install -e .[tests,dev] && pre-commit install", + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python" + ], + "settings": { + "python.defaultInterpreterPath": "/usr/local/bin/python" + } + } + } +} \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 2a515ac..788908d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,6 +47,9 @@ docs = sphinx-automodapi sphinx-copybutton sphinx_rtd_theme +dev = + ipython + pre-commit [tool:pytest] minversion = 3.9