Skip to content

Commit 4b8c008

Browse files
Merge pull request #113 from easyscience/develop
Release: merge develop into master
2 parents b74e251 + 64bd29f commit 4b8c008

File tree

33 files changed

+1832
-1288
lines changed

33 files changed

+1832
-1288
lines changed

.github/workflows/backmerge-pr.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
# The GitHub App must be added to the develop ruleset bypass list.
88
#
99
# Required repo config:
10+
# https://github.com/organizations/easyscience/settings/secrets/actions
11+
# https://github.com/organizations/easyscience/settings/variables/actions
1012
# - Actions secret: ES_BACKMERGE_PRIVATE_KEY (GitHub App private key PEM)
1113
# - Actions variable: ES_BACKMERGE_APP_ID (GitHub App ID)
1214

1315
name: Backmerge PR (tag -> develop)
1416

1517
on:
1618
push:
17-
tags:
18-
- 'v*'
19+
tags: ['v*']
1920

2021
permissions:
2122
contents: write
@@ -30,8 +31,8 @@ jobs:
3031
id: app-token
3132
uses: actions/create-github-app-token@v2
3233
with:
33-
app-id: ${{ secrets.ES_BACKMERGE_APP_ID }} # in secrets or vars?
34-
private-key: ${{ secrets.ES_BACKMERGE_PRIVATE_KEY }}
34+
app-id: ${{ vars.BACKMERGE_APP_ID }}
35+
private-key: ${{ secrets.BACKMERGE_PRIVATE_KEY }}
3536

3637
- name: Checkout tag commit
3738
uses: actions/checkout@v5
@@ -71,7 +72,7 @@ jobs:
7172
7273
BODY="⚠️ This PR is created automatically for backmerge of a new release tag commit \`${{ steps.vars.outputs.tag }}\` into \`develop\`.
7374
74-
It is labeled '[maintainer] auto-pull-request' and is excluded from release notes and version bump logic."
75+
It is labeled `[maintainer] auto-pull-request` and is excluded from release notes and version bump logic."
7576
7677
if gh pr view --repo "${{ github.repository }}" --head "${{ steps.vars.outputs.branch }}" >/dev/null 2>&1; then
7778
echo "PR already exists for head=${{ steps.vars.outputs.branch }}"

.github/workflows/docs.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ env:
5151
IS_RELEASE_TAG: ${{ startsWith(github.ref, 'refs/tags/v') }}
5252
GITHUB_REPOSITORY: ${{ github.repository }}
5353
NOTEBOOKS_DIR: tutorials
54-
DEV_DEPLOYMENT_URL:
55-
https://easyscience.github.io/${{ github.event.repository.name }}/dev
56-
PROD_DEPLOYMENT_URL: https://docs.easydiffraction.org/lib
5754

5855
jobs:
5956
# Job 1: Build the static files for the documentation site
@@ -72,6 +69,10 @@ jobs:
7269
# main.html template. It defines the versioned docs subfolder name
7370
# in the gh-pages branch. If it's a release tag, use the version
7471
# number without the 'v' prefix, otherwise use 'dev'.
72+
# Setting RELEASE_VERSION to be used in mkdocs.yml to show
73+
# the latest release version in the index.md file. If it's a
74+
# release tag, use the tag name, otherwise use the branch name
75+
# for development builds.
7576
- name: Set extra env variables
7677
shell: bash
7778
run: |
@@ -84,19 +85,12 @@ jobs:
8485
fi
8586
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "$GITHUB_ENV"
8687
echo "DOCS_VERSION=${DOCS_VERSION}" >> "$GITHUB_ENV"
88+
echo "DEPLOYMENT_URL=https://easyscience.github.io/${{ github.event.repository.name }}/${DOCS_VERSION}" >> "$GITHUB_ENV"
8789
8890
- name: Check-out repository
8991
uses: actions/checkout@v5
9092
with:
91-
fetch-depth: 0 # full history + tags. needed to get the latest release version
92-
93-
# Save the latest release version of easyscience/diffraction-lib to RELEASE_VERSION
94-
# RELEASE_VERSION is used in the mkdocs.yml file to set release_version.
95-
# The release_version is then needed to display the latest release version in the index.md file
96-
#- name: Set RELEASE_VERSION env variable (latest easydiffraction release)
97-
# run: |
98-
# git fetch --tags --force
99-
# echo "RELEASE_VERSION=$(git describe --tags --abbrev=0)" >> "$GITHUB_ENV"
93+
fetch-depth: 0 # full history with tags; needed for mike to push/deploy docs
10094

