Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
db2844f
docs: added github link and source code links to github pages
rolfverberg May 4, 2026
f5f950c
docs: fix added github link to new sphinx autodoc version
rolfverberg May 4, 2026
b6076c1
Update EDD.md
rolfverberg May 4, 2026
fd32464
add: Added details to documentation on EDD detector configuration
rolfverberg May 5, 2026
38822cc
docs: added a link to github issues on the github pages
rolfverberg May 5, 2026
e2ba909
Update README.md
rolfverberg May 6, 2026
4247526
doc: add recommended XPS23 detector config confirmed with measurement
keara-soloway Jun 5, 2026
f88e147
doc: added AUTHORS and docs/CONTRIBUTIONS.md
rolfverberg Jun 10, 2026
8b9d406
doc: fixed the contribution path in readme
rolfverberg Jun 10, 2026
58a8110
build: updated the deployment actions
rolfverberg Jun 24, 2026
53d9c37
build: added a specific doc push deploy pages action
rolfverberg Jun 24, 2026
16bfb5e
build: set permission/contents to write inactions
rolfverberg Jun 24, 2026
e2ff5d9
build: change tag for deploy pages from docs push
rolfverberg Jun 24, 2026
9438771
build: try fix ghpages instead of readme
rolfverberg Jun 24, 2026
b93bb29
build: try fix ghpages instead of readme
rolfverberg Jun 24, 2026
7b88071
build: revert permissiones back to before updating deployment
rolfverberg Jun 24, 2026
3b1b19b
build: removes the docs branch push deployment
rolfverberg Jun 24, 2026
677f801
build: try deploy fro doc branch again
rolfverberg Jun 24, 2026
817bb98
build: try deploy from doc branch again
rolfverberg Jun 24, 2026
924f14a
build: try deploy from doc branch again
rolfverberg Jun 30, 2026
e3a2ef0
build: try deploy from doc branch again
rolfverberg Jun 30, 2026
114dd14
build: try deploy from doc branch again
rolfverberg Jul 7, 2026
a1a5ed3
build: try deploy from doc branch again
rolfverberg Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/manual-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -21,7 +23,7 @@ jobs:
sed -i "s/PACKAGE_VERSION/0.0.1/" setup.py
sed -i "s/PACKAGE_VERSION/0.0.1/" CHAP/__init__.py
sed -i "s/PACKAGE_VERSION/0.0.1/" docs/conf.py
sed -i "s/PACKAGE_VERSION/0.0.1/" docs/installation.md
cat setup.py

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/pages-deploy-from-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Deploy Sphinx documentation to Pages from docs branch push

on:
push:
branches:
- docs

defaults:
run:
shell: bash -l {0}

jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Update docs configuration with version (tag) name
run: |
sed -i "s/PACKAGE_VERSION/0.0.1/" setup.py
sed -i "s/PACKAGE_VERSION/0.0.1/" CHAP/__init__.py
sed -i "s/PACKAGE_VERSION/0.0.1/" docs/conf.py
cat setup.py

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.10'
environment-file: docs/environment.yml
auto-activate: true
activate-environment: sphinx
conda-remove-defaults: true
use-mamba: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx
pip install sphinx-math-dollar
pip install sphinx-rtd-theme
pip install myst-parser
#pip install autodoc_pydantic

- name: Install package
run: |
pip install -e .
conda list

- name: Generate .rst files with sphinx-apidoc
run: |
sphinx-apidoc -M --tocfile api_documentation --module-first -o docs CHAP CHAP/hdrm CHAP/inference CHAP/sin2psi CHAP/test

- name: Build Sphinx HTML documentation
run: |
make clean
make html
working-directory: ./docs

- name: List generated files
run: |
pwd
ls -lha
ls -lha ./docs/_build/html
cat ./docs/_build/html/index.html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
8 changes: 3 additions & 5 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
push:
tags:
- v*.*.*
#on:
# push:
# branches:
# - docs

defaults:
run:
Expand All @@ -18,6 +14,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -27,7 +25,7 @@ jobs:
sed -i "s/PACKAGE_VERSION/${{ github.ref_name }}/" setup.py
sed -i "s/PACKAGE_VERSION/${{ github.ref_name }}/" CHAP/__init__.py
sed -i "s/PACKAGE_VERSION/${{ github.ref_name }}/" docs/conf.py
sed -i "s/PACKAGE_VERSION/${{ github.ref_name }}/" docs/installation.md
cat setup.py

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
Expand Down
8 changes: 8 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
AUTHORS

# The official list of Cornell High Energy Synchrotron Source (CHESS) authors of the CHESSComputing organization for copyright purposes

- Valentin Kuznetsov, Cornell University
- Keara L Soloway, Cornell University
- Werner Sun, Cornell University
- Rolf Verberg, Cornell University
14 changes: 7 additions & 7 deletions CHAP/edd/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class BaselineConfig(CHAPBaseModel):

# Fit configuration class

class _FitConfig(CHAPBaseModel):
class FitConfig(CHAPBaseModel):
"""Fit parameters configuration class for peak fitting.

:ivar background: Background model for peak fitting, defaults
Expand Down Expand Up @@ -237,9 +237,9 @@ def validate_materialconfig_after(self):
# Avoid Pydantic "Class not fully defined" in sphinx autodoc as a
# result of lazy importing by using in an _exclude pydantic instance
# variable
_FitConfig.model_rebuild(_types_namespace=vars(typing))
FitConfig.model_rebuild(_types_namespace=vars(typing))

class MCADetectorCalibration(Detector, _FitConfig):
class MCADetectorCalibration(Detector, FitConfig):
"""Class representing the configuration for a single MCA detector
element to perform detector calibration.

