From 9c41279c0f53cead60ed5322a9de06f9149a1fc0 Mon Sep 17 00:00:00 2001 From: YooSunYoung <17974113+YooSunYoung@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:24:59 +0200 Subject: [PATCH 1/8] Fix typos in the documentation. --- docs/about/index.md | 26 ++++++++++++++------------ docs/conf.py | 7 +++---- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/about/index.md b/docs/about/index.md index 207d1dd..ff19bce 100644 --- a/docs/about/index.md +++ b/docs/about/index.md @@ -8,18 +8,20 @@ McStasToX is an open source project by the [European Spallation Source ERIC](htt McStasToX is available as open source under the [BSD-3 license](https://opensource.org/licenses/BSD-3-Clause). -## Citing McStasToX - -Please cite the following: - -[![DOI](https://zenodo.org/badge/FIXME.svg)](https://zenodo.org/doi/10.5281/zenodo.FIXME) - -To cite a specific version of McStasToX, select the desired version on Zenodo to get the corresponding DOI. - -## Older versions of the documentation - -Older versions of the documentation pages can be found under the assets of each [release](https://github.com/mccode-dev/mcstastox/releases). -Simply download the archive, unzip and view locally in a web browser. + + + + + + + + + + + + + + ## Source code and development diff --git a/docs/conf.py b/docs/conf.py index faa01b5..bfabcdf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,8 +15,8 @@ # General information about the project. project = 'McStasToX' -copyright = '2025 Scipp contributors' -author = 'Scipp contributors' +copyright = '2025 mccode contributors' +author = 'mccode contributors' html_show_sourcelink = True @@ -145,8 +145,7 @@ "image_dark": "_static/logo-dark.svg", }, "external_links": [ - {"name": "Scipp", "url": "https://mccode-dev.github.io"}, - {"name": "ScippNexus", "url": "https://mccode-dev.github.io/scippnexus"}, + {"name": "Scipp", "url": "https://scipp.github.io"}, ], "icon_links": [ { From d28b52eccc33b65e143aab5d5247083ab0069912 Mon Sep 17 00:00:00 2001 From: YooSunYoung <17974113+YooSunYoung@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:08:08 +0200 Subject: [PATCH 2/8] Remove redundant page links and fix header indicator. [skip ci] --- docs/developer/getting-started.md | 1 - docs/developer/index.md | 1 - docs/user-guide/overall_demo.ipynb | 42 +++++++++++++++--------------- docs/user-guide/scipp_demo.ipynb | 22 ++++++++-------- pixi.toml | 4 +-- 5 files changed, 34 insertions(+), 36 deletions(-) diff --git a/docs/developer/getting-started.md b/docs/developer/getting-started.md index 194e1cd..b0858fd 100644 --- a/docs/developer/getting-started.md +++ b/docs/developer/getting-started.md @@ -1,4 +1,3 @@ - # Getting started ## Setting up diff --git a/docs/developer/index.md b/docs/developer/index.md index 9dc534a..352fadf 100644 --- a/docs/developer/index.md +++ b/docs/developer/index.md @@ -12,5 +12,4 @@ maxdepth: 2 getting-started coding-conventions -dependency-management ``` diff --git a/docs/user-guide/overall_demo.ipynb b/docs/user-guide/overall_demo.ipynb index c260722..3e0d035 100644 --- a/docs/user-guide/overall_demo.ipynb +++ b/docs/user-guide/overall_demo.ipynb @@ -65,7 +65,7 @@ "id": "6", "metadata": {}, "source": [ - "### Run simulation" + "## Run simulation" ] }, { @@ -93,7 +93,7 @@ "id": "9", "metadata": {}, "source": [ - "### Histogram data to display" + "## Histogram data to display" ] }, { @@ -133,7 +133,7 @@ "id": "13", "metadata": {}, "source": [ - "### Show list of components found in NeXus file" + "## Show list of components found in NeXus file" ] }, { @@ -154,7 +154,7 @@ "id": "15", "metadata": {}, "source": [ - "#### Show list of these with available data" + "### Show list of these with available data" ] }, { @@ -185,7 +185,7 @@ "id": "18", "metadata": {}, "source": [ - "#### Show list of these with geometry information" + "### Show list of these with geometry information" ] }, { @@ -204,7 +204,7 @@ "id": "20", "metadata": {}, "source": [ - "#### Show monitors with pixel ID's" + "### Show monitors with pixel ID's" ] }, { @@ -234,7 +234,7 @@ "id": "23", "metadata": {}, "source": [ - "### Get local pixel coordinates for a given component" + "## Get local pixel coordinates for a given component" ] }, { @@ -255,7 +255,7 @@ "id": "25", "metadata": {}, "source": [ - "### Get global coordinates for a given component" + "## Get global coordinates for a given component" ] }, { @@ -276,7 +276,7 @@ "id": "27", "metadata": {}, "source": [ - "### Get sample position as well" + "## Get sample position as well" ] }, { @@ -298,7 +298,7 @@ "id": "29", "metadata": {}, "source": [ - "### Get pixel coordinates for list of monitors" + "## Get pixel coordinates for list of monitors" ] }, { @@ -320,7 +320,7 @@ "id": "31", "metadata": {}, "source": [ - "### Include source and get all pixel coordinates" + "## Include source and get all pixel coordinates" ] }, { @@ -343,7 +343,7 @@ "id": "33", "metadata": {}, "source": [ - "### Export to (simple) Scipp object" + "## Export to (simple) Scipp object" ] }, { @@ -374,7 +374,7 @@ "id": "36", "metadata": {}, "source": [ - "### Plot event positions" + "## Plot event positions" ] }, { @@ -394,7 +394,7 @@ "id": "38", "metadata": {}, "source": [ - "### Perform coordinate transforms" + "## Perform coordinate transforms" ] }, { @@ -438,7 +438,7 @@ "id": "42", "metadata": {}, "source": [ - "## Load all data in simple scipp format" + "# Load all data in simple scipp format" ] }, { @@ -471,7 +471,7 @@ "id": "45", "metadata": {}, "source": [ - "### Convert to d-space and compare\n", + "## Convert to d-space and compare\n", "Lets compare data from all the detectors with the previous scipp object that only contained one." ] }, @@ -494,7 +494,7 @@ "id": "47", "metadata": {}, "source": [ - "### Also access to data directly\n", + "## Also access to data directly\n", "Its possible to get access to the data directly if necessary, this is demonstrated here." ] }, @@ -534,7 +534,7 @@ "id": "50", "metadata": {}, "source": [ - "### Add additional data to a scipp object\n", + "## Add additional data to a scipp object\n", "We can add data read directly to the scipp object, here the actual wavelength recorded by McStas." ] }, @@ -572,7 +572,7 @@ "id": "53", "metadata": {}, "source": [ - "### Plotting comparison between actual and calculated wavelength" + "## Plotting comparison between actual and calculated wavelength" ] }, { @@ -597,7 +597,7 @@ ], "metadata": { "kernelspec": { - "display_name": "img-dev-310", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -611,7 +611,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.12.13" } }, "nbformat": 4, diff --git a/docs/user-guide/scipp_demo.ipynb b/docs/user-guide/scipp_demo.ipynb index bb1ed9a..f0f39b9 100644 --- a/docs/user-guide/scipp_demo.ipynb +++ b/docs/user-guide/scipp_demo.ipynb @@ -5,7 +5,7 @@ "id": "0", "metadata": {}, "source": [ - "# McStasRead demo" + "# McStasRead demo - with scipp" ] }, { @@ -65,7 +65,7 @@ "id": "6", "metadata": {}, "source": [ - "### Run simulation" + "## Run simulation" ] }, { @@ -93,7 +93,7 @@ "id": "9", "metadata": {}, "source": [ - "### Histogram data to display" + "## Histogram data to display" ] }, { @@ -133,7 +133,7 @@ "id": "13", "metadata": {}, "source": [ - "### Show list of components found in NeXus file" + "## Show list of components found in NeXus file" ] }, { @@ -154,7 +154,7 @@ "id": "15", "metadata": {}, "source": [ - "#### Show list of these with available data" + "### Show list of these with available data" ] }, { @@ -185,7 +185,7 @@ "id": "18", "metadata": {}, "source": [ - "#### Show list of these with geometry information" + "### Show list of these with geometry information" ] }, { @@ -204,7 +204,7 @@ "id": "20", "metadata": {}, "source": [ - "#### Show monitors with pixel ID's" + "### Show monitors with pixel ID's" ] }, { @@ -234,7 +234,7 @@ "id": "23", "metadata": {}, "source": [ - "### Export to Scipp object\n", + "## Export to Scipp object\n", "Using the *export_scipp* method we get a scipp DataGroup that contains:\n", "- events : the data\n", "- positions : positions of the pixel ids\n", @@ -311,7 +311,7 @@ "id": "30", "metadata": {}, "source": [ - "## Plot pixels with intensities\n", + "### Plot pixels with intensities\n", "With this setup we can plot the total intensity in each pixel rather than all events individually." ] }, @@ -332,7 +332,7 @@ "id": "32", "metadata": {}, "source": [ - "### Perform coordinate transforms\n", + "## Perform coordinate transforms\n", "Coordinate transformations can be done almost as before, they just need to be summed over all *pixel_id* when plotted." ] }, @@ -385,7 +385,7 @@ ], "metadata": { "kernelspec": { - "display_name": "img-dev-310", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/pixi.toml b/pixi.toml index 30e68d5..7ea5322 100644 --- a/pixi.toml +++ b/pixi.toml @@ -46,12 +46,12 @@ mcstastox = { path = "./", editable = true, extras = ["scipp", "docs"] } [feature.docs.tasks.docs] -cmd = "python -m sphinx -v -b html -d build/docs_doctrees docs build/html" +cmd = "python -m sphinx -W -j2 -v -b html -d build/docs_doctrees docs build/html" [feature.docs.tasks.linkcheck] description = "Check links in the documentation." -cmd = "python -m sphinx -j2 -v -b linkcheck -d build/docs_doctrees docs build/html" +cmd = "python -m sphinx -W -j2 -v -b linkcheck -d build/docs_doctrees docs build/html" # ==================== Environments ==================== From 24d485f893eefa234759f751ab2770365c2b45a8 Mon Sep 17 00:00:00 2001 From: YooSunYoung <17974113+YooSunYoung@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:14:09 +0200 Subject: [PATCH 3/8] Fix documentation deploy workflow. [skip ci] --- .github/workflows/docs.yml | 3 +-- pixi.toml | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 07dabac..f54f04d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -50,7 +50,6 @@ jobs: env: ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }} ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }} - DOCSWORKDIR: "build/docs" steps: - uses: actions/checkout@v6 with: @@ -75,5 +74,5 @@ jobs: if: ${{ inputs.publish }} with: branch: gh-pages - folder: html + folder: build/html single-commit: true diff --git a/pixi.toml b/pixi.toml index 7ea5322..8672ba1 100644 --- a/pixi.toml +++ b/pixi.toml @@ -51,7 +51,9 @@ cmd = "python -m sphinx -W -j2 -v -b html -d build/docs_doctrees docs build/html [feature.docs.tasks.linkcheck] description = "Check links in the documentation." -cmd = "python -m sphinx -W -j2 -v -b linkcheck -d build/docs_doctrees docs build/html" +# We do not fail on warning yet until we fianalize the documentation material. +# cmd = "python -m sphinx -W -j2 -v -b linkcheck -d build/docs_doctrees docs build/html" +cmd = "python -m sphinx -j2 -v -b linkcheck -d build/docs_doctrees docs build/html" # ==================== Environments ==================== From fd7a8e509159313707270839cc28c53f4da46600 Mon Sep 17 00:00:00 2001 From: YooSunYoung <17974113+YooSunYoung@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:17:04 +0200 Subject: [PATCH 4/8] Fix documentation deploy workflow. [skip ci] --- .github/workflows/docs.yml | 2 +- pixi.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f54f04d..ab08c45 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -62,7 +62,7 @@ jobs: frozen: true environments: docs - run: pixi run --locked -e docs docs - - run: pixi run --locked -e docs linkcheck + - run: pixi run --frozen -e docs linkcheck if: ${{ inputs.linkcheck }} - uses: actions/upload-artifact@v7 id: artifact-upload-step diff --git a/pixi.toml b/pixi.toml index 8672ba1..bf9596c 100644 --- a/pixi.toml +++ b/pixi.toml @@ -46,7 +46,7 @@ mcstastox = { path = "./", editable = true, extras = ["scipp", "docs"] } [feature.docs.tasks.docs] -cmd = "python -m sphinx -W -j2 -v -b html -d build/docs_doctrees docs build/html" +cmd = "python -m sphinx -j2 -v -b html -d build/docs_doctrees docs build/html" [feature.docs.tasks.linkcheck] From 64cd087dbbc6e5a37502637922e349ab9efb3231 Mon Sep 17 00:00:00 2001 From: YooSunYoung <17974113+YooSunYoung@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:19:41 +0200 Subject: [PATCH 5/8] Temporarily skip documentation linkcheck for developers guide link. [skip ci] --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ab08c45..2057818 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -62,8 +62,8 @@ jobs: frozen: true environments: docs - run: pixi run --locked -e docs docs - - run: pixi run --frozen -e docs linkcheck - if: ${{ inputs.linkcheck }} + # - run: pixi run --frozen -e docs linkcheck + # if: ${{ inputs.linkcheck }} - uses: actions/upload-artifact@v7 id: artifact-upload-step with: From dcaa3d4c18d5f3cbcee43ba2f78d182edf52ef04 Mon Sep 17 00:00:00 2001 From: YooSunYoung <17974113+YooSunYoung@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:34:22 +0200 Subject: [PATCH 6/8] Fix overall guide in the main page. --- docs/index.md | 59 +++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/docs/index.md b/docs/index.md index b07b1ba..4ee6445 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,27 +1,29 @@ -:::{image} _static/logo.svg -:class: only-light -:alt: McStasToX -:width: 60% -:align: center -::: -:::{image} _static/logo-dark.svg -:class: only-dark -:alt: McStasToX -:width: 60% -:align: center -::: - -```{raw} html - -``` - -```{role} transparent -``` + + + + + + + + + + + + + + + + + + + + + + + -# {transparent}`McStasToX` + +# McStasToX
Python package to read McStas data and export as python objects in different formats or as other files. @@ -34,10 +36,17 @@ :heading-offset: 1 ::: -:::{include} user-guide/overall_demo.ipynb -:heading-offset: 1 +## Quick Start + +::::{grid} 1 + +:::{grid-item-card} {octicon}``eye;1em`` Quick Start with Overall Guide +:link: user-guide/overall_demo.ipynb + ::: +:::: + ## Get in touch - If you have questions that are not answered by these documentation pages, ask on [discussions](https://github.com/mccode-dev/mcstastox/discussions). Please include a self-contained reproducible example if possible. From 268b1a35ad1302f042808a88c106f949499a0a4c Mon Sep 17 00:00:00 2001 From: YooSunYoung <17974113+YooSunYoung@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:37:38 +0200 Subject: [PATCH 7/8] Uncomment linkcheck and upgrade github pages deploy action. --- .github/workflows/docs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2057818..5b2b4b0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -62,15 +62,15 @@ jobs: frozen: true environments: docs - run: pixi run --locked -e docs docs - # - run: pixi run --frozen -e docs linkcheck - # if: ${{ inputs.linkcheck }} + - run: pixi run --frozen -e docs linkcheck + if: ${{ inputs.linkcheck }} - uses: actions/upload-artifact@v7 id: artifact-upload-step with: name: docs_html path: build/html/ - run: echo "::notice::https://remote-unzip.deno.dev/${{ github.repository }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }}" - - uses: JamesIves/github-pages-deploy-action@v4.7.3 + - uses: JamesIves/github-pages-deploy-action@v4.8.0 if: ${{ inputs.publish }} with: branch: gh-pages From a65b507c368016a413df72e92e7fee625c3f3f66 Mon Sep 17 00:00:00 2001 From: YooSunYoung <17974113+YooSunYoung@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:48:09 +0200 Subject: [PATCH 8/8] Fix conda badge. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a38bc43..85b51d0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md) [![PyPI badge](http://img.shields.io/pypi/v/mcstastox.svg)](https://pypi.python.org/pypi/mcstastox) -[![Anaconda-Server Badge](https://anaconda.org/mccode-dev/mcstastox/badges/version.svg)](https://anaconda.org/mccode-dev/mcstastox) +[![Conda Forge Badge](https://img.shields.io/conda/v/conda-forge/mcstastox)](https://prefix.dev/channels/conda-forge/packages/mcstastox) [![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE) # McStasToX