Skip to content

Commit

Permalink
Barebones package
Browse files Browse the repository at this point in the history
  • Loading branch information
amyreese committed Apr 2, 2021
1 parent 1212209 commit e254c18
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 0 deletions.
39 changes: 39 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
SRCS:=thx

.venv:
python -m venv .venv
source .venv/bin/activate && make setup dev
echo 'run `source .venv/bin/activate` to use virtualenv'

venv: .venv

dev:
flit install --symlink

setup:
python -m pip install -Ur requirements-dev.txt

release: lint test clean
flit publish

format:
python -m ufmt format $(SRCS)

lint:
python -m mypy $(SRCS)
python -m flake8 $(SRCS)
python -m ufmt check $(SRCS)

test:
python -m coverage run -m $(SRCS).tests
python -m coverage report
python -m coverage html

html: .venv README.md docs/*.rst docs/conf.py
source .venv/bin/activate && sphinx-build -b html docs html

clean:
rm -rf build dist README MANIFEST *.egg-info .mypy_cache

distclean: clean
rm -rf .venv
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[build-system]
requires = ["flit_core >=3,<4"]
build-backend = "flit_core.buildapi"

[tool.flit.metadata]
module = "thx"
author = "John Reese"
author-email = "[email protected]"
description-file = "README.md"
home-page = "https://github.com/jreese/thx"
requires = []
requires-python = ">=3.6"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Topic :: Utilities",
"Typing :: Typed",
]

[tool.flit.sdist]
exclude = [
".github/",
]

[tool.attribution]
name = "thx"
package = "thx"
version_file = true
signed_tags = false

11 changes: 11 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
attribution==1.5.1
black==20.8b0
codecov==2.1.11
coverage==5.5
flit==3.0.0
flake8==3.9.0
mypy==0.812
sphinx==3.5.2
ufmt==1.2
usort==0.6.2
git+https://github.com/miyakogi/m2r@66f4a5a500cdd9fc59085106bff082c9cadafaf3
4 changes: 4 additions & 0 deletions thx/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""
Thanks
"""
from .__version__ import __version__
1 change: 1 addition & 0 deletions thx/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0"

0 comments on commit e254c18

Please sign in to comment.