Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
192e829
basic formatting and project git hooks, we'll pick this up after we'r…
toqduj Mar 28, 2026
d3243ac
adapting to the new API of McSAS3 with ProcessingData
toqduj Mar 29, 2026
f598571
adjust gitignore
toqduj Mar 29, 2026
f6f954b
adjusted ignores and added missing info
toqduj Mar 29, 2026
1fc1bba
implement stop functionality
toqduj Mar 29, 2026
cdd39cf
stop button on test run too.
toqduj Mar 29, 2026
82c2c20
adjusting the test configuration
toqduj Mar 29, 2026
95dd184
initial cleanup pass on McSAS3GUI
toqduj Mar 30, 2026
de4dda8
cleanup pass and tests
toqduj Mar 30, 2026
a7ff42f
continuing cleanup
toqduj Mar 30, 2026
2051dfb
another cleanup sweep
toqduj Mar 30, 2026
f63560e
more cleanup
toqduj Mar 30, 2026
b36da89
next cleanup step
toqduj Mar 30, 2026
3f48b72
more cleanup
toqduj Mar 30, 2026
7058012
more cleanip, moving on to docs next
toqduj Mar 30, 2026
26c1d4e
typing/docstrings added
toqduj Mar 30, 2026
fc0d7d0
documentation generation
toqduj Mar 30, 2026
524db9f
bugfix
toqduj Mar 30, 2026
6bf68db
aux windows close when main closes
toqduj Mar 30, 2026
2a3b138
compiled McSAS3GUI
toqduj Mar 31, 2026
f3c1729
bugfix
toqduj Mar 31, 2026
5d52e4b
bugfixes in compiled build
toqduj Mar 31, 2026
25065ea
fixing small documentation issue
toqduj Mar 31, 2026
9fad697
addressing small usability issues.
toqduj Mar 31, 2026
7fb84b8
enh: build standalone versions for three plarforms
toqduj Mar 31, 2026
0ec6b15
fix: adjusting CI so we can run with the in_depth_upgrades branch of …
toqduj Mar 31, 2026
9baed9c
fix to imports, shifting python to match modacor reqs.
toqduj Apr 1, 2026
d05776c
chore: fix tests and dependencies
toqduj Apr 1, 2026
e3f52e5
chore: fixing tests again..
toqduj Apr 1, 2026
e50848b
yet another test fix.
toqduj Apr 1, 2026
c14d483
fix build paths
toqduj Apr 1, 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: 4 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
uses: ./.github/workflows/build.yml
secrets: inherit

standalone:
needs: [tests]
uses: ./.github/workflows/standalone.yml

docs:
needs: [release] # get (release) version number first
uses: ./.github/workflows/docs.yml
Expand Down
136 changes: 136 additions & 0 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: Standalone

on:
workflow_call:
inputs:
mcsas3_ref:
description: McSAS3 ref to check out. Defaults to the current GUI branch, then main.
required: false
type: string
workflow_dispatch:
inputs:
mcsas3_ref:
description: McSAS3 ref to check out. Defaults to the current GUI branch, then main.
required: false
type: string

jobs:
standalone:
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: Checking out the GUI repo
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Check out McSAS3
uses: actions/checkout@v5
with:
repository: ${{ github.repository_owner }}/McSAS3
path: McSAS3
ref: ${{ inputs.mcsas3_ref || github.head_ref || github.ref_name || 'main' }}

- name: Show selected dependency refs
shell: bash
run: |
set -euxo pipefail
echo "McSAS3 ref: ${{ inputs.mcsas3_ref || github.head_ref || github.ref_name || 'main' }}"

- name: Setting up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
ci/requirements.txt
pyproject.toml
tox.ini

- name: Install required system packages
shell: bash
run: |
set -euxo pipefail
PLATFORM="$(echo "$RUNNER_OS" | tr '[:upper:]' '[:lower:]')"
REQFN="ci/requirements_${PLATFORM}.txt"
if [[ "$PLATFORM" == "linux" && -f "$REQFN" ]]; then
mapfile -t packages < <(grep -vE '^\s*(#|$)' "$REQFN")
if [[ "${#packages[@]}" -gt 0 ]]; then
sudo apt-get update
sudo apt-get -y install "${packages[@]}"
fi
else
echo "No extra standalone system packages declared for $PLATFORM."
fi

- name: Install dependencies
shell: bash
run: |
set -euxo pipefail
python -m pip install --upgrade pip
python -m pip install --progress-bar=off -r ci/requirements.txt

- name: Build standalone GUI bundle
shell: bash
env:
MCSAS3GUI_MCSAS3_SRC: ${{ github.workspace }}/McSAS3/src
run: tox -e standalone -v

- name: Verify standalone bundle manifest
shell: bash
run: |
set -euxo pipefail
python - <<'PY'
import json
import platform
from pathlib import Path

system = platform.system().lower()
machine = platform.machine().lower().replace("x86_64", "amd64")
platform_tag = f"{system}-{machine}"
bundle_root = Path("dist") / "standalone" / platform_tag
build_info = bundle_root / "build_info.json"
readme = bundle_root / "README_STANDALONE.txt"
archive = Path("dist") / "standalone" / f"mcsas3gui-standalone-{platform_tag}.zip"

if not bundle_root.is_dir():
raise SystemExit(f"Missing standalone bundle root: {bundle_root}")
if not readme.is_file():
raise SystemExit(f"Missing bundle README: {readme}")
if not build_info.is_file():
raise SystemExit(f"Missing build manifest: {build_info}")
if not archive.is_file():
raise SystemExit(f"Missing standalone archive: {archive}")

payload = json.loads(build_info.read_text(encoding="utf-8"))
expected_platform = platform_tag
if payload["platform"] != expected_platform:
raise SystemExit(
f"Build manifest platform mismatch: {payload['platform']} != {expected_platform}"
)

gui_bundle = bundle_root / payload["gui_bundle"]
gui_executable = bundle_root / payload["gui_executable"]
histogrammer = bundle_root / payload["bundled_histogrammer"]

if not gui_bundle.exists():
raise SystemExit(f"Missing GUI bundle: {gui_bundle}")
if not gui_executable.is_file():
raise SystemExit(f"Missing GUI executable: {gui_executable}")
if not histogrammer.is_file():
raise SystemExit(f"Missing bundled histogram helper: {histogrammer}")
PY

- name: Upload standalone artifacts
uses: actions/upload-artifact@v4
with:
name: standalone-${{ matrix.os }}
path: |
dist/standalone/*.zip
dist/standalone/*/README_STANDALONE.txt
dist/standalone/*/build_info.json
26 changes: 21 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ name: Tests

# Controls when the action will run.
on:
workflow_call:
inputs:
mcsas3_ref:
description: McSAS3 ref to check out. Defaults to the current GUI branch, then main.
required: false
type: string
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

workflow_call:
inputs:
mcsas3_ref:
description: McSAS3 ref to check out. Defaults to the current GUI branch, then main.
required: false
type: string

jobs:
# defining this job separately allows to refer to it later as job.needs dependency
Expand All @@ -20,8 +29,9 @@ jobs:
# os: ['ubuntu', 'windows', 'macos']
os: ['windows']
env:
PYTHON: ${{ join(matrix.python, '.') }} # e.g. '3.11'
TOX_ENV: ${{ format('{0}{1}', 'py', join(matrix.python, '')) }} # e.g. 'py311'
PYTHON: ${{ join(matrix.python, '.') }} # e.g. '3.12'
TOX_ENV: ${{ format('{0}{1}', 'py', join(matrix.python, '')) }} # e.g. 'py312'
MCSAS3GUI_MCSAS3_SRC: ${{ github.workspace }}/McSAS3/src
runs-on: ${{ format('{0}-latest', matrix.os) }}
name: "Test py-${{ join(matrix.python, '.') }} (${{ matrix.os }})"
steps:
Expand All @@ -30,7 +40,13 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: main

- name: Check out McSAS3
uses: actions/checkout@v5
with:
repository: ${{ github.repository_owner }}/McSAS3
path: McSAS3
ref: ${{ inputs.mcsas3_ref || github.head_ref || github.ref_name || 'main' }}

- name: Setting up Python ${{ env.PYTHON }}
uses: actions/setup-python@v5
Expand Down
36 changes: 34 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.py[cod]
__pycache__
uv.lock

# C extensions
*.so
Expand Down Expand Up @@ -107,9 +108,9 @@ cython_debug/
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

Expand All @@ -136,3 +137,34 @@ temporary_files/run.yaml
temporary_files/data.yaml
logs/mcsas3_debug.log
logs/mcsas3_debug.log
read_configurations/Moeez_csv.yaml
read_configurations/Moeez_S171.yaml
run_configurations/run_config_Moeez_longcyl.yaml
run_configurations/run_config_Moeez.yaml
src/mcsas3gui/configurations/histogram/hist_config_dual_KJ.yaml
src/mcsas3gui/configurations/histogram/hist_config_dual_kuanode.yaml
src/mcsas3gui/configurations/histogram/hist_dual_tomek.yaml
src/mcsas3gui/configurations/readdata/read_kuehns_nxs_data.yaml
src/mcsas3gui/configurations/readdata/read_Pauls_base_mats_dat.yaml
src/mcsas3gui/configurations/readdata/read_Pauls_kuanode_kapton_dat.yaml
src/mcsas3gui/configurations/readdata/read_Pauls_kuanode_kapton_nxs.yaml
src/mcsas3gui/configurations/readdata/read_tomeks_csv.yaml
src/mcsas3gui/configurations/run/run_config_kuanode.yaml
src/mcsas3gui/configurations/run/run_config_kuehn.yaml
src/mcsas3gui/configurations/run/run_config_pauls_base_moar.yaml
src/mcsas3gui/configurations/run/run_config_pauls_base.yaml
src/mcsas3gui/configurations/run/run_config_tomek.yaml
testdata/Archive.zip
testdata/Example_cyl_output.hdf5
testdata/Example_cyl_output.pdf
testdata/Example_output.hdf5
testdata/Example_output.pdf
testdata/Example.csv
testdata/merged_AutoMOFs_7_L011_output.hdf5
testdata/merged_AutoMOFs_7_L011_output.pdf
testdata/quickstartdemo1_output.hdf5
testdata/quickstartdemo1_output.pdf
testdata/round_robin_dataset_1_output.hdf5
testdata/round_robin_dataset_1_output.pdf
testdata/round_robin_dataset_3_output.hdf5
testdata/round_robin_dataset_3_output.pdf
16 changes: 5 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- repo: https://github.com/pycqa/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.8
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- id: ruff
args: [--fix]
- id: ruff-format
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2024
Copyright © 2024


Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -19,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
22 changes: 22 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,36 @@ include .editorconfig
include .pre-commit-config.yaml
include .copier-answers.yml
include tox.ini
include *.spec
include templates/*.j2
recursive-include tools *.py
include notebooks/*.ipynb
recursive-include read_configurations *.yaml
recursive-include run_configurations *.yaml

include README.md
include CHANGELOG.md
include AUTHORS.rst
include CONTRIBUTING.rst
include LICENSE

exclude src/mcsas3gui/configurations/histogram/hist_config_dual_KJ.yaml
exclude src/mcsas3gui/configurations/histogram/hist_config_dual_kuanode.yaml
exclude src/mcsas3gui/configurations/histogram/hist_dual_tomek.yaml
exclude src/mcsas3gui/configurations/readdata/read_kuehns_nxs_data.yaml
exclude src/mcsas3gui/configurations/readdata/read_Pauls_base_mats_dat.yaml
exclude src/mcsas3gui/configurations/readdata/read_Pauls_kuanode_kapton_dat.yaml
exclude src/mcsas3gui/configurations/readdata/read_Pauls_kuanode_kapton_nxs.yaml
exclude src/mcsas3gui/configurations/readdata/read_tomeks_csv.yaml
exclude src/mcsas3gui/configurations/run/run_config_kuanode.yaml
exclude src/mcsas3gui/configurations/run/run_config_kuehn.yaml
exclude src/mcsas3gui/configurations/run/run_config_pauls_base.yaml
exclude src/mcsas3gui/configurations/run/run_config_pauls_base_moar.yaml
exclude src/mcsas3gui/configurations/run/run_config_tomek.yaml
exclude read_configurations/Moeez_S171.yaml
exclude read_configurations/Moeez_csv.yaml
exclude run_configurations/run_config_Moeez.yaml
exclude run_configurations/run_config_Moeez_longcyl.yaml

global-exclude *.py[cod] __pycache__/* *.so *.dylib .DS_Store */.ipynb_checkpoints/* .*.kate-swp
global-exclude *.afdesign
50 changes: 50 additions & 0 deletions McSAS3GUI.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['src/mcsas3gui/main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='McSAS3GUI',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='McSAS3GUI',
)
app = BUNDLE(
coll,
name='McSAS3GUI.app',
icon=None,
bundle_identifier=None,
)
Loading
Loading