Skip to content

Commit

Permalink
Refactor overpass to hold higher standards
Browse files Browse the repository at this point in the history
1. Replace requirements.txt with Pipfile
2. Refactor handler.py and auth.py to different submodules each doing one thing and one thing only
3. Add tests!
  • Loading branch information
Azhagu Selvan committed Jan 2, 2020
1 parent 0a12db0 commit ac18df9
Show file tree
Hide file tree
Showing 23 changed files with 676 additions and 195 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ venv/
.installed.cfg
*.egg
*__pycache__*
*pytest_cache*

# Serverless directories
.serverless
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.0
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.8-slim AS base

COPY . /app

WORKDIR /app

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PIPENV_VENV_IN_PROJECT 1
RUN pip install pipenv && \
pipenv install --deploy -d

FROM base AS test
WORKDIR /app
CMD pipenv run pytest
36 changes: 36 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
boto3 = "==1.9.220"
botocore = "==1.12.220"
cachetools = "==3.1.1"
certifi = "==2019.6.16"
chardet = "==3.0.4"
crhelper = "==2.0.3"
docutils = "==0.15.2"
google-auth = "==1.6.3"
idna = "==2.8"
jmespath = "==0.9.4"
kubernetes = "==10.0.1"
oauthlib = "==3.1.0"
pyasn1 = "==0.4.6"
pyasn1-modules = "==0.2.6"
python-dateutil = "==2.8.0"
requests = "==2.22.0"
requests-oauthlib = "==1.2.0"
rsa = "==4.0"
s3transfer = "==0.2.1"
six = "==1.12.0"
urllib3 = "==1.25.3"
PyYAML = "==5.1.2"
websocket_client = "==0.56.0"
pytest = "*"
assertpy = "*"

[requires]
python_version = "3.8"
295 changes: 295 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ac18df9

Please sign in to comment.