Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d2e4656
Minimum working example for pixi
DunklesArchipel Jan 17, 2026
036b761
Improve readme and contribution instructions
DunklesArchipel Jan 17, 2026
d855d60
Remove erroneous file
DunklesArchipel Jan 17, 2026
a3d1a00
fix readmes
DunklesArchipel Jan 17, 2026
e2fc54c
update deploy workflow
DunklesArchipel Jan 17, 2026
1d4f343
fix path in workflows
DunklesArchipel Jan 17, 2026
0988670
use jcamp master until changes land on pypi
linuxrider Jan 18, 2026
a85dfed
update pixi in CI
linuxrider Jan 19, 2026
37f4a1a
Merge pull request #1 from linuxrider/pixi
DunklesArchipel Jan 19, 2026
53c2419
Update pixi and add footer
DunklesArchipel Jul 14, 2026
c262074
update css
DunklesArchipel Jul 14, 2026
0e88d54
Restore matomo analytics
DunklesArchipel Jul 14, 2026
17658f8
Fix broken admonition
DunklesArchipel Jul 14, 2026
1d684e0
Remove obsolete files and move drafts
DunklesArchipel Jul 14, 2026
51343d3
rearrange files to match website structure
DunklesArchipel Jul 14, 2026
f5b95af
Update jcamp issue
DunklesArchipel Jul 14, 2026
b690c11
Merge remote-tracking branch 'origin/main' into pixi
DunklesArchipel Jul 14, 2026
ab0d82e
Move binder config
DunklesArchipel Jul 14, 2026
08bd4a0
Fix workflow
DunklesArchipel Jul 14, 2026
86102c8
Fix notebook executions and broken links
DunklesArchipel Jul 14, 2026
2737b70
Weekly check on notebook execution issues
DunklesArchipel Jul 14, 2026
2c89f0d
Add linkcheck to deploy run
DunklesArchipel Jul 14, 2026
9abdbcd
Resolve open babel dependency
DunklesArchipel Jul 14, 2026
e822983
Fix CI issues
DunklesArchipel Jul 14, 2026
a5332b7
Migrate to openbabel from openbabel-wheel (deprectaed)
DunklesArchipel Jul 14, 2026
28f8e6c
bump jcamp dependency to 1.3.2
DunklesArchipel Jul 15, 2026
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
35 changes: 35 additions & 0 deletions .github/scripts/inject_matomo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""Inject the Matomo analytics snippet into every built HTML page.

The MyST book-theme has no option for custom scripts, so the snippet in
book/static/js/matomo.html is inserted before </head> after `myst build --html`.
Safe to run twice: pages already containing the snippet are skipped.

