Skip to content
Snippets Groups Projects
Commit e042a85a authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'f-mypy' into 'dev'

F mypy

See merge request !66
parents 57f8bdc8 9690bf58
No related branches found
No related tags found
2 merge requests!143Release 0.15.0,!66F mypy
Pipeline #48928 failed
...@@ -29,9 +29,9 @@ variables: ...@@ -29,9 +29,9 @@ variables:
image: $CI_REGISTRY_IMAGE image: $CI_REGISTRY_IMAGE
stages: stages:
- setup
- code_style - code_style
- linting - linting
- setup
- test - test
- deploy - deploy
...@@ -53,6 +53,14 @@ pylint: ...@@ -53,6 +53,14 @@ pylint:
- make lint - make lint
allow_failure: true allow_failure: true
mypy:
tags: [ docker ]
stage: linting
script:
- pip install mypy types-PyYAML types-jsonschema types-requests types-setuptools types-lxml types-python-dateutil
- make mypy
allow_failure: true
# run unit tests # run unit tests
unittest_py3.7: unittest_py3.7:
tags: [ docker ] tags: [ docker ]
...@@ -142,6 +150,7 @@ build-testenv: ...@@ -142,6 +150,7 @@ build-testenv:
stage: setup stage: setup
only: only:
- schedules - schedules
- web
script: script:
- cd unittests/docker - cd unittests/docker
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
......
...@@ -32,7 +32,7 @@ doc: ...@@ -32,7 +32,7 @@ doc:
install: install:
@echo "Not implemented yet, use pip for installation." @echo "Not implemented yet, use pip for installation."
check: style lint check: style lint mypy
.PHONY: check .PHONY: check
style: style:
...@@ -43,6 +43,10 @@ lint: ...@@ -43,6 +43,10 @@ lint:
pylint --unsafe-load-any-extension=y -d all -e E,F src/linkahead/common pylint --unsafe-load-any-extension=y -d all -e E,F src/linkahead/common
.PHONY: lint .PHONY: lint
mypy:
mypy src/linkahead
.PHONY: mypy
unittest: unittest:
tox -r tox -r
.PHONY: unittest .PHONY: unittest
...@@ -7,6 +7,7 @@ deps = . ...@@ -7,6 +7,7 @@ deps = .
pynose pynose
pytest pytest
pytest-cov pytest-cov
mypy
jsonschema>=4.4.0 jsonschema>=4.4.0
setuptools setuptools
commands=py.test --cov=caosdb -vv {posargs} commands=py.test --cov=caosdb -vv {posargs}
......
...@@ -12,4 +12,4 @@ ARG COMMIT="dev" ...@@ -12,4 +12,4 @@ ARG COMMIT="dev"
# TODO Rename to linkahead # TODO Rename to linkahead
RUN git clone -b dev https://gitlab.indiscale.com/caosdb/src/caosdb-pylib.git linkahead-pylib && \ RUN git clone -b dev https://gitlab.indiscale.com/caosdb/src/caosdb-pylib.git linkahead-pylib && \
cd linkahead-pylib && git checkout $COMMIT && pip3 install . cd linkahead-pylib && git checkout $COMMIT && pip3 install .
RUN pip3 install recommonmark sphinx-rtd-theme RUN pip3 install recommonmark sphinx-rtd-theme mypy
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment