Skip to content

Commit bbf8289

Browse files
author
github-actions
committed
Update documentation
1 parent 4240543 commit bbf8289

File tree

110 files changed

+55398
-0
lines changed

Some content is hidden

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

110 files changed

+55398
-0
lines changed
Loading
261 KB
Loading

_modules/index.html

Lines changed: 542 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/binning/binning.html

Lines changed: 1051 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/binning/numba_bin.html

Lines changed: 780 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/binning/utils.html

Lines changed: 699 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/calibrator/delay.html

Lines changed: 956 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/calibrator/energy.html

Lines changed: 3029 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/calibrator/momentum.html

Lines changed: 2769 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/core/config.html

Lines changed: 763 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/core/dfops.html

Lines changed: 989 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/core/metadata.html

Lines changed: 691 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/core/processor.html

Lines changed: 3180 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/dataset/dataset.html

Lines changed: 958 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/diagnostics.html

Lines changed: 689 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/io/hdf5.html

Lines changed: 717 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/io/nexus.html

Lines changed: 571 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/io/tiff.html

Lines changed: 748 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/base/loader.html

Lines changed: 719 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/flash/loader.html

Lines changed: 1522 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/flash/metadata.html

Lines changed: 658 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/generic/loader.html

Lines changed: 695 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/loader_interface.html

Lines changed: 592 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/mirrorutil.html

Lines changed: 904 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/mpes/loader.html

Lines changed: 1532 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/sxp/loader.html

Lines changed: 1571 additions & 0 deletions
Large diffs are not rendered by default.

_modules/sed/loader/utils.html

Lines changed: 730 additions & 0 deletions
Large diffs are not rendered by default.

_sources/index.md.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description lang=en": |
5+
Top-level documentation for sed, with links to the rest
6+
of the site..
7+
html_theme.sidebar_secondary.remove: true
8+
---
9+
10+
# SED documentation
11+
12+
SED (Single Event Data Frame) is a collection of routines and utilities to handle photoelectron resolved datastreams.
13+
It features lazy evaluation of dataframe processing using dask, numba-accelerated multi-dimensional binning, calibration and correction for trARPES (Time- and angle-resolved photoemission spectroscopy) datasets.
14+
The package ensures provenance and FAIR data through metadata tracking, usage of the community defined NeXus format.
15+
16+
```{toctree}
17+
:maxdepth: 2
18+
19+
user_guide/index
20+
21+
```
22+
23+
## Examples
24+
25+
Several example notebooks to demonstrate the functionality of SED for end-to-end data analysis workflows.
26+
27+
```{toctree}
28+
:maxdepth: 2
29+
30+
workflows/index
31+
```
32+
33+
## API
34+
35+
```{toctree}
36+
:maxdepth: 2
37+
38+
misc/contribution
39+
```
40+
41+
## Community and contribution guide
42+
43+
Information about the community behind this theme and how you can contribute.
44+
45+
```{toctree}
46+
:maxdepth: 2
47+
48+
sed/api
49+
```

