HuangXingBo commented on code in PR #149:
URL: https://github.com/apache/flink-ml/pull/149#discussion_r958220795
##########
.github/workflows/python-checks.yml:
##########
@@ -32,6 +32,12 @@ jobs:
- name: Install dependencies
working-directory: flink-ml-python/dev
run: python -m pip install -r dev-requirements.txt
+ - name: Build Python package
+ working-directory: flink-ml-python
+ run: python setup.py sdist
+ - name: Install Python package
+ working-directory: flink-ml-python
+ run: python -m pip install dist/*.tar.gz
Review Comment:
I think we can create a dedicated workflow action to build python package
and this can be used in the release.
##########
.github/workflows/python-checks.yml:
##########
@@ -32,6 +32,12 @@ jobs:
- name: Install dependencies
working-directory: flink-ml-python/dev
run: python -m pip install -r dev-requirements.txt
+ - name: Build Python package
+ working-directory: flink-ml-python
+ run: python setup.py sdist
+ - name: Install Python package
+ working-directory: flink-ml-python
+ run: python -m pip install dist/*.tar.gz
Review Comment:
I found we forgot to add license header to `java8-build.yml` and
`python-checks.yml`
##########
flink-ml-python/pyflink/ml/tests/test_utils.py:
##########
@@ -43,30 +40,3 @@ def setUp(self):
def tearDown(self) -> None:
shutil.rmtree(self.temp_dir, ignore_errors=True)
-
- def _load_dependency_jars(self):
- from pyflink.ml.version import __version__
-
- flink_version = __version__.replace(".dev0", "-SNAPSHOT")
- this_directory = os.path.abspath(os.path.dirname(__file__))
- FLINK_ML_HOME = os.path.abspath(os.path.join(
- this_directory,
- "../../../../flink-ml-dist/target/flink-ml-%s-bin/flink-ml-%s" %
- (flink_version, flink_version)))
- FLINK_ML_LIB_PATH = os.path.join(FLINK_ML_HOME, "lib")
- if not os.path.isdir(FLINK_ML_LIB_PATH):
- raise Exception("You need to build Flink ML with maven you can
run: "
- "mvn -DskipTests clean package")
-
- for file in os.listdir(FLINK_ML_LIB_PATH):
- if file.endswith('.jar'):
-
self.env.add_classpaths("file://{0}/{1}".format(FLINK_ML_LIB_PATH, file))
-
- # load flink-ml-lib/flink-ml-lib-*-tests.jar
- FLINK_ML_LIB_SOURCE_PATH = os.path.abspath(os.path.join(
- this_directory, "../../../../flink-ml-lib"))
-
- ml_test_jar = glob.glob(os.path.join(
- FLINK_ML_LIB_SOURCE_PATH, "target", "flink-ml-lib-*-tests.jar"))[0]
-
- self.env.add_classpaths("file://{0}".format(ml_test_jar))
Review Comment:
Why remove this logic? We can't let developers need to reinstall every time
when they modify the code to make the changed code take effect
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]