Skip to content

Commit

Permalink
Initial release of data sanitization service and Helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrossi committed May 28, 2024
0 parents commit 668beab
Show file tree
Hide file tree
Showing 46 changed files with 3,226 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
exclude = .git,__pycache__,__init__.py,.mypy_cache,.pytest_cache,.venv
138 changes: 138 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
23 changes: 23 additions & 0 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
28 changes: 28 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.flake8
.gitignore
.openapi-generator-ignore
Dockerfile
README.md
docker-compose.yaml
openapi.yaml
pyproject.toml
requirements.txt
setup.cfg
src/openapi_server/apis/__init__.py
src/openapi_server/apis/job_api.py
src/openapi_server/apis/job_api_base.py
src/openapi_server/impl/__init__.py
src/openapi_server/main.py
src/openapi_server/models/__init__.py
src/openapi_server/models/common_job.py
src/openapi_server/models/common_job_executor.py
src/openapi_server/models/extra_models.py
src/openapi_server/models/job.py
src/openapi_server/models/job_status.py
src/openapi_server/models/k_anonymity_job.py
src/openapi_server/models/l_diversity_job.py
src/openapi_server/models/spark_pod_spec.py
src/openapi_server/models/submit_job200_response.py
src/openapi_server/security_api.py
tests/conftest.py
tests/test_job_api.py
1 change: 1 addition & 0 deletions .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.4.0
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM python:3.7 AS builder

WORKDIR /usr/src/app

RUN python3 -m venv /venv
ENV PATH="/venv/bin:$PATH"

RUN pip install --upgrade pip

COPY . .
RUN pip install --no-cache-dir .


# FROM python:3.7 AS test_runner
# WORKDIR /tmp
# COPY --from=builder /venv /venv
# COPY --from=builder /usr/src/app/templates templates
# COPY --from=builder /usr/src/app/tests tests
# ENV PATH=/venv/bin:$PATH

# # install test dependencies
# RUN pip install pytest

# # run tests
# RUN pytest tests


FROM python:3.7 AS service
WORKDIR /root/app/site-packages
# COPY --from=test_runner /venv /venv
# COPY --from=test_runner /tmp/templates templates
COPY --from=builder /venv /venv
COPY --from=builder /usr/src/app/templates templates
ENV PATH=/venv/bin:$PATH
Loading

0 comments on commit 668beab

Please sign in to comment.