Skip to content

Commit

Permalink
remove configs, fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
wesker-albert committed Sep 2, 2023
1 parent a0ced2e commit c777f44
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8,960 deletions.
6 changes: 0 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
ARG VARIANT=3.11-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}

ARG NODE_VER=16
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VER} 2>&1"

ARG NPM_VER=9.7.2
RUN su vscode -c "npm install -g npm@${NPM_VER}"

ARG PIPX_VER=1.2.0
RUN pip3 install pipx==${PIPX_VER}

Expand Down
28 changes: 11 additions & 17 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "3.11-bullseye",
"NODE_VER": "16",
"NPM_VER": "9.7.2",
"PIPX_VER": "1.2.0",
"POETRY_VER": "1.5.1"
}
Expand All @@ -30,10 +28,6 @@
"coverage-gutters.showLineCoverage": true,
"emeraldwalk.runonsave": {
"commands": [
{
"match": "package-lock.json|package.json",
"cmd": "make init_node"
},
{
"match": "poetry.lock|pyproject.toml",
"cmd": "make init_poetry"
Expand All @@ -56,8 +50,7 @@
"\"kwargs\" is not accessed"
],
"files.associations": {
".env": "env",
".env.*": "env"
".env*": "env"
},
"gitlens.currentLine.enabled": false,
"isort.args": [
Expand All @@ -69,6 +62,13 @@
"mypy.targets": [
"cibo/"
],
"pylint.args": [
"--rcfile",
"pyproject.toml"
],
"pylint.path": [
"/usr/local/py-utils/venvs/poetry/bin/pylint"
],
"python.analysis.autoImportCompletions": true,
"python.analysis.fixAll": [
"source.convertImportFormat",
Expand All @@ -78,15 +78,6 @@
"python.analysis.typeCheckingMode": "off",
"python.createEnvironment.contentButton":"hide",
"python.defaultInterpreterPath": "/usr/local/py-utils/venvs/poetry/bin/python3.11",
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.linting.pylintArgs": [
"--rcfile",
"pyproject.toml"
],
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "/usr/local/py-utils/venvs/poetry/bin/pylint",
"python.testing.pytestArgs": [
"tests"
],
Expand All @@ -107,6 +98,7 @@
"source.fixAll": true,
"source.organizeImports": true
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.rulers": [
88
Expand All @@ -126,7 +118,9 @@
"IronGeek.vscode-env",
"magicstack.MagicPython",
"matangover.mypy",
"ms-python.black-formatter",
"ms-python.isort",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode.test-adapter-converter",
Expand Down
7 changes: 0 additions & 7 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ sed -i "s/plugins=(git)/plugins=(git zsh-autosuggestions zsh-shift-select zsh-sy
# redirect the creation of __pycache__ dirs to tmp
echo -e "export PYTHONPYCACHEPREFIX=/tmp" >> ~/.zshrc

# install node dependencies
npm install
# move the node_modules dir up one level
mv /home/vscode/cibo/node_modules /home/vscode/
# add modules to PATH
echo -e "export PATH=/home/vscode/node_modules/.bin:$PATH" >> ~/.zshrc

# disable poetry venv creation
poetry config virtualenvs.create false
# install python dependencies
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ __pycache__
.vscode
*.db
coverage.xml
node_modules
requirements.txt
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
.PHONY: init init_node init_poetry python test_all test_verbose coverage safety_check \
.PHONY: init init_poetry python test_all test_verbose coverage safety_check \
lint type_check formatting test coverage_ci start

.DEFAULT_GOAL := init


# Container

init: init_node init_poetry

init_node: package-lock.json
init: init_poetry

init_poetry: ../.poetry_check

package-lock.json: package.json
npm install
@rm -rf /home/vscode/node_modules
@mv /home/vscode/cibo/node_modules /home/vscode/
@touch $@

poetry.lock: pyproject.toml
poetry lock
@touch $@
Expand Down
Loading

0 comments on commit c777f44

Please sign in to comment.