Skip to content

Commit

Permalink
add default developer settings
Browse files Browse the repository at this point in the history
fix git credential sharing

Fix dubious directory ownership

fix submodules and poetry proj

fix safe dirs in git

update deps and poetry install by default
  • Loading branch information
tjdcs committed Feb 15, 2024
1 parent 2411ebd commit a78894b
Show file tree
Hide file tree
Showing 12 changed files with 3,569 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
"ms-python.isort",
"ms-toolsai.jupyter",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"streetsidesoftware.code-spell-checker",
"charliermarsh.ruff",
"njpwerner.autodocstring",
"tamasfe.even-better-toml",
"p403n1x87.austin-vscode"
]
}
},
}
}
2 changes: 1 addition & 1 deletion .devcontainer/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/devcontainers/python:3.12
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -y git git-lfs --no-install-recommends && \
apt-get install -y git git-lfs austin --no-install-recommends && \
pipx install poetry

RUN apt-get autoremove -y && \
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/scripts/postcreate.zsh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!zsh

git config --global submodule.recurse true
cd /workspaces/DevContainer
poetry install
6 changes: 5 additions & 1 deletion .devcontainer/scripts/poststart.zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!zsh

# https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
# https://github.com/microsoft/vscode-remote-release/issues/7923
git config --global --add safe.directory .

git fetch
git status -sb -uno
git status -sb -uno
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "colour"]
path = colour
branch = develop
url = https://github.com/colour-science/colour.git
[submodule "colour-datasets"]
path = colour-datasets
branch = develop
Expand All @@ -10,3 +6,7 @@
path = colour-specio
branch = main
url = https://github.com/colour-science/colour-specio.git
[submodule "colour-science"]
path = colour-science
url = https://github.com/colour-science/colour.git
branch = develop
111 changes: 111 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"rewrap.reformat": true,
"rewrap.autoWrap.enabled": true,
"editor.detectIndentation": false,
"editor.wrappingIndent": "indent",
"editor.rulers": [
80
],
"editor.formatOnSave": true,
"editor.renderWhitespace": "all",
"python.testing.pytestEnabled": true,
"autoDocstring.docstringFormat": "numpy",
"python.languageServer": "Pylance",
"python.analysis.indexing": true,
"python.analysis.completeFunctionParens": true,
"cSpell.userWords": [
"aeropress",
"ASTM",
"astype",
"baudrate",
"Colour",
"colourspace",
"COLOURSPACES",
"fluorilon",
"greyscale",
"gridspec",
"icvfx",
"lambertian",
"loggable",
"matplotlib",
"Munsell",
"ndarray",
"portafilter",
"protobuf",
"scipy",
"seperately",
"sklearn",
"specio",
"Spectroradiometers",
"tristimulus",
"whitepoint"
],
"[python]": {
"editor.formatOnType": true,
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.analysis.typeCheckingMode": "basic",
"python.analysis.logLevel": "Warning",
"python.analysis.autoFormatStrings": true,
"python.analysis.packageIndexDepths": [
{
"name": "colour",
"depth": 3,
"includeAllSymbols": false
},
{
"name": "colour_datasets",
"depth": 3,
"includeAllSymbols": false
},
{
"name": "numpy",
"depth": 3
},
{
"name": "sklearn",
"depth": 3
},
{
"name": "matplotlib",
"depth": 40,
"includeAllSymbols": true
},
{
"name": "scipy",
"depth": 3
},
{
"name": "django",
"depth": 2
},
{
"name": "flask",
"depth": 2
}
],
"files.exclude": {
"**/__pycache__": true,
"**/.coverage": true,
"**/.coveragerc": true,
"**/.DS_Store": true,
"**/.git": false,
"**/.hg": true,
"**/.idea": true,
"**/.ipynb_checkpoints": true,
"**/.mypy_cache": true,
"**/.pytest_cache": true,
"**/.ruff_cache": true,
"**/.svn": true,
"**/CVS": true,
"**/Thumbs.db": true
},
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"isort.importStrategy": "fromEnvironment",
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
}
1 change: 0 additions & 1 deletion README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
# DevContainer
2 changes: 1 addition & 1 deletion colour-specio
Submodule colour-specio updated 1 files
+1 −1 pyproject.toml
Loading

0 comments on commit a78894b

Please sign in to comment.