diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 60f955e..7330d0e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -43,3 +43,9 @@ jobs: - name: Wheel run: | python setup.py sdist + + - name: Build docker image + uses: docker/build-push-action@v3 + with: + push: false + tags: getindata/streaming-jupyter-integrations:latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc7c87..7ca6c67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +## [0.15.0] - 2023-11-02 + +### Added + +- Support Flink 1.18 + ## [0.14.5] - 2023-10-03 ### Fixed @@ -249,7 +255,9 @@ - First release -[Unreleased]: https://github.com/getindata/streaming-jupyter-integrations/compare/0.14.5...HEAD +[Unreleased]: https://github.com/getindata/streaming-jupyter-integrations/compare/0.15.0...HEAD + +[0.15.0]: https://github.com/getindata/streaming-jupyter-integrations/compare/0.14.5...0.15.0 [0.14.5]: https://github.com/getindata/streaming-jupyter-integrations/compare/0.14.4...0.14.5 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9f2226e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,50 @@ +FROM jupyter/base-notebook:python-3.8.8 + +WORKDIR /app/ + +USER $NB_USER + +RUN python -V +RUN python -m pip install virtualenv pipdeptree + +USER root + +RUN ["/bin/bash", "-c", "python -m venv venv"] + +USER $NB_USER + +RUN ["/bin/bash", "-c", "source venv/bin/activate"] +RUN ["/bin/bash", "-c", "pip install --upgrade pip"] + +USER root + +RUN apt update && apt-get install -y software-properties-common curl wget yarn +RUN apt-add-repository ppa:openjdk-r/ppa +RUN apt-get update && \ + apt-get install -y openjdk-11-jdk + +USER $NB_USER + +RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash +RUN source ~/.nvm/nvm.sh && \ + nvm install node 19.0.1 + +RUN pip install jupyterlab-lsp "nbclassic>=0.2.8" + +COPY requirements.txt ./ +RUN pip install -r requirements.txt + +USER root + +COPY . ./ +RUN chown $NB_USER ./ +RUN source ~/.nvm/nvm.sh && \ + pip install . + +USER $NB_USER + +ENV JUPYTER_ENABLE_LAB=yes +ENV FLINK_HOME=/opt/conda/lib/python3.8/site-packages/pyflink + +RUN chown -R $NB_USER:users $FLINK_HOME +USER $NB_USER diff --git a/README.md b/README.md index df70930..64fec8d 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,27 @@ the pipeline does not end with `.execute()`, the execution is triggered by the J ## Local development +There are currently 2 options for running `streaming_jupyter_integrations` for development. We can either +use a Docker image or install it on our machine. + +### Docker image + +You can build a `Docker` image of `Jupyter Notebooks` by running the command below. +It will contain functionality that was developed in this project. +```bash +docker build --tag streaming_jupyter_integrations_image . +``` + +After the image is built, we can run it using this command. +```bash +docker run --name streaming_jupyter_integrations -p 8888:8888 streaming_jupyter_integrations_image +``` + +After that we should be able to reach our Jupyterhub running on Docker under: +http://127.0.0.1:8888/ + +### Local installation + Note: You will need NodeJS to build the extension package. The `jlpm` command is JupyterLab's pinned version of @@ -200,6 +221,8 @@ jupyter labextension develop . --overwrite jlpm build ``` +### pre-commit + The project uses [pre-commit](https://pre-commit.com/) hooks to ensure code quality, mostly by linting. To use it, [install pre-commit](https://pre-commit.com/#install) and then run ```shell diff --git a/requirements.txt b/requirements.txt index 259a854..f5fb5bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ types-PyYAML~=6.0.0 yarn-api-client~=1.0.0 ipywidgets -apache-flink>=1.15,<1.17 +apache-flink>=1.15,<=1.18 pandas py4j requests diff --git a/setup.cfg b/setup.cfg index 2b21714..962b9e6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.14.5 +current_version = 0.15.0 [tox:tox] envlist = py38 diff --git a/setup.py b/setup.py index 48758d2..a841a9b 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import find_packages, setup from setuptools.command.install import install -__version__ = "0.14.5" +__version__ = "0.15.0" HERE = Path(__file__).parent.resolve()