Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WisamAbbasi committed Sep 8, 2023
1 parent 768d35a commit 9b2adfd
Show file tree
Hide file tree
Showing 15 changed files with 359 additions and 309 deletions.
2 changes: 2 additions & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bandit]
exclude: /tests,/training
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
README.*
docs/
.git/
tests/
.travis.yml
.idea/
samples/*.wav
.DS_Store
__pycache__/
106 changes: 106 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# 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/
*.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/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# 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/
.idea/
.DS_Store
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: python
python:
- 3.6
services:
- docker
install:
- docker build -t max-audio-classifier .
- docker run -it -d -p 5000:5000 max-audio-classifier
- pip install -r requirements-test.txt
before_script:
- flake8 . --max-line-length=127
- bandit -r .
- sleep 30
script:
- pytest tests/test.py
4 changes: 2 additions & 2 deletions api/metadata.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from maxfw.core import MAX_API, METADATA_SCHEMA, MetadataAPI

from core.model import ModelWrapper
from maxfw.core import MAX_API, MetadataAPI, METADATA_SCHEMA


class ModelMetadataAPI(MetadataAPI):

@MAX_API.marshal_with(METADATA_SCHEMA)
def get(self):
"""Return the metadata associated with the model"""
Expand Down
Loading

0 comments on commit 9b2adfd

Please sign in to comment.