diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 07dabac..5b2b4b0 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: @@ -63,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 @@ -71,9 +70,9 @@ jobs: 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 - folder: html + folder: build/html single-commit: true 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 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": [ { 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/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. 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..bf9596c 100644 --- a/pixi.toml +++ b/pixi.toml @@ -46,11 +46,13 @@ 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 -j2 -v -b html -d build/docs_doctrees docs build/html" [feature.docs.tasks.linkcheck] description = "Check links in the documentation." +# 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 ====================