Usage: python inject_matomo.py <html_dir> [snippet_file]
"""

import sys
from pathlib import Path

MARKER = "<!-- Matomo -->"


def main():
html_dir = Path(sys.argv[1])
snippet_file = (
Path(sys.argv[2])
if len(sys.argv) > 2
else Path(__file__).parents[2] / "book" / "static" / "js" / "matomo.html"
)
snippet = snippet_file.read_text(encoding="utf-8")
injected = 0
for page in sorted(html_dir.rglob("*.html")):
html = page.read_text(encoding="utf-8")
if MARKER in html or "</head>" not in html:
continue
page.write_text(html.replace("</head>", snippet + "</head>", 1), encoding="utf-8")
injected += 1
print(f"Injected Matomo snippet into {injected} pages under {html_dir}")


if __name__ == "__main__":
main()
55 changes: 35 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,47 @@ on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened

# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
permissions:
contents: write # required to push to the gh-pages branch
steps:
- uses: actions/checkout@v3
- name: checkout
uses: actions/checkout@v6
with: { submodules: recursive }
- uses: prefix-dev/setup-pixi@v0.9.3
with: { pixi-version: v0.72.0 }
- name: Build the book
run: |
cd book
pixi run -e dev jupyter-book build

# Install dependencies
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
# The MyST book-theme has no custom-script option, so add Matomo after the build
- name: Inject Matomo analytics
run: python3 .github/scripts/inject_matomo.py book/_build/html

- name: Install dependencies
run: |
pip install -r requirements.txt
# Push the book's HTML to github-pages (only on pushes to main;
# pull requests just build as a check — their token is read-only)
- name: GitHub Pages action
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: book/_build/html

# Build the book
- name: Build the book
run: |
jupyter-book build book

# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: book/_build/html
# Non-blocking link check: reports dead external links in the step log
# (red X on the step) without failing the workflow — some sites block or
# rate-limit the checker (ACS 403, PubChem 503, Crossref 429)
- name: Check links (non-blocking)
continue-on-error: true
run: |
cd book
pixi run -e dev myst build --strict --check-links
38 changes: 38 additions & 0 deletions .github/workflows/execution-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: execution-test

# Verifies that all notebooks still execute (external APIs drift over time —
# e.g. CAS introduced an API-key requirement). Pages with `execute: skip: true`
# frontmatter are exempt. The deployed site uses the committed notebook outputs;
# this workflow only tests executability and never publishes anything.
on:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1" # weekly on Monday, 06:00 UTC

jobs:
execute-notebooks:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write # to open an issue when a scheduled run fails
steps:
- name: checkout
uses: actions/checkout@v6
with: { submodules: recursive }
- uses: prefix-dev/setup-pixi@v0.9.3
with: { pixi-version: v0.72.0 }
- name: Execute all notebooks
run: |
cd book
pixi run -e dev myst build --execute --strict

# External APIs can break outside of any PR; make sure someone notices.
- name: Open an issue on scheduled failure
if: failure() && github.event_name == 'schedule'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue create --repo "$GITHUB_REPOSITORY" \
--title "Scheduled notebook execution test failed ($(date -u +%Y-%m-%d))" \
--body "The weekly notebook execution test failed — a web service used by a notebook may have changed or gone offline. See the run log: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
22 changes: 21 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
.idea
.DS_Store
book/_build
book/manipulations/hiddensettings.py
book/howtos/inchikeys.md
book/.DS_Store
book/nul
Pipfile.lock

# generated data from tests and builds
# notebooks write their outputs to a files/generated/ folder (relative to the
# kernel cwd: the notebook's folder interactively, book/ during myst execution)
**/files/generated/
book/_build
book/manipulations/.excel_import.md.bak

# pixi environments
.pixi/*
!.pixi/config.toml

# MyST build outputs
_build

# Jupyter Notebook
.ipynb_checkpoints

# local files
TODO.md
69 changes: 66 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,73 @@

We welcome all community contributions to this work, whether it be a minor typo correction or a complex demonstration notebook. There are a variety of ways you can help improve this resource, including:

# Issues
## Issues

If you spot something wrong or missing, please let us know through an [issue](https://github.com/IUPAC/WFChemCookbook/issues). No coding required. Just drop a line so we can follow up and make sure the resource is even better for the next person who comes along.

# Pull Requests
## Pull Requests

More advanced practitioners should consider putting together a [pull request](https://github.com/IUPAC/WFChemCookbook/pulls). Direct contributions are the fastest way to improve this work, whether it be because there's a quick editorial improvement or because we're missing the latest, greatest library.
More advanced practitioners should consider putting together a [pull request](https://github.com/IUPAC/WFChemCookbook/pulls). Direct contributions are the fastest way to improve this work, whether it be because there's a quick editorial improvement or because we're missing the latest, greatest library.

## Installation

This project can be downloaded directly from the repository website or via

```sh .noeval
git clone git@github.com:IUPAC/WFChemCookbook.git
```

Install [pixi](https://pixi.prefix.dev/dev/installation/) and install the dependencies via pixi.

```sh .noeval
pixi install
```

To explore the cookbook locally run:

```sh .noeval
pixi run serve
```

### Further pixi tasks

Add a module:

```sh .noeval
pixi add <module name>
```

or

```sh .noeval
pixi add --pypi <module name>
```

Install packages

```sh .noeval
pixi run install
```

Clean cached packages

```sh .noeval
pixi run clean
```

Build the website (without serving) and check for broken links

```sh .noeval
pixi run build
```

If nothing works it is sometimes helpful to delete the `pixi.lock` file and clean the `.pixi` folder

The cache of the jupyter book build can be cleared (deletes `book/_build` folder)

TODO:: The build option "should" execute the notebooks and raise errors. This does not seem to work properly.
In addition the validity of links is checked.

```sh .noeval
pixi run execute
```
32 changes: 0 additions & 32 deletions Pipfile

This file was deleted.

29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# IUPAC FAIR Chemistry Cookbook

The IUPAC FAIR Chemistry Cookbook is an open, collaborate, community focused resource on how to work with FAIR data in chemistry.
FAIR means findable, accessible, interoperable, and reusable and is the new paradigm for how chemists should share their data.

Expand All @@ -8,10 +9,6 @@ See the [cookbook](https://iupac.github.io/WFChemCookbook/) for a user-friendly,

The contents of this repository are designed to use the [Jupyter Book](https://jupyterbook.org/) framework to generate a simple to navigate and easy to maintain set of reference materials for getting started leveraging common and powerful chemical information tooling.

## Developer instructions

See the [contributing guide](./CONTRIBUTING.md).

## About this project

The Committee on Data of the International Science Council ([CODATA](https://codata.org/)) and the Research Data Alliance ([RDA](https://rd-alliance.org/)) have recently launched the [WorldFAIR Initiative](https://worldfair-project.eu/) to advance implementation of the [FAIR data principles](https://force11.org/info/the-fair-data-principles/) within and across research domains.
Expand All @@ -24,3 +21,27 @@ All presented code should execute as written, and if it does not please [let us
General purpose software engineering strategies and techniques (_e.g._, Python language semantics, branch management in Git) are out of scope for this reference material, but an effort will be made to reference relevant external materials.

*WorldFAIR “Global cooperation on FAIR data policy and practice” is funded by the EC HORIZON-WIDERA-2021-ERA-01-41 Coordination and Support Action under Grant Agreement No. 101058393.*

## Contributing

See the [contributing guide](./CONTRIBUTING.md) with further information on how to contribute to this project, as wells as installation and development instructions.

## Installation

This project can be downloaded directly from the repository website or via

```sh .noeval
git clone git@github.com:theoechem/article_MAHE_2024_IL_pitfalls.git
```

Install [pixi](https://pixi.prefix.dev/dev/installation/) and install the dependencies via pixi.

```sh .noeval
pixi install
```

To explore the Jupyter notebooks in `book` interactively use your favorite IDE or start jupyter via:

```sh .noeval
pixi run jupyter lab
```
13 changes: 13 additions & 0 deletions binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Environment for Binder (repo2docker) — used when launching the notebooks
# from the website. repo2docker reads config exclusively from this binder/
# folder (root config files are ignored while it exists). Not used for
# building the site; that is done with pixi (see pixi.toml).
# Keep the jcamp pin in sync with pixi.toml.
jcamp==1.3.2
matplotlib==3.10.8
numpy>=2,<3
openbabel==3.2.1
pandas==2.3.3
rdkit==2025.9.4
requests>=2
seaborn==0.13.2
Loading
Loading