Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
75f026d
add TEM input mode (different unit for pixel size)
XiaohaoYang Aug 13, 2014
677b453
add TEM unit to calibration panel
XiaohaoYang Aug 13, 2014
0b337b6
change tag in setup.py
XiaohaoYang Aug 14, 2014
411ffe5
Merge branch 'master' into getegui
XiaohaoYang Aug 14, 2014
d516ea0
bug fix text in self calibration panel
XiaohaoYang Aug 14, 2014
4ce35ce
Merge branch 'master' into getegui
XiaohaoYang Aug 14, 2014
ee65141
bug fix: auto update the pixel size when changing distance/wavelength
XiaohaoYang Aug 14, 2014
8605dff
disable and hide polarization correction
XiaohaoYang Aug 14, 2014
67c9c66
Merge branch 'master' into getegui
XiaohaoYang Aug 14, 2014
bfc8610
fix missing codes in merged file
XiaohaoYang Aug 14, 2014
8820286
disable calibrant mode and TEM/normal mode selection
XiaohaoYang Aug 15, 2014
534581f
add TEM parameters mode for pyFai calibration
XiaohaoYang Aug 18, 2014
72d9065
Merge branch 'master' into getegui
XiaohaoYang Aug 20, 2014
8ce9cfb
Merge branch 'master' into getegui
XiaohaoYang Aug 21, 2014
f14c7f0
Merge branch 'master' into getegui
XiaohaoYang Aug 26, 2014
52f1340
Merge branch 'master' into getegui
XiaohaoYang Aug 26, 2014
bc05d2f
update the hint text
XiaohaoYang Aug 26, 2014
1d99010
Merge branch 'master' into getegui
XiaohaoYang Aug 26, 2014
fbd0c90
Merge branch 'master' into getegui
XiaohaoYang Aug 26, 2014
7928d4c
Merge branch 'master' into getegui
XiaohaoYang Aug 26, 2014
bf1d78d
update the getegui branch manual
XiaohaoYang Aug 26, 2014
06a2f6a
Merge branch 'master' into getegui
XiaohaoYang Sep 8, 2014
934750f
bug fix: manual pages
XiaohaoYang Sep 8, 2014
4a2934b
bug fix: manual page
XiaohaoYang Sep 9, 2014
f60b19f
disable polcorectf in config file
XiaohaoYang Sep 16, 2014
130e80a
Merge branch 'master' into getegui
XiaohaoYang Sep 23, 2014
e84aeec
tem pixel size now doesn't change when you change the distance and
XiaohaoYang Sep 23, 2014
34321b8
update the manual
XiaohaoYang Sep 23, 2014
c1a418b
Merge branch 'master' into getegui
XiaohaoYang Oct 4, 2014
f7e867b
remove options
XiaohaoYang Oct 4, 2014
d45590d
Merge branch 'master' into getegui
XiaohaoYang Oct 4, 2014
67614a8
update the manual
XiaohaoYang Oct 4, 2014
c1f3cb1
Merge branch 'master' into getegui
XiaohaoYang Oct 10, 2014
aee1d95
Merge branch 'master' into getegui
XiaohaoYang Oct 18, 2014
efb2b9a
Merge branch 'master' into getegui
XiaohaoYang Oct 19, 2014
ba44385
update the manual
XiaohaoYang Nov 14, 2014
f1a67ca
Merge branch 'master' into getegui
XiaohaoYang Dec 17, 2014
c5cf32b
Merge branch 'master' into getegui
XiaohaoYang Aug 16, 2015
a35eb8f
Merge branch 'master' into getegui
XiaohaoYang Aug 17, 2015
c496174
Merge branch 'master' into getegui
XiaohaoYang Aug 18, 2015
57828cc
Merge branch 'master' into getegui
XiaohaoYang Jun 7, 2016
40750a5
pyproject.toml and mods to install correctly
sbillinge Aug 13, 2025
27a7eb2
Merge pull request #1 from sbillinge/toml
sbillinge Aug 13, 2025
ff1469a
chore: change dpx to src/diffpy
zmx27 Aug 16, 2025
87a316c
chore: modify project script and 'where' in pyproject.toml
zmx27 Aug 16, 2025
fe24eef
Merge pull request #2 from zmx27/change-package-structure
sbillinge Aug 16, 2025
f52b0af
pre-commit auto-fix
stevenhua0320 Sep 24, 2025
7e36a6b
Merge pull request #12 from stevenhua0320/migration
sbillinge Sep 25, 2025
a0c03d3
redo flake8 check
stevenhua0320 Sep 25, 2025
3db57ff
fix flake8 error for two files
stevenhua0320 Sep 25, 2025
3e98757
fix E402 E711 in datacontainer, imageplot, and live.py
stevenhua0320 Sep 25, 2025
94c1ebc
Fix module not used, module not on top level& py2 cond deprecation
stevenhua0320 Sep 25, 2025
dd7754a
delete unused module, change lambda def to def
stevenhua0320 Sep 25, 2025
2dc5387
add a white space for string edition, add one edge case of finding float
stevenhua0320 Sep 26, 2025
9145a5b
change comment format, add white space to string
stevenhua0320 Sep 26, 2025
c34e215
add white space to Str to keep format
stevenhua0320 Sep 26, 2025
e54f20b
changed to AttributeError in bare except
stevenhua0320 Sep 26, 2025
5452398
Merge pull request #17 from stevenhua0320/migration-4
sbillinge Sep 26, 2025
3d52757
Merge pull request #14 from stevenhua0320/migration-1
sbillinge Sep 26, 2025
c5a1603
chore: change misspelling
stevenhua0320 Sep 26, 2025
5f329e6
fix: add failure case
stevenhua0320 Sep 27, 2025
94c208f
chore: change string representation
stevenhua0320 Sep 27, 2025
dd8d717
Merge pull request #16 from stevenhua0320/migration-3
sbillinge Sep 28, 2025
ab137e9
Merge pull request #18 from stevenhua0320/migration-5
sbillinge Sep 29, 2025
ddf464c
Merge pull request #15 from stevenhua0320/migration-2
sbillinge Sep 30, 2025
44fafb5
chore: flake8 suppress for import module
stevenhua0320 Oct 1, 2025
0a9bd9f
Merge pull request #19 from stevenhua0320/migration-6
sbillinge Oct 2, 2025
3102dc8
style: apply pre-commit hooks with no manual edits
stevenhua0320 Oct 6, 2025
f861952
skpkg: migrate tests folder
stevenhua0320 Oct 6, 2025
ef02af3
skpkg: migrate src folder except imageploy.py(needs merge before migr…
stevenhua0320 Oct 6, 2025
b6ccd22
skpkg: list dependencies in requirements folder
stevenhua0320 Oct 6, 2025
8dd9705
skpkg: add CI and issue/PR templates
stevenhua0320 Oct 6, 2025
1bc74ab
skpkg: add pyproject.toml
stevenhua0320 Oct 6, 2025
601117a
skpkg: add config files for pre-commit
stevenhua0320 Oct 6, 2025
5dbca93
skpkg: add config files readthedocs, codecov, GitHub
stevenhua0320 Oct 6, 2025
06ca075
skpkg: migrate docs/source files
stevenhua0320 Oct 6, 2025
9a65970
skpkg: add config files for authors, changelog, code of conduct, license
stevenhua0320 Oct 6, 2025
6c2dfba
skpkg: add MANIFEST.in
stevenhua0320 Oct 6, 2025
46ce44b
skpkg: add README.rst
stevenhua0320 Oct 6, 2025
9fcb544
skpkg: add news files
stevenhua0320 Oct 6, 2025
22c82cf
skpkg: modify license time and author in py file
stevenhua0320 Oct 7, 2025
6a6749e
chore: remove intellig auto-generated .gitignore
stevenhua0320 Oct 7, 2025
58e6d3a
skpkg: change requirements for dependency
stevenhua0320 Oct 7, 2025
27e4230
skpkg: change workflow file to private repo standard
stevenhua0320 Oct 7, 2025
6c9922a
skpkg:change authors, license and readme to be correct
stevenhua0320 Oct 7, 2025
fac04bb
add news for py2 to py3 fix
stevenhua0320 Oct 7, 2025
e8af88f
Merge pull request #25 from stevenhua0320/setup-CI-5
sbillinge Oct 7, 2025
93dc9db
Merge pull request #22 from stevenhua0320/pre-commit-auto
sbillinge Oct 7, 2025
3b68bab
skpkg: change author and contributor
stevenhua0320 Oct 7, 2025
953e024
skpkg: add matplotlib to pip.txt
stevenhua0320 Oct 7, 2025
5c5a993
skpkg: change license and readme to correct private repo format
stevenhua0320 Oct 7, 2025
2fd5097
Merge pull request #27 from stevenhua0320/doc
sbillinge Oct 7, 2025
d2b275b
skpkg: build workflow file for private repo as pdfgetx
stevenhua0320 Oct 7, 2025
f94a158
Merge pull request #23 from stevenhua0320/setup-CI-3
sbillinge Oct 7, 2025
f324598
Merge pull request #24 from stevenhua0320/setup-CI-4
sbillinge Oct 7, 2025
2e4d167
skpkg: change description of file & test CI workflow.
stevenhua0320 Oct 8, 2025
b37d868
skpkg: pre-commit fix
stevenhua0320 Oct 8, 2025
648c559
skpkg: pre-commit fix & add codespell check files
stevenhua0320 Oct 8, 2025
25f288f
Merge pull request #28 from stevenhua0320/pre-commit-fix
sbillinge Oct 8, 2025
7d4f687
skpkg: fix workflow&precommit fix
stevenhua0320 Oct 8, 2025
3195d59
skpkg: change py files' head name and license length
stevenhua0320 Oct 8, 2025
9045e9d
add release-github workflow and remove publish doc on release workflow
stevenhua0320 Oct 8, 2025
dd5f709
Merge pull request #29 from stevenhua0320/change-name
sbillinge Oct 8, 2025
1f3fadf
Merge pull request #26 from stevenhua0320/setup-CI-6
sbillinge Oct 8, 2025
085651a
skpkg: remove unncessary files as migrated to corresponding rst
stevenhua0320 Oct 8, 2025
138d76e
Merge pull request #30 from stevenhua0320/skpkg-wrap
sbillinge Oct 9, 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
14 changes: 14 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
coverage:
status:
project: # more options at https://docs.codecov.com/docs/commit-status
default:
target: auto # use the coverage from the base commit, fail if coverage is lower
threshold: 0% # allow the coverage to drop by

comment:
layout: " diff, flags, files"
behavior: default
require_changes: false
require_base: false # [true :: must have a base report to post]
require_head: false # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]
2 changes: 2 additions & 0 deletions .codespell/ignore_lines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
;; Please include filenames and explanations for each ignored line.
;; See https://docs.openverse.org/meta/codespell.html for docs.
8 changes: 8 additions & 0 deletions .codespell/ignore_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
;; Please include explanations for each ignored word (lowercase).
;; See https://docs.openverse.org/meta/codespell.html for docs.

;; abbreviation for "materials" often used in a journal title
mater

;; Frobenius norm used in np.linalg.norm
fro
13 changes: 13 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# As of now, flake8 does not natively support configuration via pyproject.toml
# https://github.com/microsoft/vscode-flake8/issues/135
[flake8]
exclude =
.git,
__pycache__,
build,
dist,
docs/source/conf.py
max-line-length = 79
# Ignore some style 'errors' produced while formatting by 'black'
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
extend-ignore = E203
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug Report or Feature Request
about: Report a bug or suggest a new feature!
title: ""
labels: ""
assignees: ""
---

### Problem

<!--
For a bug report, please copy and paste any error messages from the application or command-line here.
For a feature request, please state how the new functionality could benefit the community.
-->

### Proposed solution
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Release
about: Checklist and communication channel for PyPI and GitHub release
title: "Ready for <version-number> PyPI/GitHub release"
labels: "release"
assignees: ""
---

### PyPI/GitHub rc-release preparation checklist:

- [ ] All PRs/issues attached to the release are merged.
- [ ] All the badges on the README are passing.
- [ ] License information is verified as correct. If you are unsure, please comment below.
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
missing), tutorials, and other human-written text is up-to-date with any changes in the code.
- [ ] Installation instructions in the README, documentation, and the website are updated.
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
- [ ] Grammar and writing quality are checked (no typos).
- [ ] Install `pip install build twine`, run `python -m build` and `twine check dist/*` to ensure that the package can be built and is correctly formatted for PyPI release.

Please tag the maintainer (e.g., @username) in the comment here when you are ready for the PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here:

### PyPI/GitHub full-release preparation checklist:

- [ ] Create a new conda environment and install the rc from PyPI (`pip install <package-name>==??`)
- [ ] License information on PyPI is correct.
- [ ] Docs are deployed successfully to `https://<github-username-or-orgname>/<package-name>`.
- [ ] Successfully run all tests, tutorial examples or do functional testing.

Please let the maintainer know that all checks are done and the package is ready for full release.

### conda-forge release preparation checklist:

<!-- After the maintainer releases the PyPI package, please check the following when creating a PR for conda-forge release.-->

- [ ] Ensure that the full release has appeared on PyPI successfully.
- [ ] New package dependencies listed in `conda.txt` and `tests.txt` are added to `meta.yaml` in the feedstock.
- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions.
- [ ] Tag the maintainer for conda-forge release.

### Post-release checklist

<!-- Before closing this issue, please complete the following: -->

- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### What problem does this PR address?

<!-- Provide a brief overview and link to the issue. Attach outputs, including screenshots (before/after), if helpful for the reviewer. -->

### What should the reviewer(s) do?

<!-- Merge the code, provide feedback, initiate a discussion, etc. -->

<!--
Use the following checklist items when applicable (select only what applies):
- [ ] This PR introduces a public-facing change (e.g., figures, CLI input/output, API).
- [ ] Documentation (e.g., tutorials, examples, README) has been updated.
- [ ] A tracking issue or plan to update documentation exists.
- [ ] This PR affects internal functionality only (no user-facing change).
-->
230 changes: 230 additions & 0 deletions .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
name: Build Wheels and Release

on:
workflow_dispatch:
push:
tags:
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml

env:
PYTHON_VERSIONS: '["3.11","3.12","3.13"]'

permissions:
contents: write
actions: read
packages: write

concurrency:
group: build-wheels-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash {0}

jobs:
get-python-versions:
runs-on: ubuntu-latest
outputs:
py_ver: ${{ steps.set.outputs.py_ver }}
py_last: ${{ steps.set.outputs.py_last }}
steps:
- id: set
run: |
echo py_ver=$PYTHON_VERSIONS >> $GITHUB_OUTPUT
echo "py_last=${{ fromJson(env.PYTHON_VERSIONS)[0] }}" >> $GITHUB_OUTPUT

check-tag-on-main:
runs-on: ubuntu-latest
steps:
- name: Checkout repository with full history
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0

- name: Verify tag
run: |
git fetch origin main
TAG_COMMIT=$(git rev-parse ${{ github.ref_name }})
if git merge-base --is-ancestor "$TAG_COMMIT" origin/main; then
echo "Tag ${{ github.ref_name }} ($TAG_COMMIT) is contained in main"
else
echo "::error::Tag ${{ github.ref_name }} ($TAG_COMMIT) is not found in main. Please release from the main branch."
exit 1
fi

check-tag-privilege:
# No third party actions used
uses: scikit-package/release-scripts/.github/workflows/_check-tag-privilege.yml@v0
with:
maintainer_github_username: sbillinge

build-sdist:
needs: [check-tag-privilege, get-python-versions, check-tag-on-main]
runs-on: ubuntu-latest

steps:
- name: Checkout
# GitHub officially-maintained actions
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
# GitHub officially-maintained actions
uses: actions/setup-python@v5
with:
python-version: ${{ needs.get-python-versions.outputs.py_last }}

- name: Build docs and remove fonts that blow up the wheel size
run: |
python -m pip install Sphinx sphinx-rtd-theme sphinx-copybutton m2r
cd docs
make html
cd build/html/_static/css/fonts
find . -type f ! -name '*.ttf' -delete
cd ../..
rm -rf fonts
cd ..
rm -rf _sources
cd ..
rm -rf doctrees
cd ../..

- name: Make sdist
run: |
python -m pip install --upgrade pip build cython setuptools setuptools-git-versioning
python -m build --sdist --no-isolation

- name: Strip source codes
run: |
set -euo pipefail
tar xf dist/diffpy_srxplanargui-*.tar.gz
SRC_DIR=$(find . -maxdepth 1 -type d -name 'diffpy_srxplanargui-*' | head -n1)
find "$SRC_DIR" -type f -name '*.c' -print0 \
| xargs -0 perl -i.bak -0777 -pe 's{/\*.*?\*/}{}gs'
find "$SRC_DIR" -type f -name '*.c.bak' -delete
tar czf dist/"${SRC_DIR#./}".tar.gz "$SRC_DIR"
rm -rf "$SRC_DIR"

- name: Upload sdist
# GitHub officially-maintained actions
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/
retention-days: 1

- name: Upload INSTRUCTIONS.txt
uses: actions/upload-artifact@v4
with:
name: instructions
path: INSTRUCTIONS.txt

build-wheels:
needs: [build-sdist, get-python-versions]

name: Build wheels ${{ matrix.python }}-${{ matrix.buildplat }}
runs-on: ${{ matrix.buildplat }}
strategy:
fail-fast: false
matrix:
buildplat:
- ubuntu-latest
- macos-14
- windows-latest
python: ${{ fromJSON(needs.get-python-versions.outputs.py_ver) }}
steps:
- name: Download sdist
# GitHub officially-maintained actions
uses: actions/download-artifact@v4
with:
name: sdist
path: dist/

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Build wheels
run: |
# setuptools-git-versioning only look into .git and PKG-INFO in the top directory
which python; python --version
which pip; pip --version
python -m pip install --upgrade pip build cython setuptools setuptools-git-versioning
tar xf dist/diffpy_srxplanargui-*.tar.gz
cd diffpy_srxplanargui-*
python -m pip wheel . --no-deps --no-build-isolation --wheel-dir ./../dist

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.python }}-${{ matrix.buildplat }}
path: dist/*.whl

test-wheels:
needs: [build-wheels, get-python-versions]

name: Test wheels ${{ matrix.python }}-${{ matrix.buildplat }}
runs-on: ${{ matrix.buildplat }}
strategy:
fail-fast: false
matrix:
buildplat:
- ubuntu-latest
- macos-14
- windows-latest
python: ${{ fromJson(needs.get-python-versions.outputs.py_ver) }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download wheels
uses: actions/download-artifact@v4
with:
name: wheels-${{ matrix.python }}-${{ matrix.buildplat }}
path: dist/

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install wheels
run: |
python -m pip install --upgrade pip pytest setuptools-git-versioning
python -m pip install dist/*.whl

- name: Assert no source files in installed package
run: |
# For debugging
# touch $(python -c "import sysconfig, os; print(os.path.join(sysconfig.get_paths()['purelib'], 'diffpy/srxplanargui', 'fake.py'))")
python - << 'EOF'
import os, glob, sys, sysconfig
sp = sysconfig.get_paths()['purelib']
pkg = os.path.join(sp, 'diffpy', 'srxplanargui')
patterns = [os.path.join(pkg, '*.py'),
os.path.join(pkg, '*.c')]
bad = []
for p in patterns:
bad.extend(glob.glob(p))

if bad:
print("Found leftover source files in installed package:")
for f in bad:
print(" -", f)
sys.exit(1)

print("No .py or .c files present in diffpy/srxplanargui/")
EOF

- name: Run tests
run: python -m pytest

release:
needs: [test-wheels]
uses: ./.github/workflows/release-github.yml
secrets:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/check-news-item.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Check for News

on:
pull_request_target:
branches:
- main

jobs:
check-news-item:
uses: scikit-package/release-scripts/.github/workflows/_check-news-item.yml@v0
with:
project: diffpy.srxplanargui
19 changes: 19 additions & 0 deletions .github/workflows/matrix-no-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
push:
branches:
- main
release:
types:
- prereleased
- published
workflow_dispatch:

jobs:
matrix-coverage:
uses: scikit-package/release-scripts/.github/workflows/_matrix-no-codecov-on-merge-to-main.yml@v0
with:
project: diffpy.srxplanargui
c_extension: false
headless: false
Loading