Skip to content

Commit

Permalink
Merge branch 'main' of github.com:deephaven-examples/deephaven-ib
Browse files Browse the repository at this point in the history
  • Loading branch information
chipkent committed Aug 28, 2024
2 parents 15811a9 + 334f6c3 commit d113e0e
Show file tree
Hide file tree
Showing 24 changed files with 938 additions and 350 deletions.
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
50 changes: 22 additions & 28 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.33.3
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 All @@ -65,13 +58,14 @@ jobs:
then
if [ "$GITHUB_REF" = "refs/heads/main" ]
then
echo "::set-output name=version::0.0.0.rc"
echo "::set-output name=version::0.0.0-rc.0"
else
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
echo "::set-output name=version::0.0.0.dev${PR_NUMBER}"
echo "::set-output name=version::0.0.0-dev.${PR_NUMBER}"
fi
else
echo "::set-output name=version::${{ github.event.release.tag_name }}"
SEMVER="${TAG_NAME:1}"
echo "::set-output name=version::${SEMVER}"
fi
- name: Build
env:
Expand All @@ -88,7 +82,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,7 +101,7 @@ 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
Expand All @@ -116,7 +110,7 @@ jobs:
sudo apt update
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 Down Expand Up @@ -152,7 +146,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 +172,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 +230,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
40 changes: 40 additions & 0 deletions .github/workflows/conventional-pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Conventional PR'

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
pr-check:
runs-on: ubuntu-22.04
steps:
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Pull Request titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
Breaking changes that are expected to impact users must include "BREAKING CHANGE: <description>" at the end of the PR description.
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true
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
Loading

0 comments on commit d113e0e

Please sign in to comment.