10195
# Activate dark mode to create documentation with Plotly charts in dark mode
10296
# Need a better solution to automatically switch the chart colour theme based on the mkdocs material switcher
@@ -147,6 +141,7 @@ jobs:
147141

148142
# Run the notebooks to generate the output cells using multiple cores
149143
- name: Run notebooks
144+
# if: false # Temporarily disabled to speed up the docs build
150145
run: pixi run notebook-exec
151146

152147
- name: Move notebooks to docs/tutorials
@@ -190,9 +185,8 @@ jobs:
190185
run: |
191186
if [[ "${IS_RELEASE_TAG}" == "true" ]]; then
192187
pixi run docs-deploy "${RELEASE_VERSION#v}" latest
193-
echo "🔗 PROD deployment url [${{ env.PROD_DEPLOYMENT_URL }}](${{ env.PROD_DEPLOYMENT_URL }})" >> $GITHUB_STEP_SUMMARY
194188
else
195189
pixi run docs-deploy dev
196-
echo "🔗 DEV deployment url [${{ env.DEV_DEPLOYMENT_URL }}](${{ env.DEV_DEPLOYMENT_URL }})" >> $GITHUB_STEP_SUMMARY
197190
fi
198191
pixi run docs-set-default latest
192+
echo "🔗 deployment url [${{ env.DEPLOYMENT_URL }}](${{ env.DEPLOYMENT_URL }})" >> $GITHUB_STEP_SUMMARY

.github/workflows/release-notes.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ jobs:
3838
shell: bash
3939
run: pixi run dev
4040

41-
- name: Convert tutorial scripts to notebooks
42-
run: pixi run notebook-prepare
43-
44-
- name: Clean up unnecessary script files
45-
run: rm -rf tutorials/*.py
46-
47-
- name: Zip the tutorials directory
48-
run: zip -9 -r tutorials.zip tutorials
49-
5041
- name: Drafts the next release notes
5142
id: draft
5243
uses: enhantica/drafterino@v2
@@ -81,7 +72,5 @@ jobs:
8172
tag_name: ${{ steps.draft.outputs.tag_name }}
8273
name: ${{ steps.draft.outputs.release_name }}
8374
body: ${{ steps.draft.outputs.release_notes }}
84-
files: |
85-
tutorials.zip
8675
env:
8776
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# - Adds the label "[maintainer] auto-pull-request" so it is excluded from changelogs.
77
# - The PR body makes clear that this is automation only (no review needed).
88

9-
name: Release PR creation
9+
name: Release PR (develop -> master)
1010

1111
on:
1212
# Allows you to run this workflow manually from the Actions tab

.github/workflows/test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,16 @@ jobs:
206206
pixi run --environment $env wheel
207207
done
208208
209-
- name: Add easydiffraction package from the built wheel
209+
- name: Install easydiffraction package from the built wheel
210210
shell: bash
211211
run: |
212212
for env in ${{ env.PIXI_ENVS }}; do
213213
echo "🔹🔸🔹🔸🔹 Current env: $env 🔹🔸🔹🔸🔹"
214214
env_prefix="${env%%-*}"
215215
echo "📦 Looking for wheel in dist/$env_prefix/"
216-
whl_path="$(python3 -c "import pathlib; w = sorted(pathlib.Path('dist/${env_prefix}').glob('*.whl')); print(w[0].resolve().as_uri())")"
217-
echo "📦 Adding easydiffraction from: $whl_path"
218-
pixi add --feature $env_prefix --pypi "easydiffraction[all] @ $whl_path"
216+
whl_path="$(find dist/${env_prefix} -name '*.whl' | head -1)"
217+
echo "📦 Installing easydiffraction from: $whl_path"
218+
pixi run --environment $env python -m uv pip install "${whl_path}[all]" --reinstall-package easydiffraction
219219
pixi run --environment $env easydiffraction --version
220220
done
221221

docs/mkdocs.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,22 @@ nav:
6969
- Tutorials:
7070
- Tutorials: tutorials/index.md
7171
- Getting Started:
72-
- LBCO quick CIF: tutorials/quick_from-cif_pd-neut-cwl_LBCO-HRPT.ipynb
73-
- LBCO quick code: tutorials/quick_from-code_pd-neut-cwl_LBCO-HRPT.ipynb
74-
- LBCO basic: tutorials/basic_single-fit_pd-neut-cwl_LBCO-HRPT.ipynb
75-
- PbSO4 advanced: tutorials/advanced_joint-fit_pd-neut-xray-cwl_PbSO4.ipynb
72+
- LBCO quick CIF: tutorials/ed-1.ipynb
73+
- LBCO quick code: tutorials/ed-2.ipynb
74+
- LBCO basic: tutorials/ed-3.ipynb
75+
- PbSO4 advanced: tutorials/ed-4.ipynb
7676
- Standard Diffraction:
77-
- Co2SiO4 pd-neut-cwl: tutorials/cryst-struct_pd-neut-cwl_CoSiO4-D20.ipynb
78-
- HS pd-neut-cwl: tutorials/cryst-struct_pd-neut-cwl_HS-HRPT.ipynb
79-
- Si pd-neut-tof: tutorials/cryst-struct_pd-neut-tof_Si-SEPD.ipynb
80-
- NCAF pd-neut-tof: tutorials/cryst-struct_pd-neut-tof_multidata_NCAF-WISH.ipynb
81-
- LBCO+Si McStas: tutorials/cryst-struct_pd-neut-tof_multiphase-LBCO-Si_McStas.ipynb
77+
- Co2SiO4 pd-neut-cwl: tutorials/ed-5.ipynb
78+
- HS pd-neut-cwl: tutorials/ed-6.ipynb
79+
- Si pd-neut-tof: tutorials/ed-7.ipynb
80+
- NCAF pd-neut-tof: tutorials/ed-8.ipynb
81+
- LBCO+Si McStas: tutorials/ed-9.ipynb
8282
- Pair Distribution Function:
83-
- Ni pd-neut-cwl: tutorials/pdf_pd-neut-cwl_Ni.ipynb
84-
- Si pd-neut-tof: tutorials/pdf_pd-neut-tof_Si-NOMAD.ipynb
85-
- NaCl pd-xray: tutorials/pdf_pd-xray_NaCl.ipynb
83+
- Ni pd-neut-cwl: tutorials/ed-10.ipynb
84+
- Si pd-neut-tof: tutorials/ed-11.ipynb
85+
- NaCl pd-xray: tutorials/ed-12.ipynb
8686
- Workshops & Schools:
87-
- 2025 DMSC: tutorials/dmsc-summer-school-2025_analysis-powder-diffraction.ipynb
87+
- 2025 DMSC: tutorials/ed-13.ipynb
8888
- API Reference:
8989
- API Reference: api-reference/index.md
9090
- analysis: api-reference/analysis.md

docs/tutorials/index.md

Lines changed: 50 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -17,68 +17,63 @@ The tutorials are organized into the following categories.
1717

1818
## Getting Started
1919

20-
- [LBCO `quick` CIF](quick_from-cif_pd-neut-cwl_LBCO-HRPT.ipynb) – A minimal
21-
example intended as a quick reference for users already familiar with the
22-
EasyDiffraction API or who want to see how Rietveld refinement of the
23-
La0.5Ba0.5CoO3 crystal structure can be performed when both the sample model
24-
and experiment are loaded from CIF files. Data collected from constant
25-
wavelength neutron powder diffraction at HRPT at PSI.
26-
- [LBCO `quick` `code`](quick_from-code_pd-neut-cwl_LBCO-HRPT.ipynb) – A minimal
27-
example intended as a quick reference for users already familiar with the
28-
EasyDiffraction API or who want to see an example refinement when both the
29-
sample model and experiment are defined directly in code. This tutorial covers
30-
a Rietveld refinement of the La0.5Ba0.5CoO3 crystal structure using constant
31-
wavelength neutron powder diffraction data from HRPT at PSI.
32-
- [LBCO `basic`](basic_single-fit_pd-neut-cwl_LBCO-HRPT.ipynb) – Demonstrates
33-
the use of the EasyDiffraction API in a simplified, user-friendly manner that
34-
closely follows the GUI workflow for a Rietveld refinement of the
20+
- [LBCO `quick` CIF](ed-1.ipynb) – A minimal example intended as a quick
21+
reference for users already familiar with the EasyDiffraction API or who want
22+
to see how Rietveld refinement of the La0.5Ba0.5CoO3 crystal structure can be
23+
performed when both the sample model and experiment are loaded from CIF files.
24+
Data collected from constant wavelength neutron powder diffraction at HRPT at
25+
PSI.
26+
- [LBCO `quick` `code`](ed-2.ipynb) – A minimal example intended as a quick
27+
reference for users already familiar with the EasyDiffraction API or who want
28+
to see an example refinement when both the sample model and experiment are
29+
defined directly in code. This tutorial covers a Rietveld refinement of the
3530
La0.5Ba0.5CoO3 crystal structure using constant wavelength neutron powder
36-
diffraction data from HRPT at PSI. This tutorial provides a full explanation
37-
of the workflow with detailed comments and descriptions of every step, making
38-
it suitable for users who are new to EasyDiffraction or those who prefer a
39-
more guided approach.
40-
- [PbSO4 `advanced`](advanced_joint-fit_pd-neut-xray-cwl_PbSO4.ipynb)
41-
Demonstrates a more flexible and advanced approach to using the
42-
EasyDiffraction library, intended for users who are more comfortable with
43-
Python programming. This tutorial covers a Rietveld refinement of the PbSO4
44-
crystal structure based on the joint fit of both X-ray and neutron diffraction
45-
data.
31+
diffraction data from HRPT at PSI.
32+
- [LBCO `basic`](ed-3.ipynb) – Demonstrates the use of the EasyDiffraction API
33+
in a simplified, user-friendly manner that closely follows the GUI workflow
34+
for a Rietveld refinement of the La0.5Ba0.5CoO3 crystal structure using
35+
constant wavelength neutron powder diffraction data from HRPT at PSI. This
36+
tutorial provides a full explanation of the workflow with detailed comments
37+
and descriptions of every step, making it suitable for users who are new to
38+
EasyDiffraction or those who prefer a more guided approach.
39+
- [PbSO4 `advanced`](ed-4.ipynb) – Demonstrates a more flexible and advanced
40+
approach to using the EasyDiffraction library, intended for users who are more
41+
comfortable with Python programming. This tutorial covers a Rietveld
42+
refinement of the PbSO4 crystal structure based on the joint fit of both X-ray
43+
and neutron diffraction data.
4644

4745
## Standard Diffraction
4846

49-
- [Co2SiO4 `pd-neut-cwl`](cryst-struct_pd-neut-cwl_HS-HRPT.ipynb) – Demonstrates
50-
a Rietveld refinement of the Co2SiO4 crystal structure using constant
51-
wavelength neutron powder diffraction data from D20 at ILL.
52-
- [HS `pd-neut-cwl`](cryst-struct_pd-neut-cwl_HS-HRPT.ipynb) – Demonstrates a
53-
Rietveld refinement of the HS crystal structure using constant wavelength
54-
neutron powder diffraction data from HRPT at PSI.
55-
- [Si `pd-neut-tof`](cryst-struct_pd-neut-tof_Si-SEPD.ipynb) – Demonstrates a
56-
Rietveld refinement of the Si crystal structure using time-of-flight neutron
57-
powder diffraction data from SEPD at Argonne.
58-
- [NCAF `pd-neut-tof`](cryst-struct_pd-neut-tof_multidata_NCAF-WISH.ipynb)
59-
Demonstrates a Rietveld refinement of the Na2Ca3Al2F14 crystal structure using
60-
two time-of-flight neutron powder diffraction datasets (from two detector
61-
banks) of the WISH instrument at ISIS.
62-
- [LBCO+Si McStas](cryst-struct_pd-neut-tof_multiphase-LBCO-Si_McStas.ipynb)
63-
Demonstrates a Rietveld refinement of the La0.5Ba0.5CoO3 crystal structure
64-
with a small amount of Si impurity as a secondary phase using time-of-flight
65-
neutron powder diffraction data simulated with McStas.
47+
- [Co2SiO4 `pd-neut-cwl`](ed-5.ipynb) – Demonstrates a Rietveld refinement of
48+
the Co2SiO4 crystal structure using constant wavelength neutron powder
49+
diffraction data from D20 at ILL.
50+
- [HS `pd-neut-cwl`](ed-6.ipynb) – Demonstrates a Rietveld refinement of the HS
51+
crystal structure using constant wavelength neutron powder diffraction data
52+
from HRPT at PSI.
53+
- [Si `pd-neut-tof`](ed-7.ipynb) – Demonstrates a Rietveld refinement of the Si
54+
crystal structure using time-of-flight neutron powder diffraction data from
55+
SEPD at Argonne.
56+
- [NCAF `pd-neut-tof`](ed-8.ipynb) – Demonstrates a Rietveld refinement of the
57+
Na2Ca3Al2F14 crystal structure using two time-of-flight neutron powder
58+
diffraction datasets (from two detector banks) of the WISH instrument at ISIS.
59+
- [LBCO+Si McStas](ed-9.ipynb) – Demonstrates a Rietveld refinement of the
60+
La0.5Ba0.5CoO3 crystal structure with a small amount of Si impurity as a
61+
secondary phase using time-of-flight neutron powder diffraction data simulated
62+
with McStas.
6663

6764
## Pair Distribution Function (PDF)
6865

69-
- [Ni `pd-neut-cwl`](pdf_pd-neut-cwl_Ni.ipynb) – Demonstrates a PDF analysis of
70-
Ni using data collected from a constant wavelength neutron powder diffraction
71-
experiment.
72-
- [Si `pd-neut-tof`](pdf_pd-neut-tof_Si-NOMAD.ipynb) – Demonstrates a PDF
73-
analysis of Si using data collected from a time-of-flight neutron powder
74-
diffraction experiment at NOMAD at SNS.
75-
- [NaCl `pd-xray`](pdf_pd-xray_NaCl.ipynb) – Demonstrates a PDF analysis of NaCl
76-
using data collected from an X-ray powder diffraction experiment.
66+
- [Ni `pd-neut-cwl`](ed-10.ipynb) – Demonstrates a PDF analysis of Ni using data
67+
collected from a constant wavelength neutron powder diffraction experiment.
68+
- [Si `pd-neut-tof`](ed-11.ipynb) – Demonstrates a PDF analysis of Si using data
69+
collected from a time-of-flight neutron powder diffraction experiment at NOMAD
70+
at SNS.
71+
- [NaCl `pd-xray`](ed-12.ipynb) – Demonstrates a PDF analysis of NaCl using data
72+
collected from an X-ray powder diffraction experiment.
7773

7874
## Workshops & Schools
7975

80-
- [2025 DMSC](dmsc-summer-school-2025_analysis-powder-diffraction.ipynb) – A
81-
workshop tutorial that demonstrates a Rietveld refinement of the
82-
La0.5Ba0.5CoO3 crystal structure using time-of-flight neutron powder
83-
diffraction data simulated with McStas. This tutorial is designed for the ESS
84-
DMSC Summer School 2025.
76+
- [2025 DMSC](ed-13.ipynb) – A workshop tutorial that demonstrates a Rietveld
77+
refinement of the La0.5Ba0.5CoO3 crystal structure using time-of-flight
78+
neutron powder diffraction data simulated with McStas. This tutorial is
79+
designed for the ESS DMSC Summer School 2025.

docs/user-guide/first-steps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ project = ed.Project()
3232
```
3333

3434
A complete tutorial using the `import` syntax can be found
35-
[here](../../tutorials/basic_single-fit_pd-neut-cwl_LBCO-HRPT/).
35+
[here](../../tutorials/ed-3/).
3636

3737
### Importing specific parts
3838

@@ -59,7 +59,7 @@ project = Project()
5959
```
6060

6161
A complete tutorial using the `from` syntax can be found
62-
[here](../../tutorials/advanced_joint-fit_pd-neut-xray-cwl_PbSO4/).
62+
[here](../../tutorials/ed-4/).
6363

6464
## Utility functions
6565

0 commit comments

Comments
 (0)