Skip to content

Commit

Permalink
Major Update: Replace Docker with virtual environments and update ver…
Browse files Browse the repository at this point in the history
…sions (#117)

* DH version to 0.33.3
Java version to 17

* Updated the ib api version to 10.19.04

* Streamline and simplify the IB artifact building.

* Added a script to build deephaven-ib virtual environments.

* Made IB wheel building fail on errors.

* Updated to server-ui deephaven images.

* Debug CI

* Debug CI

* Debug CI

* Debug CI

* Removed the server-ui change since it requires 0.34

* Made the versions easier to update.

* Remove legacy docker

* Updated documentation.

* Updated documentation.

* Made ib version handling robust.
Fixed release build.

* Removed all docker requirements.
Replaced IB docker build with local functionality in the script.

* Release the hard version constraint on deephaven.

* Updated the minimum python version to avoid core dump in jpy.
deephaven/deephaven-core#5440

* Fix broken dependency version handling.

* Fix broken short rate downloads.

* Fix DH queries that are broken.
Better error messages.

* Fix DH examples.
Add a script to start and run deephaven.

* Add an option to create a venv for use in pycharm.

* Upgrade to Deephaven 0.34.1

* Addressing the review.

* Addressing the review.

* Support using existing venv or giving a venv a custom name.

* Support using system python instead of just venvs.

* Fix actions to build IB wheels

* Fix actions to build IB wheels

* Fix actions to build IB wheels

* Fix actions to build IB wheels

* Fix actions to build IB wheels

* Fix actions to build IB wheels

* Fix actions to build IB wheels

* Fix actions to build IB wheels

* Fix actions to build IB wheels

* Fix venv-less install.

* Improved readme.

* Improved readme.

* Improved readme.

* Improved readme.

* Build both the ib wheel and dhib wheel

* Updated the readme to use the `deephaven` command

* Update README.md

Co-authored-by: Alex Peters <80283343+alexpeters1208@users.noreply.github.com>

* Trying to fix sphinx build

* Trying to fix sphinx build

* Trying to fix sphinx build

* Trying to fix sphinx build

* Trying to fix sphinx build

---------

Co-authored-by: Alex Peters <80283343+alexpeters1208@users.noreply.github.com>
  • Loading branch information
chipkent and alexpeters1208 authored May 8, 2024
1 parent f55a70a commit 89d9e73
Show file tree
Hide file tree
Showing 24 changed files with 882 additions and 350 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Dockerfile.pip
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
FROM ubuntu:22.04

RUN apt update && \
apt install -y openjdk-11-jdk python3-pip python3-venv curl zip && \
apt install -y openjdk-17-jdk python3-pip python3-venv curl zip && \
pip3 install --upgrade pip setuptools wheel

ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/

COPY ./wheels /wheels
COPY ./ib-wheels /ib-wheels
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Dockerfile.server
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG DH_VERSION

FROM ghcr.io/deephaven/server:${DH_VERSION}
FROM ghcr.io/deephaven/server-ui:${DH_VERSION}

RUN apt update && \
apt install -y python3-pip python3-venv curl zip && \
Expand Down
47 changes: 20 additions & 27 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,34 @@ on:
- released

env:
IB_VERSION: 10.19.01
DH_VERSION: 0.28.1
IB_VERSION: 10.19.04
DH_VERSION: 0.34.1

jobs:
build-ib-whl:
name: Build IB WHL
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel build twine
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: |
IB_VERSION_DOWNLOAD=$(echo ${IB_VERSION} | sed 's/[.]//')
echo "Downloading IB API version ${IB_VERSION_DOWNLOAD}"
curl -o ./api.zip "https://interactivebrokers.github.io/downloads/twsapi_macunix.${IB_VERSION_DOWNLOAD}.zip"
unzip api.zip
cd ./IBJts/source/pythonclient
python -m build
python3 --version
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements_dhib_env.txt
python3 dhib_env.py ib-wheel --ib_version ${{ env.IB_VERSION }}
find . -name \*.whl
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: ib-wheels
path: |
./IBJts/source/pythonclient/dist/*
dist/ib/*
build-whl:
name: Build WHL
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- name: Setup Python
Expand Down Expand Up @@ -88,7 +81,7 @@ jobs:
publish-whl:
name: Publish WHL
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [build-whl]
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
steps:
Expand All @@ -107,16 +100,16 @@ jobs:

build-sphinx:
name: Build Sphinx
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [build-ib-whl, build-whl]
steps:
- uses: actions/checkout@v1
- name: Apt installs
run: |
sudo apt update
sudo apt install -y openjdk-11-jdk
sudo apt install -y openjdk-17-jdk
- name: Pip installs
run: pip3 install --upgrade sphinx==4.2.0 sphinx-autodoc-typehints furo==2021.10.9
run: pip3 install --upgrade sphinx~=7.3.0 sphinx-autodoc-typehints furo==2024.5.6
- name: Download IB wheels
uses: actions/download-artifact@v3
with:
Expand All @@ -132,7 +125,7 @@ jobs:
- name: Run Sphinx
working-directory: ./sphinx
env:
JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
run: |
make html
touch build/html/.nojekyll
Expand All @@ -152,7 +145,7 @@ jobs:

publish-sphinx:
name: Publish Sphinx
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [build-sphinx]
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
steps:
Expand All @@ -178,7 +171,7 @@ jobs:

docker-pip:
name: Build and Publish Docker (pip-installed Deephaven)
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [build-ib-whl, build-whl]
permissions:
contents: read
Expand Down Expand Up @@ -236,7 +229,7 @@ jobs:

docker-dhserver:
name: Build and Publish Docker (Deephaven server image)
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [build-ib-whl, build-whl]
permissions:
contents: read
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.idea
venv
venv-*
build
dist
src/deephaven_ib.egg-info
docker/data
Expand Down
273 changes: 143 additions & 130 deletions README.md

Large diffs are not rendered by default.

Loading

0 comments on commit 89d9e73

Please sign in to comment.