-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (44 loc) · 1.11 KB
/
Makefile
File metadata and controls
56 lines (44 loc) · 1.11 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
VERSION ?= latest
IMAGENAME = CHANGEME
DOCKERREPO ?= public.ecr.aws/eodh
uv-run ?= uv run --no-sync
.PHONY: dockerbuild
dockerbuild:
DOCKER_BUILDKIT=1 docker build -t ${IMAGENAME}:${VERSION} .
.PHONY: dockerpush
dockerpush: dockerbuild
docker tag ${IMAGENAME}:${VERSION} ${DOCKERREPO}/${IMAGENAME}:${VERSION}
docker push ${DOCKERREPO}/${IMAGENAME}:${VERSION}
.PHONY: test
test:
${uv-run} ptw CHANGEME-test-package-names
.PHONY: testonce
testonce:
${uv-run} pytest
.git/hooks/pre-commit:
${uv-run} pre-commit install
curl -o .pre-commit-config.yaml https://raw.githubusercontent.com/EO-DataHub/github-actions/main/.pre-commit-config-python.yaml
.PHONY: setup
setup: update .git/hooks/pre-commit
.PHONY: pre-commit
pre-commit:
${uv-run} pre-commit
.PHONY: pre-commit-all
pre-commit-all:
${uv-run} pre-commit run --all-files
.PHONY: check
check:
${uv-run} ruff check
${uv-run} ruff format --check --diff
${uv-run} pyright
${uv-run} validate-pyproject pyproject.toml
.PHONY: format
format:
${uv-run} ruff check --fix
${uv-run} ruff format
.PHONY: install
install:
uv sync --frozen
.PHONY: update
update:
uv sync