Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
30f58f5
Update win_test.yml
briantoby Mar 6, 2025
e257c4f
debug workflow script 1
briantoby Mar 6, 2025
a73f1a9
debug workflow script 2
briantoby Mar 6, 2025
8d612f9
debug workflow script 3
briantoby Mar 6, 2025
23210f0
debug workflow script 4
briantoby Mar 6, 2025
057d735
try example
briantoby Mar 6, 2025
73ad6bf
try example+
briantoby Mar 6, 2025
742a7a3
try w/my commands
briantoby Mar 6, 2025
5d9eb62
try fix my commands
briantoby Mar 6, 2025
c5d1338
try gsas2pkg
briantoby Mar 6, 2025
c725efc
try gsas2pkg
briantoby Mar 6, 2025
b2ed9b8
try gitstrap
briantoby Mar 6, 2025
48af72a
try gitstrap 1
briantoby Mar 6, 2025
8b5a44c
try gitstrap 2
briantoby Mar 6, 2025
f4dca84
try gitstrap 3
briantoby Mar 6, 2025
5239ed2
try self-tests
briantoby Mar 6, 2025
6ab89ca
find self-tests
briantoby Mar 6, 2025
7c9026b
find self-tests 1
briantoby Mar 7, 2025
98eec6b
work on self-tests
briantoby Mar 7, 2025
235f5c5
work on self-tests 1
briantoby Mar 7, 2025
444ec5a
work on self-tests 2
briantoby Mar 7, 2025
9dc1879
work on self-tests 3
briantoby Mar 8, 2025
f133fed
work on self-tests 3; force gil
briantoby Mar 8, 2025
307ef07
test w/gitstrap
briantoby Mar 8, 2025
89a94b6
more work on self-tests
briantoby Mar 8, 2025
3d7fbc8
more work on 3.11 self-tests
briantoby Mar 8, 2025
f177b22
3.11 self-tests
briantoby Mar 8, 2025
30cdff1
3.11 self-tests 1
briantoby Mar 8, 2025
8f353ec
3.12 self-tests
briantoby Mar 8, 2025
3d395fe
more on 3.12 self-tests
briantoby Mar 8, 2025
d7468fa
more on 3.12 self-tests
briantoby Mar 8, 2025
050cf23
update binary cache list
briantoby Mar 8, 2025
82c8182
work on 3.11 debug
briantoby Mar 8, 2025
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
51 changes: 0 additions & 51 deletions .github/workflows/smoke_test.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/win-gitstrap-selftest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: GSAS-II self-tests on Windows via gitstrap

on:
workflow_dispatch: # Allows running this workflow manually
# Runs on pushes targeting the default branch
push:
branches-ignore:
- master
# branches: ['main']
# pull_request:
# branches: ['main']


jobs:
test-GSAS-II:
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
# python-version: ["3.11", "3.12", "3.13"]
# python-version: ["3.13"]
runs-on: 'windows-latest'
steps:
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda install
shell: bash -el {0}
run: |
# tailor the numpy version to match the GSAS-II binaries
if [ "${{ matrix.python-version }}" == "3.13" ]; then
npver="2.2 python-gil"
elif [ "${{ matrix.python-version }}" == "3.12" ]; then
npver=2.2
elif [ "${{ matrix.python-version }}" == "3.11" ]; then
npver=1.26
fi
conda install python=${{ matrix.python-version }} numpy=${npver} scipy requests pytest git gitpython pycifrw -c conda-forge --override-channels --quiet
#conda info
#conda list
- name: GSAS-II install
shell: bash -el {0}
run: |
curl -L -O https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/raw/main/install/gitstrap.py
python gitstrap.py --nocheck --noshortcut --branch=main

- name: GSAS-II all tests
shell: bash -el {0}
run: |
cd GSAS-II
python -m pytest
105 changes: 80 additions & 25 deletions .github/workflows/win_test.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,97 @@
name: run self-tests on Windows
name: debug self-tests on Windows w/3.11

on:
workflow_dispatch: # Allows running this workflow manually
# Runs on pushes targeting the default branch
push:
branches-ignore:
- master
# branches: ['develop']
# branches: ['main']
# pull_request:
# branches: ['main']

workflow_dispatch: # Allows running this workflow manually


# Default to bash
defaults:
run:
shell: bash

jobs:
build:
test-GSAS-II:
strategy:
fail-fast: false
matrix:
# env: ['py313']
env: ['py310', 'py311', 'py312', 'py313']
# python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.11"]
# python-version: ["3.12"]
runs-on: 'windows-latest'
steps:
- name: Get conda
#uses: conda-incubator/[email protected]
uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3 using hash for security
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: build
miniforge-version: latest
python-version: ${{ matrix.env }}

# configure conda
- name: config python
if [ ${{ matrix.env }} == 'py313' ]; then
npver=2.2
fi
run: conda install numpy={$npver} scipy requests pytest
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda install
shell: bash -el {0}
run: |
# tailor the numpy version to match the GSAS-II binaries
if [ "${{ matrix.python-version }}" == "3.13" ]; then
npver="2.2 python-gil"
elif [ "${{ matrix.python-version }}" == "3.12" ]; then
npver=2.2
elif [ "${{ matrix.python-version }}" == "3.11" ]; then
npver=1.26
fi
#conda list
#conda info
conda install python=${{ matrix.python-version }} numpy=${npver} scipy requests pytest git gitpython pycifrw -c conda-forge --override-channels --quiet
#conda install --quiet numpy=${npver} requests pytest briantoby::gsas2pkg -c conda-forge
conda info
conda list
- name: GSAS-II install
shell: bash -el {0}
run: |
#mkdir G2
#cd G2
curl -L -O https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/raw/main/install/gitstrap.py
python gitstrap.py --nocheck --noshortcut --branch=main

- name: find files
shell: bash -el {0}
run: |
ls -l GSAS-II/GSASII-bin/win_64_p3.11_n1.26
#ls -l GSAS-II/GSASII-bin/win_64_p3.12_n2.2
ls -l GSAS-II/tests

- name: GSAS-II single test
if: always()
shell: bash -el {0}
run: |
cd GSAS-II
python tests/test_elm.py
python tests/test_spg.py

# - name: GSAS-II all tests
# if: always()
# shell: bash -el {0}
# run: |
# cd GSAS-II
# ls
# python -m pytest

- name: try pyspg
if: always()
shell: bash -el {0}
run: |
cd GSAS-II/GSASII-bin/win_64_p3.11_n1.26
#cd GSAS-II/GSASII-bin/win_64_p3.12_n2.2
python -VV
#python -v -c "import sys; print(sys.path)"
python -c "import pyspg"

- name: try ldd
if: always()
shell: bash -el {0}
run: |
#conda create -n ntldd python=3.12 numpy=2.2 m2w64-ntldd-git
conda create -n ntldd python=3.11 numpy=1.26 m2w64-ntldd-git
conda activate ntldd
#cd GSAS-II/GSASII-bin/win_64_p3.11_n1.26
cd GSAS-II/GSASII-bin/win_64_p3.12_n2.2
ls
ntldd *.pyd
python -c "import pyspg"
13 changes: 9 additions & 4 deletions GSASII/GSASIIscriptable.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ def SetPrintLevel(level):
if mode in level.lower():
printLevel = mode
return
def SetDebugMode(mode):
'''Set the debug configuration mode on (mode=True) or off (mode=False).
This will provide some additional output that may help with
tracking down problems in the code.
'''
GSASIIpath.SetConfigValue({'debug':bool(mode)})

def installScriptingShortcut():
'''Creates a file named G2script in the current Python site-packages directory.
Expand Down Expand Up @@ -429,7 +435,7 @@ def import_generic(filename, readerlist, fmthint=None, bank=None,
elif flag:
primaryReaders.append(reader)
if not secondaryReaders and not primaryReaders:
raise G2ImportException("Could not read file: ", filename)
raise G2ImportException(f"Could not read file: {filename}")

with open(filename, 'r'):
rd_list = []
Expand Down Expand Up @@ -486,7 +492,7 @@ def import_generic(filename, readerlist, fmthint=None, bank=None,
G2fil.G2Print("{} block # {} read by Reader {}"
.format(filename,bank,rd.formatName))
return rd_list
raise G2ImportException("No reader could read file: " + filename)
raise G2ImportException(f"No reader could read file: {filename}")


def load_iprms(instfile, reader, bank=None):
Expand Down Expand Up @@ -533,8 +539,7 @@ def load_iprms(instfile, reader, bank=None):
elif ibanks == 1:
reader.instbank = 1
else:
raise G2ImportException("Instrument parameter file has {} banks, select one with instbank param."
.format(ibanks))
raise G2ImportException(f"Instrument parameter file has {ibanks} banks, select one with instbank param.")
reader.powderentry[2] = 1
reader.instfile = instfile
reader.instmsg = '{} bank {}'.format(instfile,reader.instbank)
Expand Down
8 changes: 8 additions & 0 deletions GSASII/inputs/BinariesCache.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
linux_64_p3.11_n1.26 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/linux_64_p3.11_n1.26.tgz
linux_64_p3.12_n2.2 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/linux_64_p3.12_n2.2.tgz
linux_64_p3.13_n2.2 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/linux_64_p3.13_n2.2.tgz
linux_arm32_p3.11_n1.24 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/linux_arm32_p3.11_n1.24.tgz
linux_arm64_p3.11_n1.26 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/linux_arm64_p3.11_n1.26.tgz
mac_64_p3.11_n1.26 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/mac_64_p3.11_n1.26.tgz
mac_64_p3.12_n2.2 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/mac_64_p3.12_n2.2.tgz
mac_64_p3.13_n2.2 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/mac_64_p3.13_n2.2.tgz
mac_arm_p3.11_n1.26 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/mac_arm_p3.11_n1.26.tgz
mac_arm_p3.12_n2.2 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/mac_arm_p3.12_n2.2.tgz
mac_arm_p3.13_n2.2 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/mac_arm_p3.13_n2.2.tgz
win_64_p3.11_n1.26 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/win_64_p3.11_n1.26.tgz
win_64_p3.12_n2.2 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/win_64_p3.12_n2.2.tgz
win_64_p3.13_n2.2 : https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/win_64_p3.13_n2.2.tgz
Loading