_sources/misc/contributing.rst.txt

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
==============================
2+
Contributing to sed
3+
==============================
4+
5+
Welcome to the sed project, a collaboration of the Open Community of Multidimensional Photoemission Spectroscopy.
6+
7+
Whether you are a beamline scientist hoping to create a loader for your data, or would like to add a new feature to the project, we welcome your contributions.
8+
9+
This guide will walk you through the process of setting up your development environment, and the workflow for contributing to the project.
10+
11+
12+
Getting Started
13+
===============
14+
15+
1. **Clone the Repository:**
16+
17+
- If you are a member of the repository, clone the repository to your local machine:
18+
19+
.. code-block:: bash
20+
21+
git clone https://github.com/OpenCOMPES/sed.git
22+
23+
- If you are not a member of the repository, clone your fork of the repository to your local machine:
24+
25+
.. code-block:: bash
26+
27+
git clone https://github.com/yourusername/sed.git
28+
29+
30+
31+
2. **Install Python and Poetry:**
32+
- Ensure you have Python 3.8, 3.9, 3.10 or 3.11 and poetry installed.
33+
34+
.. code-block:: bash
35+
36+
pip install pipx
37+
pipx install poetry
38+
39+
3. **Clone Repository:**
40+
41+
.. code-block:: bash
42+
43+
git clone https://github.com/OpenCOMPES/sed.git
44+
45+
4. **Install Dependencies:**
46+
- Navigate to the project directory and install the project dependencies (including development ones) using Poetry:
47+
48+
.. code-block:: bash
49+
50+
poetry install --dev
51+
52+
53+
Development Workflow
54+
=====================
55+
56+
.. note::
57+
This guide assumes that you have Python (version 3.8, 3.9, 3.10, 3.11) and poetry with dev dependencies installed on your machine.
58+
59+
1. **Install pre-commit hooks:** To ensure your code is formatted correctly, install pre-commit hooks:
60+
61+
.. code-block:: bash
62+
63+
pip install pre-commit
64+
65+
66+
2. **Create a Branch:** Create a new branch for your feature or bug fix and make changes:
67+
68+
.. code-block:: bash
69+
70+
git checkout -b feature-branch
71+
72+
73+
3. **Write Tests:** If your contribution introduces new features or fixes a bug, add tests to cover your changes.
74+
75+
4. **Run Tests:** To ensure no funtionality is broken, run the tests:
76+
77+
.. code-block:: bash
78+
79+
pytest tests
80+
81+
82+
5. **Commit Changes:** Commit your changes with a clear and concise commit message:
83+
84+
.. code-block:: bash
85+
86+
git commit -a -m "Your commit message"
87+
88+
89+
6. **Push Changes:** Push your changes to your fork:
90+
91+
.. code-block:: bash
92+
93+
git push origin feature-branch
94+
95+
96+
7. **Open a Pull Request:** Open a pull request against the `main` branch of sed.
97+
98+
Pull Request Guidelines
99+
=======================
100+
101+
Please give a brief description of the changes you have made in your pull request.
102+
If your pull request fixes an issue, please reference the issue number in the pull request description.
103+
104+
Before your pull request can be merged, it must pass the following checks:
105+
106+
- **Linting Check**
107+
108+
- **Tests Check**
109+
110+
- **Code Review:** A maintainer will review your code and provide feedback if necessary.
111+
112+
- **Rebase with Main:** Ensure your branch is up-to-date with the latest changes from the `main` branch.
113+
114+
Once all checks are successful and your code is approved, it will be merged into the main branch.
115+
116+
Developing a Loader
117+
===================
118+
If you are developing a loader for your beamline, please follow the guidelines below.
119+
120+
1. **Create a Loader:**
121+
122+
- Create a new loader in the `sed/loaders` directory.
123+
- The loader should be a subclass of `sed.loader.base.loader.BaseLoader` and implement a few methods. See :ref:`base_loader` for more information.
124+
- Give your class a `__name__` attribute, which is used to select the loader in user config files (See the generic loader for example).
125+
- At the end of your module, provide a `LOADER = YourNameLoader` variable, which is used to register that loader in the registry. See :ref:`loader_interface`.
126+
127+
2. **Write Tests:**
128+
129+
- Write tests for your loader in the `tests/loaders` directory.
130+
- You can also include a small test data in the `tests/data` directory.
131+
132+
3. **Add Loader to Documentation:** Add your loader to the documentation in `docs/sed/loaders.rst`.

_sources/misc/contribution.md.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Development
2+
3+
```{toctree}
4+
:maxdepth: 2
5+
6+
contributing
7+
maintain
8+
```