Expand Down Expand Up @@ -547,7 +547,7 @@ def get_tth_map(self, map_shape):
]


class MCADetectorConfig(_FitConfig):
class MCADetectorConfig(FitConfig):
"""Class representing metadata required to configure a full MCA
detector.

Expand All @@ -559,7 +559,7 @@ class MCADetectorConfig(_FitConfig):
'calibration', 'diffractionvolumelength', 'strainanalysis']
detectors: Optional[conlist(min_length=1, item_type=MCADetector)] = []

_exclude = set(vars(_FitConfig()).keys())
_exclude = set(vars(FitConfig()).keys())

@model_validator(mode='before')
@classmethod
Expand Down Expand Up @@ -611,7 +611,7 @@ def update_detectors(self):

# Processor configuration classes

class DiffractionVolumeLengthConfig(_FitConfig):
class DiffractionVolumeLengthConfig(FitConfig):
"""Configuration for the differential volume length processor
:class:`~CHAP.edd.processor.DiffractionVolumeLengthProcessor`
for an EDD setup using a steel-foil raster scan.
Expand Down Expand Up @@ -639,7 +639,7 @@ class DiffractionVolumeLengthConfig(_FitConfig):
sample_thickness: Optional[confloat(gt=0, allow_inf_nan=False)] = None
sigma_to_dvl_factor: Optional[Literal[2.0, 3.5, 4.0]] = 3.5

_exclude = set(vars(_FitConfig()).keys())
_exclude = set(vars(FitConfig()).keys())

@model_validator(mode='after')
def validate_diffractionvolumelengthconfig_after(self):
Expand Down
4 changes: 2 additions & 2 deletions CHAP/edd/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ def process(self, data):
if len(sskipped_detectors) == 1:
self.logger.warning(
f'Skipping detector {sskipped_detectors[0]} '
'(no raw data)')
'(no calibration data)')
elif sskipped_detectors:
skipped_detectors = [int(d) for d in sskipped_detectors]
self.logger.warning(
Expand Down Expand Up @@ -2747,7 +2747,7 @@ def process(self, data):
if len(sskipped_detectors) == 1:
self.logger.warning(
f'Skipping detector {sskipped_detectors[0]} '
'(no raw data)')
'(no calibration data)')
elif sskipped_detectors:
skipped_detectors = [int(d) for d in sskipped_detectors]
self.logger.warning(
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Valentin Kuznetsov
Copyright (c) 2023 The ChessAnalysisPipeline (CHAP) Authors (see AUTHORS file)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,23 @@
![unittests](https://github.com/CHESSComputing/ChessAnalysisPipeline/actions/workflows/unittests.yml/badge.svg)

# ChessAnalysisPipeline (CHAP)
CHAP is a package that provides a framework for executing data anlaysis pipelines. The package can be found on PyPI and conda-forge.

## Subpackages
There are several subpackages within CHAP that contain specialized items to handle specific types of data processing in the CHAP framework. Dependencies for these subpackages can be found in `CHAP/<subpackage_name>/environment.yml`.
## :bulb: About
The CHESS Analysis Pipeline (CHAP) package is an object-oriented python framework for executing data reduction and analysis workflows by refactoring workflows into modular pipelines composed of interchangeable, reusable code components where each basic pipeline block consists of a reader, processor, and/or writer. Please check the CHAP [introduction](https://chesscomputing.github.io/ChessAnalysisPipeline/introduction.html) for a broad outline of its basic framework.

## Documentation
Documentation for the latest version can be found on [this project's github pages site](https://chesscomputing.github.io/ChessAnalysisPipeline/).
## :hammer_and_wrench: Installation
The package is available over PyPI and conda-forge. See the [installation instructions](https://chesscomputing.github.io/ChessAnalysisPipeline/installation.html) for installing CHAP on any Linux system.

#### :package: Subpackages
There are several subpackages within CHAP that contain specialized items to handle specific types of data processing workflows in the CHAP framework. Dependencies for these subpackages can be found in `CHAP/<subpackage_name>/environment.yml`. Details on how to install a conda environment for each of these subpackages are also included in the [installation instructions](https://chesscomputing.github.io/ChessAnalysisPipeline/installation.html)

## :books: Documentation
Documentation for the latest release version can be found on [this project's github pages site](https://chesscomputing.github.io/ChessAnalysisPipeline/).

## :handshake: Contributing
We welcome feedback, suggestions, issues and bug reports.

Feel free to fork the [repository](https://github.com/CHESSComputing/ChessAnalysisPipeline) on GitHub and send a pull request, or to contribute by [submitting an issue](https://github.com/CHESSComputing/ChessAnalysisPipeline/issues). Each contribution helps CHAP grow and improve.
When submitting an issue, please have a look at the [contribution guidelines](https://chesscomputing.github.io/ChessAnalysisPipeline/CONTRIBUTIONS.html). Following these guidelines grately helps us to address each issue promptly and effectively.

We appreciate your support!
Loading
Loading