diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ac8142c..2502a24 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -69,13 +69,14 @@ jobs: run: | make test - - name: Report test-coverage to DeepSource - run: | - # Install the CLI - curl https://deepsource.io/cli | sh + # #2: I get DEEPSOURCE_DSN not set (or) is empty despite seting. Giving up for now. + # - name: Report test-coverage to DeepSource + # run: | + # # Install the CLI + # curl https://deepsource.io/cli | sh - # Send the report to DeepSource - ./bin/deepsource report --analyzer test-coverage --key python --value-file .coverage + # # Send the report to DeepSource + # ./bin/deepsource report --analyzer test-coverage --key python --value-file .coverage deploy: needs: @@ -84,7 +85,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: hello world + - name: Environment run: | echo "::group::Environment info" echo github.event_name = ${{ github.event_name }} diff --git a/Makefile b/Makefile index 8c97c6f..3b575f4 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,9 @@ .PRECIOUS: .SUFFIXES: -SHELL:=/bin/bash -e -o pipefail +SHELL:=/bin/bash -e -o pipefail -O globstar SELF:=$(firstword $(MAKEFILE_LIST)) -PY_VERSION:=3.10 -VE_DIR=venv/${PY_VERSION} - TEST_DIRS:=tests DOC_TESTS:=src ./README.md @@ -30,26 +27,26 @@ help: #=> devready: create venv, install prerequisites, install pkg in develop mode .PHONY: devready devready: - make ${VE_DIR} && source ${VE_DIR}/bin/activate && make develop + make venv && source venv/bin/activate && make develop @echo '#################################################################################' - @echo '### Do not forget to `source ${VE_DIR}/bin/activate` to use this environment ###' + @echo '### Do not forget to `source venv/bin/activate` to use this environment ###' @echo '#################################################################################' #=> venv: make a Python 3 virtual environment -venv: ${VE_DIR} -${VE_DIR}: venv/%: - python$* -mvenv $@; \ +.PHONY: venv +venv: + python3 -mvenv $@; \ source $@/bin/activate; \ python -m ensurepip --upgrade; \ pip install --upgrade pip setuptools wheel #=> develop: install package in develop mode -.PHONY: develop install +.PHONY: develop develop: - @if [ -z "$${VIRTUAL_ENV}" ]; then echo "Not in a virtual environment; see README.md" 1>&2; exit 1; fi - pip install -e .[dev,test] + pip install -e .[dev] #=> install: install package +.PHONY: install install: pip install . @@ -76,10 +73,12 @@ cqa: .PHONY: test test-code test-docs test: pytest -test-code: - pytest src test-docs: pytest docs +test-code: + pytest src +test-%: + pytest -m '$*' src #=> tox -- run all tox tests tox: @@ -102,12 +101,11 @@ reformat: rename: ./sbin/rename-package -# #=> docs -- make sphinx docs -# .PHONY: docs -# docs: develop -# # RTD makes json. Build here to ensure that it works. -# make -C doc html json - +#=> docs -- make sphinx docs +.PHONY: docs +docs: develop + # RTD makes json. Build here to ensure that it works. + make -C doc html json ############################################################################ #= CLEANUP @@ -127,10 +125,10 @@ cleaner: clean rm -frv **/*.orig rm -frv **/*.rej -#=> cleanest: remove files and directories that are more expensive to rebuild +#=> cleanest: remove files and directories that require more time/network fetches to rebuild .PHONY: cleanest cleanest: cleaner - rm -frv .eggs .tox venv + rm -fr .eggs .tox venv #=> distclean: remove untracked files and other detritus .PHONY: distclean diff --git a/README.md b/README.md index 64b08dd..3865a41 100644 --- a/README.md +++ b/README.md @@ -68,10 +68,3 @@ Try it: * Quality tools: Code reformatting with black and isort * GitHub Actions for testing and packaging - -# To Do - -* Docs (mkdocs w/mkdocstrings or sphinx) -* Dockerfile -* test only certain tags -* fixture example diff --git a/pyproject.toml b/pyproject.toml index 337c2b7..89a0e64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "biocommons.example" authors = [ - { name="Bob the Builder", email="bob@nowhere.com" }, + { name="biocommons contributors", email="biocommons-dev@googlegroups.com" }, ] description = "Example Package" readme = "README.md" -license = { file="LICENSE" } +license = { file="LICENSE.txt" } requires-python = ">=3.8" classifiers = [ "Programming Language :: Python :: 3",