_sources/misc/maintain.rst.txt

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
How to Maintain
2+
===============
3+
4+
Documentation
5+
-------------
6+
**Build Locally:**
7+
8+
Users can generate documentation locally using the following steps:
9+
10+
1. **Install Dependencies:**
11+
12+
.. code-block:: bash
13+
14+
pip install pipx
15+
pipx install poetry
16+
17+
1. **Clone Repository:**
18+
19+
.. code-block:: bash
20+
21+
git clone https://github.com/OpenCOMPES/sed.git
22+
23+
3. **Navigate to Repository:**
24+
25+
.. code-block:: bash
26+
27+
cd sed
28+
29+
4. **Copy Tutorial Files:**
30+
31+
Doing this step will slow down the build process significantly. It also requires two datasets so 20 GB of free space is required.
32+
33+
.. code-block:: bash
34+
35+
cp -r tutorial docs/
36+
cp -r sed/config docs/sed
37+
38+
5. **Create a virtual environment:**
39+
40+
.. code-block:: bash
41+
42+
poetry shell
43+
44+
6. **Install Dependencies:**
45+
46+
.. code-block:: bash
47+
48+
poetry install --with docs
49+
50+
7. **Build Documentation:**
51+
52+
.. code-block:: bash
53+
54+
poetry run sphinx-build -b html docs _build
55+
56+
8. **View Documentation:**
57+
58+
Open the generated HTML documentation in the `_build` directory.
59+
60+
**GitHub Workflow:**
61+
62+
The documentation workflow is designed to automatically build and deploy documentation. Additionally, maintainers of sed repository can manually trigger the documentation workflow from the Actions tab.
63+
Here's how the workflow works:
64+
65+
1. **Workflow Configuration:**
66+
- The documentation workflow is triggered on push events to the main branch for specific paths and files related to documentation.
67+
- Manual execution is possible using the workflow_dispatch event from the Actions tab.
68+
69+
.. code-block:: yaml
70+
71+
on:
72+
push:
73+
branches: [ main ]
74+
paths:
75+
- sed/**/*
76+
- pyproject.toml
77+
- tutorial/**
78+
- .github/workflows/documentation.yml
79+
workflow_dispatch:
80+
81+
2. **Permissions:**
82+
- The workflow sets permissions for the GITHUB_TOKEN to allow deployment to GitHub Pages.
83+
- Permissions include read access to contents and write access to pages.
84+
85+
.. code-block:: yaml
86+
87+
permissions:
88+
contents: read
89+
pages: write
90+
id-token: write
91+
92+
3. **Concurrent Deployment:**
93+
- Only one concurrent deployment is allowed to prevent conflicts.
94+
- Future idea would be to have different deployment for different versions.
95+
- Runs queued between an in-progress run and the latest queued run are skipped.
96+
97+
.. code-block:: yaml
98+
99+
concurrency:
100+
group: "pages"
101+
cancel-in-progress: false
102+
103+
4. **Workflow Steps:**
104+
- The workflow is divided into two jobs: build and deploy.
105+
106+
a. **Build Job:**
107+
- Sets up the build environment, checks out the repository, and installs necessary dependencies using Poetry.
108+
- Installs notebook dependencies and Pandoc.
109+
- Copies tutorial files to the docs directory and removes unnecessary notebooks.
110+
- Downloads RAW data for tutorials.
111+
- Builds Sphinx documentation.
112+
113+
b. **Deploy Job:**
114+
- Deploys the built documentation to GitHub Pages.
115+
116+
5. **Manual Execution:**
117+
- To manually trigger the workflow, go to the Actions tab on GitHub.
118+
- Click on "Run workflow" for the "documentation" workflow.
119+
120+
121+
Release
122+
-------
123+
124+
**Creating a Release**
125+
126+
To create a release, follow these steps:
127+
128+
a. **Create a Git Release on Github:**
129+
130+
- On the "tags" page, select "releases", and press "Draft a new release".
131+
- At "choose a tag", type in the name of the new release tag. Make sure to have a **v** prefix in the tag name, e.g. **v0.1.10**.
132+
- Confirm creation of the tag, and press "Generate release notes". Edit the notes as appropriate (e.g. remove auto-generated update PRs).
133+
- Press "Publish release". This will create the new tag and release entry, and issue the build and upload to PyPI.
134+
135+
b. **Check PyPI for the Published Package:**
136+
137+
- Visit the PyPI page (https://pypi.org/project/sed-processor/).
138+
- Confirm that the new version (e.g., 0.1.10) has been published.
139+
140+
c. **If you don't see update on PyPI:**
141+
142+
- Visit the GitHub Actions page and monitor the Release workflow (https://github.com/OpenCOMPES/sed/actions/workflows/release.yml).
143+
- Check if errors occured.
144+
145+
146+
**Understanding the Release Workflow**
147+
148+
- *Release Job:*
149+
- This workflow is responsible for versioning and releasing the package.
150+
- A release job runs on every git tag push (e.g., `git tag v0.1.5`) and publishes the package to PyPI.
151+
- If the publish is successful, the version in the `pyproject.toml` file is updated and pushed to the main branch.
152+
153+
- *Prerelease Job:*
154+
- This workflow is triggered automatically on every pull request (PR) to the main branch.
155+
- It increments the version number for prerelease (e.g., from 0.1.5 to 0.1.6a0 to 0.1.6a1) and publishes the package to PyPI.
156+
- If the publish is successful, the version in the `pyproject.toml` file is updated and pushed to the main branch.

_sources/sed/api.rst.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
======
2+
API
3+
======
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
core
9+
dfops
10+
loader
11+
binning
12+
calibrator
13+
dataset
14+
diagnostic
15+
io
16+
metadata
17+
config

_sources/sed/binning.rst.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Binning
2+
===================================================
3+
Main functions
4+
###################################################
5+
6+
.. automodule:: sed.binning
7+
:members:
8+
:undoc-members:
9+
10+
11+
12+
Used helper functions
13+
##################################################
14+
15+
.. automodule:: sed.binning.numba_bin
16+
:members:
17+
:undoc-members:
18+
19+
.. automodule:: sed.binning.utils
20+
:members:
21+
:undoc-members:

0 commit comments

Comments
 (0)