Skip to content

Commit 603a5a4

Browse files
committed
ran linter, added devcontainer and launch config for VS Code
1 parent aeb5ac4 commit 603a5a4

15 files changed

+1161
-1084
lines changed

.devcontainer/Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#-------------------------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+
#-------------------------------------------------------------------------------------------------------------
5+
6+
# Update the VARIANT arg in devcontainer.json to pick a Python version: 3, 3.8, 3.7, 3.6
7+
# To fully customize the contents of this image, use the following Dockerfile instead:
8+
# https://github.com/microsoft/vscode-dev-containers/tree/v0.122.1/containers/python-3/.devcontainer/base.Dockerfile
9+
ARG VARIANT="3"
10+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
11+
12+
# [Optional] If your requirements rarely change, uncomment this section to add them to the image.
13+
#
14+
# COPY requirements.txt /tmp/pip-tmp/
15+
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
16+
# && rm -rf /tmp/pip-tmp
17+
18+
# [Optional] Uncomment this section to install additional packages.
19+
#
20+
# RUN apt-get update \
21+
# && export DEBIAN_FRONTEND=noninteractive \
22+
# && apt-get -y install --no-install-recommends <your-package-list-here>
23+

.devcontainer/devcontainer.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.122.1/containers/python-3
3+
{
4+
"name": "Python 3",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"context": "..",
8+
// Update 'VARIANT' to pick a Python version. Rebuild the container
9+
// if it already exists to update. Available variants: 3, 3.6, 3.7, 3.8
10+
"args": { "VARIANT": "3.8" }
11+
},
12+
13+
// Set *default* container specific settings.json values on container create.
14+
"settings": {
15+
"terminal.integrated.shell.linux": "/bin/bash",
16+
"python.pythonPath": "/usr/local/bin/python",
17+
"python.linting.enabled": true,
18+
"python.linting.pylintEnabled": true,
19+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
20+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
21+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
22+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
23+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
24+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
25+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
26+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
27+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
28+
},
29+
30+
// Add the IDs of extensions you want installed when the container is created.
31+
"extensions": [
32+
"ms-python.python"
33+
],
34+
35+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
36+
// "forwardPorts": [],
37+
38+
// Use 'postCreateCommand' to run commands after the container is created.
39+
"postCreateCommand": "pip3 install --user -r requirements.txt",
40+
41+
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
42+
// "remoteUser": "vscode"
43+
}

.gitignore

+47-47
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
__pycache__/
2-
*.py[cod]
3-
*$py.class
4-
5-
*.so
6-
7-
objectdb
8-
9-
#dists
10-
.Python
11-
build/
12-
develop-eggs/
13-
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
23-
share/python-wheels/
24-
*.egg-info/
25-
.installed.cfg
26-
*.egg
27-
MANIFEST
28-
29-
# Unit test / coverage reports
30-
htmlcov/
31-
.tox/
32-
.nox/
33-
.coverage
34-
.coverage.*
35-
.cache
36-
nosetests.xml
37-
coverage.xml
38-
*.cover
39-
*.py,cover
40-
.hypothesis/
41-
.pytest_cache/
42-
cover/
43-
44-
# sphinx
45-
docs/_build/
46-
47-
# virtualenv
1+
__pycache__/
2+
*.py[cod]
3+
*$py.class
4+
5+
*.so
6+
7+
objectdb
8+
9+
#dists
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# Unit test / coverage reports
30+
htmlcov/
31+
.tox/
32+
.nox/
33+
.coverage
34+
.coverage.*
35+
.cache
36+
nosetests.xml
37+
coverage.xml
38+
*.cover
39+
*.py,cover
40+
.hypothesis/
41+
.pytest_cache/
42+
cover/
43+
44+
# sphinx
45+
docs/_build/
46+
47+
# virtualenv
4848
.env

0 commit comments

Comments
 (0)