mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-13 05:01:41 +01:00
Compare commits
1 Commits
dev/automa
...
fix/patter
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60a1aad6ff |
91
.github/workflows/build_documentation.yml
vendored
91
.github/workflows/build_documentation.yml
vendored
@@ -1,91 +0,0 @@
|
||||
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 }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
9
.github/workflows/cmake.yaml
vendored
9
.github/workflows/cmake.yaml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Native CMake Build
|
||||
|
||||
on: [pull_request] # [push, pull_request]
|
||||
on: [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,8 +45,3 @@ jobs:
|
||||
python -m pytest ${{github.workspace}}/python/tests
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
name: githib-workflow-environment
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- doxygen
|
||||
- sphinx
|
||||
- breathe
|
||||
- sphinx_rtd_theme
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# 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
|
||||
@@ -3766,9 +3767,13 @@ class Detector(CppDetectorApi):
|
||||
raise NotImplementedError("Pattern is set only")
|
||||
|
||||
@pattern.setter
|
||||
def pattern(self, fname):
|
||||
fname = ut.make_string_path(fname)
|
||||
ut.set_using_dict(self.setPattern, fname)
|
||||
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)
|
||||
|
||||
@property
|
||||
def patfname(self):
|
||||
|
||||
Reference in New Issue
Block a user