forked from NVIDIA/earth2studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
110 lines (91 loc) · 2.79 KB
/
Makefile
File metadata and controls
110 lines (91 loc) · 2.79 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
install:
uv sync
uv sync --extra all --extra aifs
.PHONY: install-docker
install-docker:
uv pip install --system --break-system-packages .[all,aifs] --group dev
uv pip install --system --break-system-packages zarr~=3.0
.PHONY: setup-ci
setup-ci:
uv venv --python=3.12
uv sync
uv run pre-commit install --install-hooks
.PHONY: format
format:
uv run pre-commit run black -a --show-diff-on-failure
.PHONY: black
black:
uv run pre-commit run black -a --show-diff-on-failure
.PHONY: interrogate
interrogate:
uv run pre-commit run interrogate -a
.PHONY: lint
lint:
uv run pre-commit run check-added-large-files -a
uv run pre-commit run trailing-whitespace -a
uv run pre-commit run end-of-file-fixer -a
uv run pre-commit run debug-statements -a
uv run pre-commit run markdownlint -a
uv run pre-commit run name-tests-test -a
uv run pre-commit run pyupgrade -a --show-diff-on-failure
uv run pre-commit run ruff -a
uv run pre-commit run mypy -a
.PHONY: license
license:
uv run python test/_license/header_check.py
.PHONY: pytest
pytest:
uv run coverage run -m pytest --ci-cache --slow test/
.PHONY: pytest-docker
pytest-docker:
coverage run -m pytest --ci-cache --slow test/
.PHONY: pytest-submodule
pytest-submodule:
uv run coverage run --source=$(COVERAGE_SOURCE) -m pytest --ci-cache --slow $(PYTEST_SOURCE)
.PHONY: pytest-submodule-docker
pytest-submodule-docker:
coverage run --source=$(COVERAGE_SOURCE) -m pytest --ci-cache --slow -s $(PYTEST_SOURCE)
.PHONY: pytest-automodels-docker
pytest-automodels-docker:
pytest -s test/models/test_auto_models.py -k test_auto_model_download --model-download
.PHONY: doctest
doctest:
echo "Skipping doc test"
.PHONY: coverage
coverage:
uv run coverage combine
uv run coverage report --fail-under=90
.PHONY: docs
docs:
uv sync --group docs
uv run $(MAKE) -C docs clean
uv run $(MAKE) -C docs html
.PHONY: docs-full
docs-full:
uv sync --extra all --group docs
$(MAKE) docs-build-examples
.PHONY: docs-build-examples
docs-build-examples:
rm -rf docs/examples
rm -rf docs/modules/generated
rm -rf docs/modules/backreferences
uv run $(MAKE) -C docs clean
rm -rf examples/outputs
uv run $(MAKE) -C docs html
PLOT_GALLERY=True RUN_STALE_EXAMPLES=True uv run $(MAKE) -j 8 -C docs html
.PHONY: docs-full-docker
docs-full-docker:
uv pip install --system --break-system-packages .[all] --group docs
uv pip install --system --break-system-packages zarr>3.0
rm -rf docs/examples
rm -rf docs/modules/generated
rm -rf docs/modules/backreferences
$(MAKE) -C docs clean
rm -rf examples/outputs
$(MAKE) -C docs html
PLOT_GALLERY=True RUN_STALE_EXAMPLES=True $(MAKE) -j 8 -C docs html
.PHONY: docs-dev
docs-dev:
# rm -rf examples/outputs
uv sync --extra all --group docs
PLOT_GALLERY=True RUN_STALE_EXAMPLES=True FILENAME_PATTERN=$(FILENAME) uv run $(MAKE) -j 4 -C docs html