-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from IBM/runtime-reorg
Restructure the repository to distinguish/separate runtime libraries
- Loading branch information
Showing
94 changed files
with
173 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,45 @@ | ||
# Use make help, to see the available rules | ||
REPOROOT=../ | ||
include ../.make.defaults | ||
include ../.make.versions | ||
|
||
TAG := "v${DPK_LIB_VERSION}" | ||
|
||
|
||
clean:: | ||
@# Help: Clean up the distribution build and the venv | ||
rm -rf dist venv | ||
rm -rf src/*egg-info | ||
|
||
.check-env:: | ||
@echo "Checks passed" | ||
|
||
update-toml:: .check-env | ||
@# Help: Copy the Makefile distribution version into the pyproject.toml | ||
sed -e 's/^version[ ]*=.*/version = "'${DPK_LIB_VERSION}'"/' pyproject.toml > tt.toml | ||
mv tt.toml pyproject.toml | ||
################################################################################################################# | ||
# | ||
# This is the top level makefile, which is intended to be able to process a common set of rules on all | ||
# sub-projects underneath this directory. Currently, the common/standardized set of rules are as follows | ||
# and supported by .make.defaults | ||
# | ||
# setup: | ||
# clean: | ||
# build: | ||
# test: | ||
# | ||
# When finally getting to a makefile that requires a rule implementation, for example to test the build, | ||
# that makefile should override/implement the rule to meet its needs. Such a rule may continue to recurse | ||
# using "$(MAKE) <rule>-recurse", for example "$(MAKE) test-recurse". | ||
# | ||
# Each rule is called recursively on sub-directories and if a similar inclusion is done in the sub-Makefiles, | ||
# the rules will be applied/executed recursively in their sub-directories. | ||
# | ||
################################################################################################################# | ||
|
||
REPOROOT=.. | ||
|
||
# Get some common rules for the whole repo | ||
include $(REPOROOT)/.make.defaults | ||
|
||
########## ########## ########## ########## ########## ########## ########## ########## | ||
# Global rules that are generally to be implemented in the sub-directories and can | ||
# be overridden there (the double colon on the rule makes the overridable). | ||
|
||
clean:: | ||
@# Help: Recursively $@ in all subdirs | ||
$(MAKE) RULE=$@ .recurse | ||
|
||
setup:: | ||
@# Help: Recursively $@ in all subdirs | ||
@$(MAKE) RULE=$@ .recurse | ||
|
||
build:: | ||
@# Help: Recursively $@ in all subdirs | ||
$(MAKE) RULE=$@ .recurse | ||
|
||
build:: update-toml venv | ||
@# Help: Build the distribution for publishing to a pypi | ||
rm -r dist || true | ||
rm -rf src/*egg-info || true | ||
${PIP} install --upgrade build | ||
${PYTHON} -m build | ||
|
||
publish:: .check-env update-toml | ||
@# Help: Publish project to pypi | ||
${PYTHON} -m twine check dist/* | ||
${PYTHON} -m twine upload --verbose --non-interactive dist/* | ||
#@echo "create a git tag to reference published version" | ||
#@git tag ${TAG} | ||
#@git push origin ${TAG} | ||
|
||
venv:: pyproject.toml | ||
@# Help: Create the virtual environment using pyproject.toml | ||
rm -r dist venv || true | ||
rm -rf src/*egg-info || true | ||
rm makeenv || true | ||
$(PYTHON) -m venv venv | ||
source venv/bin/activate; \ | ||
pip install --upgrade pip; \ | ||
pip install -e .; \ | ||
pip install pytest pytest-cov moto==5.0.5 markupsafe==2.0.1 | ||
|
||
|
||
# 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:: | ||
@# 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_tests/data_access; | ||
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_tests/transform; | ||
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_tests/launch/pure_python/launcher_test.py; | ||
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_tests/launch/pure_python/test_noop_launch.py; | ||
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_tests/launch/ray/ray_util_test.py; | ||
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_tests/launch/ray/launcher_test.py; | ||
source venv/bin/activate; export PYTHONPATH=../src; cd test; $(PYTEST) data_processing_tests/launch/ray/test_noop_launch.py; | ||
@# Help: Recursively $@ in all subdirs | ||
@$(MAKE) RULE=$@ .recurse | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.