-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
32 lines (24 loc) · 922 Bytes
/
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
VERSION ?= $(shell git rev-parse --short HEAD)
IMAGE ?= fme
ENVIRONMENT_NAME ?= fme
DEPLOY_TARGET ?= pypi
build_docker_image:
docker build -f docker/Dockerfile -t $(IMAGE):$(VERSION) .
enter_docker_image: build_docker_image
docker run -it --rm $(IMAGE):$(VERSION) bash
# recommended to deactivate current conda environment before running this
create_environment:
conda create -n $(ENVIRONMENT_NAME) python=3.10 pip
conda run --no-capture-output -n $(ENVIRONMENT_NAME) python -m pip install uv==0.2.5
conda run --no-capture-output -n $(ENVIRONMENT_NAME) uv pip install -c constraints.txt -e fme[dev]
test:
pytest --durations 20 .
# For maintainer use only
# requires fme[deploy] to be installed
build_pypi:
rm -rf fme/dist
cd fme && python -m build
deploy_pypi: build_pypi
cd fme && twine upload --repository $(DEPLOY_TARGET) dist/*
deploy_test_pypi: DEPLOY_TARGET = testpypi
deploy_test_pypi: deploy_pypi