Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add CI pipeline to execute example notebooks against latest chemaxon
Runs the 9 numbered example notebooks with nbconvert on push/PR to main,
installing the newest chemaxon release each time. Only checks that the
code executes without error; outputs are not validated. Requires two
repo secrets (CHEMAXON_PYPI_INDEX_URL, CHEMAXON_LICENSE_SERVER_KEY),
documented in the README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
  • Loading branch information
lnagy-cxn and claude committed Sep 23, 2026
commit cc804e62e670af911fd8fa4a304e4ed4c2aa74b5
59 changes: 59 additions & 0 deletions .github/workflows/example-notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Example notebooks

# Executes every numbered example notebook against the newest chemaxon release.
# Outputs are not checked - this only confirms the code still runs, so that an
# API change (upstream, or introduced by a commit here) can't silently break
# an example without being noticed.

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
run-examples:
runs-on: ubuntu-latest
env:
# Chemaxon's private package index. See README for the secret this reads.
PIP_EXTRA_INDEX_URL: ${{ secrets.CHEMAXON_PYPI_INDEX_URL }}
CHEMAXON_LICENSE_SERVER: https://license.chemaxon.com
CHEMAXON_LICENSE_SERVER_KEY: ${{ secrets.CHEMAXON_LICENSE_SERVER_KEY }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade chemaxon
pip install jupyter nbconvert ipykernel pandas matplotlib
python -m ipykernel install --user --name python3

- name: Execute example notebooks
run: |
set +e
failures=()
for notebook in jupyter/*/[0-9][0-9]_*.ipynb; do
echo "::group::${notebook}"
jupyter nbconvert --to notebook --execute \
--output-dir "${RUNNER_TEMP}/executed-notebooks" \
--ExecutePreprocessor.kernel_name=python3 \
--ExecutePreprocessor.timeout=600 \
"${notebook}"
if [ $? -ne 0 ]; then
failures+=("${notebook}")
fi
echo "::endgroup::"
done

if [ ${#failures[@]} -ne 0 ]; then
echo "The following examples failed to execute against the current chemaxon release:"
printf ' - %s\n' "${failures[@]}"
exit 1
fi
echo "All example notebooks executed successfully."
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ For each notebook (ipynb) file the corresponding py file contain the pure python
- Chemaxon license key (or license file). See the [documentation](https://docs.chemaxon.com/display/docs/python-api_installation.md#license-installation) for details.
- [JupyterLab](https://jupyter.org/install) for Jupyter notebook examples.

## Continuous Integration

A [workflow](.github/workflows/example-notebooks.yml) executes every numbered example notebook
against the newest `chemaxon` release on each push/PR to `main`. It only checks that the code
runs without error - outputs are not validated. This is meant to catch API changes that break an
example without the example being updated in the same commit.

The workflow needs two repository secrets:

- `CHEMAXON_PYPI_INDEX_URL` - the authenticated index URL for Chemaxon's private package index
(the same URL used in your local pip config to install `chemaxon`).
- `CHEMAXON_LICENSE_SERVER_KEY` - a license key valid for the Python API.

## Note

If you have any question, suggestion please feel free to contact us via
Expand Down