Commit d020ba22 authored by Alyssa's avatar Alyssa Committed by Tao Feng

Add mypy coverage to test files and cleanup (#369)

parent 664f39f4
...@@ -6,7 +6,7 @@ matrix: ...@@ -6,7 +6,7 @@ matrix:
env: env:
- IS_DEPLOYABLE=true - IS_DEPLOYABLE=true
install: install:
- pip3 install -r requirements3.txt - pip3 install -r requirements.txt
- pip3 install codecov - pip3 install codecov
script: script:
- make test - make test
......
...@@ -18,7 +18,7 @@ lint: ...@@ -18,7 +18,7 @@ lint:
.PHONY: mypy .PHONY: mypy
mypy: mypy:
mypy --ignore-missing-imports --follow-imports=skip --strict-optional --warn-no-return amundsen_application mypy --ignore-missing-imports --follow-imports=skip --strict-optional --warn-no-return .
.PHONY: test .PHONY: test
test: test_unit lint mypy test: test_unit lint mypy
......
...@@ -16,7 +16,7 @@ $ cd ../../ ...@@ -16,7 +16,7 @@ $ cd ../../
# Install python resources # Install python resources
$ python3 -m venv venv $ python3 -m venv venv
$ source venv/bin/activate $ source venv/bin/activate
$ pip3 install -r requirements3.txt $ pip3 install -r requirements.txt
$ python3 setup.py install $ python3 setup.py install
# Start server # Start server
......
...@@ -12,8 +12,8 @@ FROM python:3.7-slim as base ...@@ -12,8 +12,8 @@ FROM python:3.7-slim as base
WORKDIR /app WORKDIR /app
RUN pip3 install gunicorn RUN pip3 install gunicorn
COPY requirements3.txt /app/requirements3.txt COPY requirements.txt /app/requirements.txt
RUN pip3 install -r requirements3.txt RUN pip3 install -r requirements.txt
COPY --from=node-stage /app /app COPY --from=node-stage /app /app
COPY . /app COPY . /app
......
...@@ -9,7 +9,7 @@ ignore = NONE ...@@ -9,7 +9,7 @@ ignore = NONE
max-line-length = 120 max-line-length = 120
[tool:pytest] [tool:pytest]
addopts = --cov=amundsen_application --cov-fail-under=70 --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html -vvv addopts = --cov=amundsen_application --cov-fail-under=75 --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html -vvv
[coverage:run] [coverage:run]
branch = True branch = True
......
...@@ -30,7 +30,7 @@ def build_js() -> None: ...@@ -30,7 +30,7 @@ def build_js() -> None:
build_js() build_js()
requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements3.txt') requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')
with open(requirements_path) as requirements_file: with open(requirements_path) as requirements_file:
requirements = requirements_file.readlines() requirements = requirements_file.readlines()
......
...@@ -7,7 +7,7 @@ app = flask.Flask(__name__) ...@@ -7,7 +7,7 @@ app = flask.Flask(__name__)
app.config.from_object('amundsen_application.config.LocalConfig') app.config.from_object('amundsen_application.config.LocalConfig')
def mock_get_profile_url(app): def mock_get_profile_url(app: str) -> str:
return 'testUrl' return 'testUrl'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment