Skip to content

Commit dcc7f92

Browse files
Merge pull request #219 from easyscience/develop
πŸŽ‰ Release: merge develop into master
2 parents 0d9f10e + a46feb9 commit dcc7f92

218 files changed

Lines changed: 19798 additions & 60013 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.copier-answers.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WARNING: Do not edit this file manually.
22
# Any changes will be overwritten by Copier.
3-
_commit: v0.12.0
3+
_commit: v0.13.1-4-g190905c
44
_src_path: gh:easyscience/templates
55
app_docs_url: https://easyscience.github.io/diffraction-app
66
app_doi: 10.5281/zenodo.18163581

β€Ž.github/workflows/docs.ymlβ€Ž

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,14 @@ jobs:
136136

137137
# Build the static files for the documentation site for local inspection
138138
# Input: docs/ directory containing the Markdown files
139-
# Output: site/ directory containing the generated HTML files
139+
# Output: docs/site/ directory containing the generated HTML files
140+
# Also verifies that mkdocstrings generated docs/site/objects.inv.
140141
- name: Build site for local check
141-
run: pixi run docs-build-local
142+
run: |
143+
pixi run docs-build-local
144+
pixi run docs-inventory-check
142145
143-
# Upload the static files from the site/ directory to be used for
146+
# Upload the static files from the docs/site/ directory to be used for
144147
# local check
145148
- name: Upload built site as artifact
146149
uses: ./.github/actions/upload-artifact

β€Ž.github/workflows/pypi-test.ymlβ€Ž

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,32 +38,15 @@ jobs:
3838
frozen: false
3939

4040
- name: Init pixi project
41-
run: pixi init easydiffraction
41+
run:
42+
pixi init --platform linux-64 --platform osx-arm64 --platform win-64
43+
easydiffraction
4244

43-
- name: Configure Pixi platforms
45+
- name: Configure pixi platforms
4446
working-directory: easydiffraction
45-
shell: bash
4647
run: |
47-
set -euo pipefail
48-
49-
case "$RUNNER_OS" in
50-
Linux)
51-
pixi_platforms='[{ name = "linux-64-glibc-2-35", platform = "linux-64", glibc = "2.35" }]'
52-
;;
53-
macOS)
54-
pixi_platforms='[{ name = "osx-arm64-macos-14-0", platform = "osx-arm64", macos = "14.0" }]'
55-
;;
56-
Windows)
57-
pixi_platforms='["win-64"]'
58-
;;
59-
*)
60-
echo "Unsupported runner OS: $RUNNER_OS"
61-
exit 1
62-
;;
63-
esac
64-
65-
PIXI_PLATFORMS="$pixi_platforms" python -c 'import os, pathlib; path = pathlib.Path("pixi.toml"); text = path.read_text(); path.write_text(text.replace(text.split("platforms = ", 1)[1].split("\n", 1)[0], os.environ["PIXI_PLATFORMS"], 1))'
66-
pixi workspace platform list
48+
pixi workspace platform edit linux-64 --glibc 2.35 --no-install
49+
pixi workspace platform edit osx-arm64 --macos 14.0 --no-install
6750
6851
- name: Add Python 3.14
6952
working-directory: easydiffraction

β€Ž.github/workflows/test.ymlβ€Ž

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -228,28 +228,12 @@ jobs:
228228
echo "πŸ”ΉπŸ”ΈπŸ”ΉπŸ”ΈπŸ”Ή Python: $py_ver πŸ”ΉπŸ”ΈπŸ”ΉπŸ”ΈπŸ”Ή"
229229
230230
echo "Initializing pixi project"
231-
pixi init easydiffraction_py$py_ver
231+
pixi init --platform linux-64 --platform osx-arm64 --platform win-64 easydiffraction_py$py_ver
232232
cd easydiffraction_py$py_ver
233233
234234
echo "Configure Pixi platforms"
235-
case "$RUNNER_OS" in
236-
Linux)
237-
pixi_platforms='[{ name = "linux-64-glibc-2-35", platform = "linux-64", glibc = "2.35" }]'
238-
;;
239-
macOS)
240-
pixi_platforms='[{ name = "osx-arm64-macos-14-0", platform = "osx-arm64", macos = "14.0" }]'
241-
;;
242-
Windows)
243-
pixi_platforms='["win-64"]'
244-
;;
245-
*)
246-
echo "Unsupported runner OS: $RUNNER_OS"
247-
exit 1
248-
;;
249-
esac
250-
251-
PIXI_PLATFORMS="$pixi_platforms" python -c 'import os, pathlib; path = pathlib.Path("pixi.toml"); text = path.read_text(); path.write_text(text.replace(text.split("platforms = ", 1)[1].split("\n", 1)[0], os.environ["PIXI_PLATFORMS"], 1))'
252-
pixi workspace platform list
235+
pixi workspace platform edit linux-64 --glibc 2.35 --no-install
236+
pixi workspace platform edit osx-arm64 --macos 14.0 --no-install
253237
254238
echo "Add Python $py_ver"
255239
pixi add "python=$py_ver"

β€Ž.prettierignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ src/easydiffraction/display/plotters/assets/
4343
.cache
4444
deps/
4545
tmp/
46+
.hypothesis/

β€Ždocs/dev/adrs/accepted/background-auto-estimate.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ one-line summary (Β§1). Empirical calibration was carried out in Phase 2:
369369
- The Stage-2 tolerance multiplier (`c Β· Οƒ`, `c = 2`) and the width
370370
percentile (~75th) are first-cut constants; they were validated β€” not
371371
exhaustively swept β€” against the representative CWL
372-
(`refine-lbco-hrpt-from-data`) and TOF (`fitting-exercise-si-lbco`)
372+
(`refine-lbco-hrpt-from-data`) and TOF (`exercise-refine-si-lbco`)
373373
datasets plus the analytic unit cases, and produce sensible
374374
backgrounds there. Re-tuning stays possible if a future dataset needs
375375
it.
@@ -488,7 +488,7 @@ curve. **Phase 2 outcome:** the functional regression validates two
488488
representative datasets β€” CWL
489489
[`refine-lbco-hrpt-from-data.py`](../../../../docs/docs/tutorials/refine-lbco-hrpt-from-data.py)
490490
and TOF
491-
[`fitting-exercise-si-lbco.py`](../../../../docs/docs/tutorials/fitting-exercise-si-lbco.py)
491+
[`exercise-refine-si-lbco.py`](../../../../docs/docs/tutorials/exercise-refine-si-lbco.py)
492492
β€” comparing the estimated curve against the hand-placed reference to
493493
within a fraction of the measured signal scale; the single `arpls`
494494
default and the first-cut constants hold for both. Sloping and curved

β€Ždocs/dev/adrs/accepted/resource-naming.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ There is no `ed-19` tutorial β€” id 19 is a dataset only.
277277
| ed-10 | PDF: Ni, NPD | `pdf-ni-npd` |
278278
| ed-11 | PDF: Si, NOMAD (SNS) | `pdf-si-nomad` |
279279
| ed-12 | PDF: NaCl, XRD | `pdf-nacl-xrd` |
280-
| ed-13 | Fitting exercise: Si, LBCO | `fitting-exercise-si-lbco` |
280+
| ed-13 | Refinement exercise: Si, LBCO | `exercise-refine-si-lbco` |
281281
| ed-14 | Refinement: Tb2Ti2O7, HEiDi | `refine-tbti-heidi` |
282282
| ed-15 | Refinement: Taurine, SENJU | `refine-taurine-senju` |
283283
| ed-16 | Joint: Si, Bragg+PDF | `joint-si-bragg-pdf` |

β€Ždocs/dev/issues/open/lowest_live-notebook-plotly-delivery-loader-vs-native-mimetype.mdβ€Ž

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,34 @@ gap. Two ways to fix it:
3333
delivery. Cons: more moving parts; depends on the notebook being
3434
**trusted** for a reopened (not re-run) notebook to re-render.
3535

36-
**Current choice:** Option 2 (keeps the live-notebook extras). Revisit
37-
Option 1 if the loader proves fragile across notebook frontends or the
38-
maintenance cost outweighs the three behaviours.
36+
- **Colab transport β€” versioned frame-local assets.** Colab isolates
37+
every cell output in its own iframe, so the once-per-kernel browser
38+
state assumed by Option 2 cannot cross cells. In Colab only, every
39+
figure output loads the version-matched Plotly bundle and
40+
`ed-figures.js` from the published documentation assets in parallel
41+
(the loader only needs Plotly once it renders), then calls the same
42+
`renderSpec` entry point. `google.colab.output.pauseOutputUntil` holds
43+
the output frame until the figure β€” or a visible error message β€” is on
44+
screen. Concurrent outputs in one cell share frame-global loading
45+
promises, so each asset is fetched and parsed only once. An immutable,
46+
exact-release-tag jsDelivr URL is the fallback while a new
47+
documentation version is deploying or if that deployment fails. Dev
48+
builds intentionally use only `/dev/` to avoid mixing arbitrary local
49+
code with the loader from another revision. The browser cache avoids
50+
embedding or repeatedly transferring the runtime, while all
51+
loader-owned theme, resize, and legend behaviour remains intact.
52+
Documentation `SHARED` mode is selected first and is unaffected.
53+
54+
Saved Colab outputs still depend on the host restoring their dynamic
55+
scripts. Until that behaviour is confirmed manually, reopen-and-view
56+
without re-running is not guaranteed; re-run a cell if its restored
57+
output remains at the loading placeholder. An end-to-end test of a dev
58+
build likewise requires its matching loader to have reached `/dev/`.
59+
60+
**Current choice:** Option 2 for JupyterLab, with the frame-local asset
61+
transport for Colab. Revisit Option 1 if the loader proves fragile
62+
across notebook frontends or the maintenance cost outweighs the three
63+
behaviours.
3964

4065
**Depends on:** nothing.
4166

β€Ždocs/dev/issues/open/medium_add-mixin-tests-for-tof-size-strain-parameters.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
**Type:** Testing
66

77
The microstructural size/strain feature added four `Parameter`s to the
8-
TOF peak mixin (`broad_gauss_size_g`, `broad_gauss_strain_g`,
9-
`broad_lorentz_size_l`, `broad_lorentz_strain_l` in
8+
TOF peak mixin (`broad_gauss_size`, `broad_gauss_strain`,
9+
`broad_lorentz_size`, `broad_lorentz_strain` in
1010
`src/easydiffraction/datablocks/experiment/categories/peak/tof_mixins.py`),
1111
but they are never asserted at the mixin-test level. Their value
1212
hand-off is covered indirectly via

β€Ždocs/dev/package-structure/full.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@
305305
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ πŸ“„ factory.py
306306
β”‚ β”‚ β”‚ β”‚ β”‚ └── 🏷️ class BackgroundFactory
307307
β”‚ β”‚ β”‚ β”‚ └── πŸ“„ line_segment.py
308+
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ 🏷️ class _EstimationArrays
308309
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ 🏷️ class LineSegment
309310
β”‚ β”‚ β”‚ β”‚ └── 🏷️ class LineSegmentBackground
310311
β”‚ β”‚ β”‚ β”œβ”€β”€ πŸ“ calculator

0 commit comments

Comments
Β (0)