Skip to content

Commit

Permalink
update README and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
reece committed Sep 9, 2023
1 parent 89aae02 commit f6d0d69
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: hello world
- name: Environment
run: |
echo "::group::Environment info"
echo github.event_name = ${{ github.event_name }}
Expand Down
42 changes: 20 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 .

Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit f6d0d69

Please sign in to comment.