generated from openfisca/country-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (36 loc) · 1.54 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
all: test
uninstall:
pip freeze | grep -v "^-e" | sed "s/@.*//" | xargs pip uninstall -y
clean:
rm -rf build dist
find . -name '*.pyc' -exec rm \{\} \;
find . -type d -name '__pycache__' -exec rm -r {} +
deps:
pip install --upgrade pip build twine
install: deps
@# Install OpenFisca-Extension-Template for development.
@# `make install` installs the editable version of openfisca-country_template.
@# This allows contributors to test as they code.
pip install --editable .[dev] --upgrade
build: clean deps
@# Install OpenFisca-Extension-Template for deployment and publishing.
@# `make build` allows us to be be sure tests are run against the packaged version
@# of OpenFisca-Extension-Template, the same we put in the hands of users and reusers.
python -m build
pip uninstall --yes openfisca-nouvelle_caledonie
find dist -name "*.whl" -exec pip install --force-reinstall {}[dev] \;
format:
@# Do not analyse .gitignored files.
@# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764.
ruff format `git ls-files | grep "\.py$$"`
isort `git ls-files | grep "\.py$$"`
lint:
@# Do not analyse .gitignored files.
@# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764.
isort --check `git ls-files | grep "\.py$$"`
ruff check `git ls-files | grep "\.py$$"`
yamllint `git ls-files | grep "\.yaml$$"`
test: clean
openfisca test --country-package openfisca_nouvelle_caledonie openfisca_nouvelle_caledonie/tests
serve-local: build
openfisca serve --country-package openfisca_nouvelle_caledonie