Skip to content

Commit

Permalink
[FLINK-12330][python]Add integrated Tox for ensuring compatibility of…
Browse files Browse the repository at this point in the history
… multi-version of python.

This closes apache#8355.
  • Loading branch information
sunjincheng121 committed May 7, 2019
1 parent 560b2bd commit 5991d15
Show file tree
Hide file tree
Showing 13 changed files with 591 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ flink-runtime-web/web-dashboard/web/
flink-python/dist/
flink-python/build/
flink-python/pyflink.egg-info/
flink-python/.tox/
flink-python/dev/download
flink-python/dev/.conda/
flink-python/dev/log/
flink-python/dev/.stage.txt
atlassian-ide-plugin.xml
out/
/docs/api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ do
esac
done

log=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-client-$HOSTNAME.log
log=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-python-$HOSTNAME.log
log_setting=(-Dlog.file="$log" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j-cli.properties -Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback.xml)

TABLE_JAR_PATH=`echo "$FLINK_ROOT_DIR"/opt/flink-table*.jar`
Expand Down
17 changes: 11 additions & 6 deletions flink-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ In this initial version only Table API is supported, you can find the documentat

## Installation

Currently, you can install PyFlink from Flink source code.
First, you need build the whole Flink project using `mvn clean install -DskipTests` and set the value of the environment variable FLINK_HOME to the `build-target` directory under the root directory of Flink.
Then enter the directory where this README.md file is located and execute `python setup.py install` to install PyFlink on your device.
Currently, we can install PyFlink from Flink source code. Enter the directory where this README.md file is located and install PyFlink on your device by executing

## Running Tests
```
python setup.py install
```

Currently you can perform an end-to-end test of PyFlink in the directory where this file is located with the following command:
## Running test cases

PYTHONPATH=$PYTHONPATH:./ python ./pyflink/table/tests/test_end_to_end.py
Currently, we use conda and tox to verify the compatibility of the Flink Python API for multiple versions of Python and will integrate some useful plugins with tox, such as flake8.
We can enter the directory where this README.md file is located and run test cases by executing

```
./dev/lint-python.sh
```

## Python Requirements

Expand Down
Loading

0 comments on commit 5991d15

Please sign in to comment.