Skip to content

Commit

Permalink
Coverage and Makefile improvements (#267)
Browse files Browse the repository at this point in the history
* Update Makefile so PYTHONPATH isn't necessary

* Add PYTHONPATH as an exported var in Makefile

* Remove echo
  • Loading branch information
Hoid authored Oct 10, 2022
1 parent 0212f6f commit 30ced9a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[run]
include =
src/**

omit =
**/__init__.py
**/_version.py
src/dug/config.py
src/dug/hookspecs.py
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DOCKER_OWNER = helxplatform
DOCKER_APP = dug
DOCKER_TAG = ${VERSION}
DOCKER_IMAGE = ${DOCKER_OWNER}/${DOCKER_APP}:$(DOCKER_TAG)
export PYTHONPATH = $(shell echo ${PWD})/src

.DEFAULT_GOAL = help

Expand All @@ -27,13 +28,15 @@ clean:
install:
${PYTHON} -m pip install --upgrade pip
${PYTHON} -m pip install -r requirements.txt
${PYTHON} -m pip install .

#test: Run all tests
test:
# ${PYTHON} -m flake8 src
${PYTHON} -m pytest --doctest-modules src
${PYTHON} -m pytest tests
coverage run -m pytest tests

coverage:
coverage report

#build: Build Docker image
build:
Expand Down

0 comments on commit 30ced9a

Please sign in to comment.