-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from windpioneers/fix/update-config
OPS:Update deprecated spaceship configuration values
- Loading branch information
Showing
6 changed files
with
136 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.zsh_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM windpioneers/gdal-python:button-gdal-2.4.1-python-3.9-dev | ||
|
||
# Tell zsh where you want to store history | ||
# We leave you to decide, but if you put this into a folder that's been mapped | ||
# into the container, then history will persist over container rebuilds :) | ||
# | ||
# !!!IMPORTANT!!! | ||
# Make sure your .zsh_history file is NOT committed into your repository, as it can contain | ||
# sensitive information. So in this case, you should add | ||
# .devcontainer/.zsh_history | ||
# to your .gitignore file. | ||
# | ||
ENV HISTFILE="workspace/.devcontainer/.zsh_history" | ||
|
||
# Install poetry, cache poetry dependencies | ||
# | ||
# Poetry usage in docker: https://stackoverflow.com/a/54763270/3556110 | ||
# Caching package downloads with buildkit: https://pythonspeed.com/articles/docker-cache-pip-downloads/ | ||
# Using pipx for python development utilities: https://github.com/microsoft/vscode-dev-containers/blob/main/containers/python-3/README.md#installing-or-updating-python-utilities | ||
# | ||
# Why don't we do this for you in the gdal-python image??? | ||
# - we may need to move the poetry version quicker than the base image | ||
# - because we can't conditionally mount a cache (for dev/slim images) | ||
# - poetry and dependencies can be agony, so we want per-project control at least for now | ||
# - if a repo is not using poetry, it doesn't make sense for us to force the presence of the tool | ||
USER vscode | ||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python | ||
ENV PATH "/home/vscode/.poetry/bin:$PATH" | ||
RUN poetry config virtualenvs.create false | ||
# | ||
# It is possible to install dependencies with a cache, like this: | ||
# COPY pyproject.toml poetry.lock ./ | ||
# RUN --mount=type=cache,id=dev-cache,target=/home/vscode/.cache \ | ||
# poetry install --no-interaction --no-ansi | ||
# | ||
# However, it may be more reliable or convenient to do poetry install as a postcreate command (see devcontainer.json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/python-3 | ||
{ | ||
"name": "gdal-python", | ||
"build": { | ||
"dockerfile": "../Dockerfile", | ||
"context": "..", | ||
"args": { | ||
"BASE_IMAGE": "mcr.microsoft.com/vscode/devcontainers/python:0-3.9", | ||
"GDAL_VERSION": "2.4.1" | ||
} | ||
}, | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"austin.mode": "Wall time", | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"jupyter.widgetScriptSources": ["jsdelivr.com", "unpkg.com"], | ||
"prettier.prettierPath": "/usr/local/prettier", | ||
"python.defaultInterpreterPath": "/usr/local/bin/python", | ||
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", | ||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black", | ||
"python.formatting.provider": "black", | ||
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", | ||
"python.languageServer": "Pylance", | ||
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit", | ||
"python.linting.enabled": true, | ||
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", | ||
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", | ||
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", | ||
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", | ||
// Line length to match black settings | ||
// Disabling specific messages: | ||
// - To find the details do: /usr/local/py-utils/bin/pylint --list-msgs | ||
// - Disable missing-module-docstring (C0114) because we don't document modules routinely, just their members | ||
// - Disable invalid-name (C0103) because pylint thinks that eg 'x', 'df', 'np' are invalid due to their lengths | ||
"python.linting.pylintArgs": [ | ||
"--max-line-length=120", | ||
"--disable=missing-module-docstring,invalid-name" | ||
], | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", | ||
"python.pythonPath": "/usr/local/bin/python", | ||
"terminal.integrated.defaultProfile.linux": "zsh" | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"esbenp.prettier-vscode", | ||
"irongeek.vscode-env", | ||
"mikestead.dotenv", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-toolsai.jupyter", | ||
"ms-toolsai.jupyter-renderers", | ||
"ms-toolsai.jupyter-keymap", | ||
"ms-vsliveshare.vsliveshare", | ||
"p403n1x87.austin-vscode", | ||
"ritwickdey.liveserver" | ||
], | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [80, 443, 8000], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": ". .devcontainer/postcreate.sh", | ||
|
||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode", | ||
|
||
// Allow ptrace based debuggers (like austin) to work in the container | ||
"runArgs": [ | ||
"--env-file", | ||
"${localWorkspaceFolder}/.env", | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", | ||
"seccomp=unconfined" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/zsh | ||
|
||
# ..Install dependencies here if required... | ||
|
||
|
||
# Install precommit hooks | ||
pre-commit install && pre-commit install -t commit-msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
.idea/ | ||
.idea/ | ||
|
||
# Environments | ||
.env* | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters