-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
52 lines (45 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Makefile for siskin. Project packaging and some code maintenance tasks.
SHELL := /bin/bash
PY_FILES := $(shell find siskin -name \*.py -print)
# Create a source distribution.
.PHONY: dist
dist:
python setup.py sdist
# TODO: move to `uv build`
# Upload requires https://github.com/pypa/twine and some configuration.
.PHONY: upload
upload: dist
# https://pypi.org/account/register/
# $ cat ~/.pypirc
# [pypi]
# username:abc
# password:secret
#
# For internal repositories, name them in ~/.pypirc (e.g. "internal"), then
# run: make upload TWINE_OPTS="-r internal" to upload to hosted pypi
# repository.
#
# For automatic package deployments, also see: .gitlab-ci.yml.
twine upload $(TWINE_OPTS) dist/*
# TODO: move to `uv publish`
.PHONY: clean
clean:
find . -name "*.pyc" -exec rm -f "{}" +
find . -name ".DS_Store" -exec rm -f "{}" +
find . -name "__pycache__" -exec rm -rf "{}" +
find . -type d -name ".ipynb_checkpoints" -exec rm -rf "{}" +
rm -f .coverage tags
rm -rf build/ dist/ .tox/ .pytest_cache/
rm -rf logs # Probably automatically created by some Java MAB library.
rm -rf siskin.egg-info
rm -rf .ruff_cache/
.PHONY: fmt
fmt:
ruff format siskin
.PHONY: lint
lint:
ruff check siskin
.PHONY: test
test:
# pip install pytest-cov
pytest --cov .