Compare commits

..

14 Commits

Author SHA1 Message Date
d141bd388a set write permisison
All checks were successful
Build on RHEL9 / build (push) Successful in 3m17s
Build on RHEL8 / build (push) Successful in 4m38s
2026-01-12 18:22:20 +01:00
3dd1de90a2 try with tokem 2026-01-12 18:11:57 +01:00
b9139a2d8c mmh
All checks were successful
Build on RHEL9 / build (push) Successful in 3m17s
Build on RHEL8 / build (push) Successful in 4m31s
2026-01-12 18:02:41 +01:00
8d10dabbb3 correct copy 2026-01-12 17:51:08 +01:00
add2a89a0a cannot upload artefact commit to gh-pages 2026-01-12 17:43:16 +01:00
f238078ca3 dont use conda
All checks were successful
Build on RHEL9 / build (push) Successful in 3m51s
Build on RHEL8 / build (push) Successful in 4m34s
2026-01-12 16:57:34 +01:00
998cc9817e dont use conda
All checks were successful
Build on RHEL9 / build (push) Successful in 3m43s
Build on RHEL8 / build (push) Successful in 4m40s
2026-01-12 16:50:21 +01:00
3e32d90943 typo
All checks were successful
Build on RHEL9 / build (push) Successful in 3m46s
Build on RHEL8 / build (push) Successful in 4m41s
2026-01-12 16:42:46 +01:00
10533d3d60 oke created environmnet file
All checks were successful
Build on RHEL9 / build (push) Successful in 3m48s
Build on RHEL8 / build (push) Successful in 4m34s
2026-01-12 16:40:14 +01:00
500600054e had to add shinx and doxygen as well 2026-01-12 16:30:15 +01:00
1ee829af4c forgot to get package hdf5 2026-01-12 16:16:17 +01:00
d5e7ae652a typo - 2026-01-12 16:12:52 +01:00
0a409db951 indendation error 2026-01-12 15:59:59 +01:00
d2a279dc2c some test about building docs 2026-01-12 15:56:15 +01:00
4 changed files with 110 additions and 10 deletions

View File

@@ -0,0 +1,91 @@
name: Build and upload Documentation
on:
workflow_dispatch:
push: # Only for Testing change later
env:
BUILD_TYPE: RELEASE
permissions:
contents: write # Required to push to gh-pages branch
pages: write # Required for GitHub Pages deployment
id-token: write # Required for GitHub Pages deployment
jobs:
build-and-deploy:
strategy:
matrix:
patform: [ubuntu-latest]
python-version: ["3.12"]
runs-on: ${{ matrix.patform }}
defaults:
run:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for proper git operations
token: ${{ secrets.GITHUB_TOKEN }} # Use the default token
- name: Install System Packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libhdf5-dev doxygen
version: 1.0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'pip'
- name: Install Python Packages
run: pip install sphinx sphinx_rtd_theme breathe
- name: Build Documentation
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSLS_BUILD_DOCS=ON -DSLS_USE_HDF5=ON -DSLS_USE_PYTHON=ON ..
make -j4
make docs
- name: Upload Documentation Artifact
uses: actions/upload-pages-artifact@v4
with:
path: build/docs/html # maybe we need to upload images as well - so one can click on them?
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Copy documentation to gh-pages # create folder structure
run: cp -r build/docs/html/. gh-pages/
- name: Commit and Push changes to gh-pages
run: |
cd gh-pages
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add .
git commit -m "Update Documentation"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git push origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,6 +1,6 @@
name: Native CMake Build
on: [push, pull_request]
on: [pull_request] # [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
@@ -29,7 +29,7 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSLS_USE_TESTS=ON -DSLS_USE_HDF5=ON -DSLS_USE_GUI=ON -DSLS_USE_MOENCH=ON -DSLS_USE_PYTHON=ON
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSLS_USE_TESTS=ON -DSLS_USE_HDF5=ON -DSLS_USE_GUI=ON -DSLS_USE_MOENCH=ON -DSLS_USE_PYTHON=ON
- name: Build
# Build your program with the given configuration
@@ -45,3 +45,8 @@ jobs:
python -m pytest ${{github.workspace}}/python/tests

View File

@@ -0,0 +1,9 @@
name: githib-workflow-environment
channels:
- conda-forge
dependencies:
- doxygen
- sphinx
- breathe
- sphinx_rtd_theme

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import pathlib
from ._slsdet import CppDetectorApi
from ._slsdet import slsDetectorDefs
from ._slsdet import IpAddr, MacAddr
@@ -3767,13 +3766,9 @@ class Detector(CppDetectorApi):
raise NotImplementedError("Pattern is set only")
@pattern.setter
def pattern(self, name_or_pattern):
# If passed a file path, convert to string representation
# with the path expanded. Otherwise it's probably a sls::Pattern
# and we can pass it directly.
if isinstance(name_or_pattern, (pathlib.Path, str)):
name_or_pattern = ut.make_string_path(name_or_pattern)
ut.set_using_dict(self.setPattern, name_or_pattern)
def pattern(self, fname):
fname = ut.make_string_path(fname)
ut.set_using_dict(self.setPattern, fname)
@property
def patfname(self):