-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: Migrate from Makefile to justfile
The [just](https://github.com/casey/just) build command runner is "just" a better `make`, for our purposes. In particular, it properly terminates the documentation build if `setuptools-scm` is not installed. I'm sure there is a way to cast spells at `make` to make it do that, but why? Whenever there's a big .PHONY line in a Makefile, it means that `make` is probably the wrong tool. Also, the old Makefile I provided was only valid for GNU make (make portability is a bit gross). Also, `just` has binaries built for every major platform so installing is not a hassle.
- Loading branch information
1 parent
c68a97d
commit f17c6c2
Showing
4 changed files
with
39 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
VERSION := `python -m setuptools_scm -f plain` | ||
|
||
build: | ||
python -m build | ||
|
||
release: build | ||
python -m twine upload dist/* | ||
|
||
test: | ||
mkdir out | ||
pytest -v --outdir=out | ||
|
||
html: | ||
# WARNING: --math fetches .js code from a CDN, be careful where it comes from: | ||
# https://github.com/mitmproxy/pdoc/security/advisories/GHSA-5vgj-ggm4-fg62 | ||
2>pdoc.log pdoc -t docs/template -o html pydrex !pydrex.mesh !pydrex.distributed tests \ | ||
--favicon "https://raw.githubusercontent.com/seismic-anisotropy/PyDRex/main/docs/assets/favicon32.png" \ | ||
--footer-text "PyDRex {{VERSION}}" \ | ||
--math | ||
|
||
live_docs: | ||
# WARNING: --math fetches .js code from a CDN, be careful where it comes from: | ||
# https://github.com/mitmproxy/pdoc/security/advisories/GHSA-5vgj-ggm4-fg62 | ||
pdoc -t docs/template pydrex !pydrex.mesh !pydrex.distributed tests \ | ||
--favicon "https://raw.githubusercontent.com/seismic-anisotropy/PyDRex/main/docs/assets/favicon32.png" \ | ||
--footer-text "PyDRex {{VERSION}}" \ | ||
--math | ||
|
||
clean: | ||
rm -rf dist | ||
rm -rf out | ||
rm -rf html | ||
rm -rf pdoc.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters