-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathMakefile
57 lines (40 loc) · 1.98 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
46
47
48
49
50
51
52
53
54
55
# Use make help, to see the available rules
REPOROOT=../..
include $(REPOROOT)/.make.defaults
TAG := "v${DPK_LIB_VERSION}"
clean:: .defaults.clean
@# Help: Clean up the distribution build and the venv
-rm -rf dist > /dev/null 2>&1
.PHONY: .check-env
.check-env::
@echo "Checks passed"
setup::
set-versions: .check-env
$(MAKE) TOML_VERSION=$(DPK_LIB_VERSION) .defaults.update-toml
if [ -e pyproject.toml ]; then \
cat pyproject.toml | sed -e 's/"ray[default]==.*",/"ray[default]==$(RAY)",/' > tt.toml; \
mv tt.toml pyproject.toml; \
fi
if [ -e requirements.txt ]; then \
cat requirements.txt | sed -e 's/ray[default]==.*/ray[default]==$(RAY)/' > tt.txt; \
mv tt.txt requirements.txt; \
fi
build:: build-dist
build-dist :: .defaults.build-dist
publish:: publish-dist
publish-dist :: .check-env .defaults.publish-dist
venv::
$(MAKE) .defaults.ray-lib-src-venv
pip install moto==5.0.5 markupsafe==2.0.1
image::
@# Help: Placeholder does nothing for now.
@echo "Image building for ray is in the works (coming soon)."
# Here we run each test directory of tests and each ray launched test separately, because
# it seems when running multiple ray launch tests in a single pytest run there is some sort of ray.init() duplication.
# pytest-forked was tried, but then we get SIGABRT in pytest when running the s3 tests, some of which are skipped..
test:: venv
@# Help: Use the already-built virtual environment to run pytest on the test directory.
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_ray_tests/launch/ray/ray_util_test.py;
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_ray_tests/launch/ray/ray_launcher_test.py;
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_ray_tests/launch/ray/ray_test_noop_launch.py;
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_ray_tests/launch/ray/ray_multi_launcher_test.py;