Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.0.4 #258

Merged
merged 946 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
946 commits
Select commit Hold shift + click to select a range
73629cf
added a new method to blobcorrector.correctorclass to do distorsion c…
jbjacob94 Oct 31, 2023
de3e8ec
Attempt to manage openmp with multiprocessing
jonwright Oct 31, 2023
105acfe
Attempt to manage openmp with multiprocessing
jonwright Oct 31, 2023
62dfc87
Attempt to manage openmp with multiprocessing
jonwright Oct 31, 2023
6a21187
Merge branch 'master' of https://github.com/jonwright/ImageD11
jonwright Oct 31, 2023
6d0204a
Merge pull request #180 from jonwright/master
jonwright Oct 31, 2023
ab4597f
drop 3.7 for 3.8 (but keep 2.7 for now)
jonwright Oct 31, 2023
b60936e
Merge pull request #1 from jbjacob94/jbjacob94-patch-1
jbjacob94 Oct 31, 2023
ac2b683
Update blobcorrector.py
jbjacob94 Oct 31, 2023
aee79f1
Update blobcorrector.py
jbjacob94 Oct 31, 2023
88ba15b
Merge pull request #181 from jbjacob94/master
jonwright Oct 31, 2023
172eb03
TODO: fix fscan2d to be easier to use
jonwright Nov 13, 2023
22e7759
Merge pull request #182 from jonwright/master
jonwright Nov 13, 2023
5a0603b
Merge pull request #9 from FABLE-3DXRD/master
jonwright Nov 13, 2023
97fcedd
Thanks to Andrew Reader's youtube video
jonwright Nov 17, 2023
7b43cfe
Merge branch 'master' of https://github.com/jonwright/ImageD11
jonwright Nov 17, 2023
5204848
added 3.11 (3.x is busted due to numba)
jonwright Nov 22, 2023
17ab635
Merge pull request #184 from jonwright/master
jonwright Nov 22, 2023
7fd837e
auto reshape for fscan2d
jonwright Nov 22, 2023
7433105
setting threads only for multiprocessing
jonwright Nov 22, 2023
6301cae
fixup fscan2d
jonwright Nov 22, 2023
7cedbd3
Merge pull request #185 from jonwright/master
jonwright Nov 22, 2023
034fb49
fixup fscan2d
jonwright Nov 22, 2023
4de0805
Merge pull request #186 from jonwright/master
jonwright Nov 23, 2023
24850ef
Update build_flake_pytest_ubuntu2004.yml
jonwright Nov 29, 2023
5f69de4
Update build_flake_pytest_ubuntu2004.yml
jonwright Nov 29, 2023
63529f5
Update setup.py
jonwright Nov 29, 2023
19a78de
Update sigma_3_matrices.py (py2, print)
jonwright Nov 29, 2023
e29dfe8
Update properties.py (py2: print)
jonwright Nov 29, 2023
e7f6ec5
Update test_datasets.py (py2: fstring/print)
jonwright Nov 29, 2023
6ddcb68
Update cImageD11.py : use OMP_NUM_THREADS and py27
jonwright Nov 29, 2023
f3fa703
Merge pull request #188 from jonwright/master
jonwright Nov 29, 2023
cf00423
Enable manually specifying detector and motor names
jadball Nov 30, 2023
634ce97
Merge pull request #189 from jadball/master
jonwright Nov 30, 2023
07b394a
matrix vs dcm with old scipy
jonwright Dec 1, 2023
d9514fd
fix py27 windows
jonwright Dec 1, 2023
1e164e8
binary wheels for win32/py27
jonwright Dec 1, 2023
9d7ec75
'fixup'
jonwright Dec 1, 2023
2b0e265
'fixup'
jonwright Dec 1, 2023
0b4dddb
'fixup'
jonwright Dec 1, 2023
c9c0a64
Update appveyor.yml
jonwright Dec 1, 2023
b65c824
Update appveyor.yml
jonwright Dec 1, 2023
c6521b6
Update appveyor.yml
jonwright Dec 1, 2023
7ce4877
Update appveyor.yml
jonwright Dec 1, 2023
81c22de
Update appveyor.yml
jonwright Dec 1, 2023
cd27144
Update appveyor.yml
jonwright Dec 1, 2023
c162c90
Update appveyor.yml
jonwright Dec 1, 2023
e79549b
Merge pull request #190 from jonwright/master
jonwright Dec 1, 2023
a4b742a
Add build wheels and tarball
t20100 Nov 29, 2023
24c372f
Merge pull request #191 from t20100/ci-wheel
jonwright Dec 6, 2023
b4dd255
Update README.md
jonwright Dec 6, 2023
0d99a2d
Update __init__.py
jonwright Dec 6, 2023
1e47035
Create eps_sig_solver_NEW.py
jbjacob94 Dec 7, 2023
2524a63
Merge pull request #192 from jbjacob94/master
jonwright Dec 7, 2023
4af88b8
Bugfix assemble_label.py
jonwright Dec 8, 2023
f0bf376
Merge pull request #193 from jonwright/master
jonwright Dec 11, 2023
e4bb92d
compatible for python2.7
jonwright Dec 11, 2023
c5a8ac1
fix file path
jonwright Dec 11, 2023
2c1bd1b
corrected mistakes in eps_sig_solve_NEW.py + updated invariant proper…
jbjacob94 Dec 11, 2023
279ebad
Update eps_sig_solver_NEW.py
jbjacob94 Dec 11, 2023
a9d29f7
corrected typo in form_stiffness_tensor
jbjacob94 Dec 11, 2023
f5443f2
updated Cij_symmetry
jbjacob94 Dec 12, 2023
d727343
Update eps_sig_solver_NEW.py
jbjacob94 Dec 12, 2023
f5c4dd8
Rename eps_sig_solver_NEW.py to stress.py
jbjacob94 Dec 12, 2023
89641ea
Rename ImageD11/eps_sig_solver.py to ImageD11/depreciated/eps_sig_sol…
jbjacob94 Dec 12, 2023
74ebe0e
Update stress.py
jbjacob94 Dec 12, 2023
6e70510
Update stress.py
jbjacob94 Dec 12, 2023
167ec31
Update stress.py
jbjacob94 Dec 12, 2023
40a6c82
Update stress.py
jbjacob94 Dec 12, 2023
4309754
Update stress.py
jbjacob94 Dec 12, 2023
34c0a95
Merge pull request #196 from jbjacob94/master
jonwright Dec 12, 2023
cf9723c
Merge branch 'master' of https://github.com/FABLE-3DXRD/ImageD11
jonwright Dec 12, 2023
a0b39a7
Add scanning 3DXRD example notebooks
jadball Jan 16, 2024
866a259
Merge pull request #198 from jadball/master
jadball Jan 16, 2024
498f90d
Remove f-string for 2.7 compat.
jadball Jan 16, 2024
211dcf5
Merge pull request #199 from jadball/master
jadball Jan 16, 2024
e47b73d
Exclude Python 3.12 in setup.py
jadball Jan 16, 2024
db6064c
Exclude 3.12 from GitHub Actions CI
jadball Jan 16, 2024
ddfddd6
Fix GitHub actions yml typo
jadball Jan 16, 2024
c8163dc
Third time lucky
jadball Jan 16, 2024
47bf12d
Merge pull request #200 from jadball/master
jadball Jan 16, 2024
b68dfed
Use GitHub Actions badges in README.md
jadball Jan 16, 2024
ccfb875
Correct typo
jadball Jan 16, 2024
0276621
Update README.md
jadball Jan 16, 2024
68b9e8d
Merge pull request #201 from jadball/master
jadball Jan 16, 2024
5bb9705
Merge branch 'master' of https://github.com/jonwright/ImageD11
jonwright Jan 18, 2024
c5ff766
fix the log strain - needs testing better
jonwright Jan 18, 2024
30fa025
helper function from several notebooks
jonwright Jan 18, 2024
3c48087
mlem and centers code
jonwright Jan 18, 2024
a36c9ef
function from notebooks
jonwright Jan 18, 2024
1ff8c3d
function from notebooks
jonwright Jan 18, 2024
fe40885
Change int32 and float32 to 64
jadball Jan 18, 2024
3df6a7b
Merge branch 'master' of https://github.com/jadball/ImageD11
jadball Jan 18, 2024
cf909f4
Merge branch 'FABLE-3DXRD:master' into master
jadball Jan 18, 2024
1d7ac67
Merge pull request #202 from jadball/master
jadball Jan 18, 2024
0677e22
Merge branch 'FABLE-3DXRD:master' into master
jonwright Jan 18, 2024
e78181f
remove broken test
jonwright Jan 18, 2024
2c46562
put stress on hold while updating it
jonwright Jan 18, 2024
26504e5
Merge pull request #203 from jonwright/master
jonwright Jan 18, 2024
db1bcfe
Update __init__.py v2.0.2
jonwright Jan 18, 2024
7df639d
Update README.md v2.0.2
jonwright Jan 18, 2024
cea535c
Update release.yml : no 3.12 version
jonwright Jan 19, 2024
08d720a
Allow a fuller mask, to mask powder rings for example
jonwright Jan 23, 2024
63d4f0d
fix mask for powder removal and reformat (black)
jonwright Jan 23, 2024
b40c57f
Resurrect tests for columnfile.py, correct np.int
jadball Jan 24, 2024
681e6a4
Fix np.int64
jadball Jan 24, 2024
1f52918
Add colfile tests to run_tests.py
jadball Jan 24, 2024
deb6644
Merge pull request #206 from jadball/colfile_fixes
jonwright Jan 24, 2024
06250fb
Significant notebook layout changes
jadball Jan 24, 2024
1581fda
Merge pull request #207 from jonwright/master
jonwright Jan 24, 2024
76d818a
Merge branch 'FABLE-3DXRD:master' into scanbooks
jadball Jan 25, 2024
f3f9aad
Parallelised iradon
jadball Jan 26, 2024
19c5f6e
Ensure 0 fill value for np.interp
jadball Jan 26, 2024
74f04c0
Merge pull request #208 from jadball/master
jonwright Jan 29, 2024
c3e5501
Merge branch 'master' into scanbooks
jadball Jan 29, 2024
6a5e244
Add mask to MLEM
jadball Jan 31, 2024
38e109c
Merge branch 'mlem_mask' into scanbooks
jadball Jan 31, 2024
688969c
First attempt at enforcing file paths
jadball Jan 31, 2024
0650e6d
Merge branch 'mlem_mask' into dset_filestructure
jadball Jan 31, 2024
a88c466
A few bugfixes
jadball Feb 1, 2024
37b51a2
Merge branch 'master' into scanbooks
jadball Feb 1, 2024
46dcfe4
Merge pull request #209 from jadball/master
jonwright Feb 1, 2024
9803bc7
update cibuildwheel and upload|download-artifacts
t20100 Feb 2, 2024
728ca3b
Merge pull request #210 from t20100/update-release-ci
jonwright Feb 2, 2024
4d68892
eps_sig_solver was deprecated
jonwright Feb 2, 2024
4a944d1
eps_sig_solver was deprecated + black formatted
jonwright Feb 2, 2024
7ebe626
Merge pull request #211 from jonwright/master
jonwright Feb 2, 2024
6155d78
Merge branch 'master' into scanbooks
jadball Feb 2, 2024
d2dfca8
Python 3.12 support
jadball Feb 7, 2024
918ad0b
Merge pull request #214 from jadball/master
jonwright Feb 7, 2024
d4a6051
Merge branch 'FABLE-3DXRD:master' into scanbooks
jadball Feb 7, 2024
b51c54d
Add col3d file to dataset paths
jadball Feb 9, 2024
22a8487
Try to get rid of the fork problem
jonwright Feb 9, 2024
a8f80bb
Merge pull request #216 from jonwright/master
jonwright Feb 9, 2024
0ab960e
point by point - needs some more docs to expain pars
jonwright Feb 9, 2024
f5e6bbe
Merge branch 'master' of https://github.com/jonwright/ImageD11
jonwright Feb 9, 2024
f937175
fixup 2.7
jonwright Feb 9, 2024
08587a8
Add outsize support to MLEM
jadball Feb 10, 2024
457de56
Merge branch 'FABLE-3DXRD:master' into master
jadball Feb 10, 2024
6e4ce86
Clean up comment
jadball Feb 10, 2024
71da3b4
Merge branch 'master' of https://github.com/jadball/ImageD11
jadball Feb 10, 2024
3a70d10
Merge branch 'master' into scanbooks
jadball Feb 10, 2024
abf2d3a
convert nnz to ip function
jonwright Feb 12, 2024
f06d865
error on typo in group names
jonwright Feb 12, 2024
38ced5f
fix forking problem/error
jonwright Feb 12, 2024
54d6461
Merge pull request #217 from jonwright/master
jonwright Feb 12, 2024
2a1be85
Merge pull request #218 from jadball/master
jonwright Feb 12, 2024
37da295
get the warnings to print, but only when needed
jonwright Feb 12, 2024
eb4c2cf
Merge branch 'FABLE-3DXRD:master' into master
jonwright Feb 12, 2024
1c1b3a8
for CI only having 1 thread?
jonwright Feb 12, 2024
8786f01
CI fails. Not sure why.
jonwright Feb 12, 2024
4562815
fixup
jonwright Feb 12, 2024
691f626
set forkserver here, todo: windows?
jonwright Feb 12, 2024
9b52935
and for windows that does not fork anyway
jonwright Feb 13, 2024
74e1dc0
and for windows that does not fork anyway
jonwright Feb 13, 2024
b093d2d
and for windows that does not fork anyway
jonwright Feb 13, 2024
e1956e4
Merge pull request #220 from jonwright/master
jonwright Feb 13, 2024
cd128cc
percent, not fraction
jonwright Feb 13, 2024
9a1ef66
tested on SS316
jonwright Feb 13, 2024
e0f8c9e
was not tested yet. pythonpath
jonwright Feb 13, 2024
bc7f932
Merge pull request #221 from jonwright/master
jonwright Feb 13, 2024
6ab3ff8
tested once: should not be forking
jonwright Feb 13, 2024
bee1240
seen to run once
jonwright Feb 13, 2024
82c99a1
with a threshold image option
jonwright Feb 13, 2024
89f87e6
Merge pull request #223 from jonwright/master
jonwright Feb 13, 2024
4bfd308
Notebook for par file building from poni
jadball Feb 16, 2024
7e3d45d
Merge branch 'master' into scanbooks
jadball Feb 16, 2024
91a3cb3
A few small sinogram bugfixes
jadball Feb 19, 2024
34743e4
self.shape is undefined
kif Feb 19, 2024
23949c6
Merge pull request #1 from kif/kif-patch-1
kif Feb 19, 2024
bddfc96
Merge pull request #224 from kif/master
jonwright Feb 19, 2024
fd550f4
Significant scanning notebook changes
jadball Feb 21, 2024
d2a8fee
Add box-beam example notebooks
jadball Feb 21, 2024
4e29977
Build parameter file from CIF and pyFAI PONI
jadball Feb 21, 2024
149ff0b
Merge branch 'FABLE-3DXRD:master' into scanbooks
jadball Feb 21, 2024
0b4deef
Clear notebook outputs
jadball Feb 21, 2024
bb894a8
Correct pyplot typo
jadball Feb 21, 2024
3c3b929
Allow flake 2.7 linting to pass
jadball Feb 21, 2024
e01f97b
Python 2 compat
jadball Feb 21, 2024
0a7882c
Remove duplicate segmentation notebook
jadball Feb 21, 2024
5c302a8
Common utils between scanning and box-beam notebooks
jadball Feb 21, 2024
6de094b
Replace FileNotFoundError with IOError for py2.7
jadball Feb 21, 2024
ff0e255
Merge pull request #225 from jadball/scanbooks
jonwright Feb 21, 2024
c057251
Minor phase scanning notebooks now use nb_utils, needs testing
jadball Feb 22, 2024
478b22e
Correct ImageD11_gui bugs - broken log buttons and tth_histogram
jadball Feb 26, 2024
5cb4fa5
Merge pull request #226 from jadball/scanbooks
jonwright Feb 26, 2024
5459918
Rename and add batch scripting
jadball Feb 26, 2024
3918f28
Add batch cells to scanning notebooks
jadball Feb 27, 2024
909fd40
All notebooks now use nb_utils.py
jadball Feb 27, 2024
24a7407
Remove WIP notebook from commit
jadball Feb 27, 2024
2601114
Add RGB colour output to sinogram notebooks
jadball Feb 27, 2024
69689a2
Add widget with sliders for Frelon peaksearch data
jadball Feb 27, 2024
b780ba6
Add RGB IPF X,Y,Z outputs to HDF, allows viewing with H5Web
jadball Feb 27, 2024
ebd4cff
py2 compat
jadball Feb 27, 2024
f7ad9ea
Merge pull request #227 from jadball/scanbooks
jonwright Feb 28, 2024
cb81823
Small bugfixes and tidying up
jadball Feb 28, 2024
f654ce7
Merge branch 'FABLE-3DXRD:master' into scanbooks
jadball Feb 28, 2024
beebcd4
Small changes and bugfixes
jadball Feb 29, 2024
aa50ecc
Clear output
jadball Feb 29, 2024
9b21b07
Merge pull request #228 from jadball/scanbooks
jadball Feb 29, 2024
d5f970e
secret spacegroup number hidden option
jonwright Mar 3, 2024
e9699fb
Merge pull request #229 from jonwright/master
jonwright Mar 3, 2024
6afd64a
secret spacegroup number hidden option
jonwright Mar 3, 2024
16b1f8b
Merge pull request #230 from jonwright/master
jonwright Mar 3, 2024
8715a69
secret spacegroup number hidden option
jonwright Mar 3, 2024
63b46ff
Merge pull request #231 from jonwright/master
jonwright Mar 3, 2024
f710db0
secret spacegroup number hidden option
jonwright Mar 3, 2024
6480810
Merge pull request #232 from jonwright/master
jonwright Mar 3, 2024
ea61364
Correct very dodgy default cosine tolerance
jadball Mar 3, 2024
6f83694
Correct grain translation sign problems
jadball Mar 3, 2024
8facccf
Correct dodgy do_index scan
jadball Mar 3, 2024
8283041
Merge pull request #235 from jadball/scanbooks
jadball Mar 4, 2024
2ae5b6f
Handle missing samples in skips_dict, dset lists are now sorted too
jadball Mar 4, 2024
f3ebc06
More accurately find user home directory path
jadball Mar 4, 2024
03a2303
Just use default arguments for assemble_label and properties
jadball Mar 4, 2024
f0b1a3b
Force only 2 threads for indexer (confirmed faster)
jadball Mar 4, 2024
01f4cad
Improve comments about peak filtration
jadball Mar 4, 2024
acaff05
Correct origin for recon plots
jadball Mar 4, 2024
bcd205f
Much faster spatial correction using lut
jadball Mar 4, 2024
a2940fc
Lima segmenter now used in interactive notebook
jadball Mar 4, 2024
f867066
Add howmany to Eiger interactive segmenter
jadball Mar 4, 2024
39fac06
Segment everything in parallel on SLURM
jadball Mar 4, 2024
2f96a3b
Merge branch 'FABLE-3DXRD:master' into scanbooks
jadball Mar 4, 2024
6662056
Merge pull request #237 from jadball/scanbooks
jonwright Mar 4, 2024
09616e1
Cleaned-up local PBP indexer
jadball Mar 4, 2024
d98d87a
Correct PBP results filename
jadball Mar 4, 2024
78864eb
Merge branch 'scanbooks' of https://github.com/jadball/ImageD11 into …
jadball Mar 4, 2024
8563cc7
Merge branch 'FABLE-3DXRD:master' into scanbooks
jadball Mar 4, 2024
e22f12f
Fix dodgy pbp name
jadball Mar 4, 2024
0f87c9d
Fix PBP output name for real this time
jadball Mar 4, 2024
811a659
Merge pull request #238 from jadball/scanbooks
jonwright Mar 4, 2024
ff5e36c
fixes #236
jonwright Mar 4, 2024
7747360
fixes #236
jonwright Mar 4, 2024
3819362
Correct home directory searching
jadball Mar 4, 2024
fdfb132
Merge branch 'FABLE-3DXRD:master' into scanbooks
jadball Mar 4, 2024
9eb7b18
Merge pull request #240 from jadball/scanbooks
jadball Mar 4, 2024
996441c
added options to score_all_pairs for ring selection
Mar 4, 2024
e720740
added options to score_all_pairs for ring selection
Mar 4, 2024
c0674b2
Merge pull request #239 from jonwright/master
jonwright Mar 5, 2024
bb55dac
Optionally scale sinogram rows by ring current
jadball Mar 6, 2024
ce7fcdb
Forgot to also add to batch cells
jadball Mar 6, 2024
1456eb8
Correct dodgy minor phase grain positioning
jadball Mar 6, 2024
507e7a3
nb_utils function for ring current correction per scan
jadball Mar 6, 2024
8fd1fd2
H5py in nb_utils
jadball Mar 6, 2024
b145eff
Make ring current correction optional and separate
jadball Mar 6, 2024
fe74de9
Merge pull request #242 from jadball/scanbooks
jadball Mar 6, 2024
eb703cb
More sensible default dstol
jadball Mar 6, 2024
2512974
Merge branch 'scanbooks' of github.com:jadball/ImageD11 into scanbooks
jadball Mar 6, 2024
285fff1
tag maintenance release
jonwright Mar 13, 2024
6e420cf
Merge branch 'v2.0.4' into v2.0.4
jonwright Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
56 changes: 56 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.8.0

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
python3 -m pip install pip setuptools --upgrade
python3 -m pip install pytest numpy
python3 -m pip install --editable .

- save_cache:
key: ImageD11-{{arch}}-{{ checksum "setup.py" }}
paths:
- ./venv

# run tests
# this example uses Django's built-in test-runner
# other common Python testing frameworks include pytest and nose
# https://pytest.org
# https://nose.readthedocs.io
- run:
name: run tests
command: |
. venv/bin/activate
python3 -m pytest

- store_artifacts:
path: test-reports
destination: test-reports
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
*.out_merge_t200 linguist-generated
*.out linguist-generated
*.flt linguist-generated
*.gve linguist-generated
*.ubi linguist-generated
*.par linguist-generated
*.prm linguist-generated
*.pars linguist-generated
*.html linguist-documentation
*.pdf linguist-generated
*.odt linguist-documentation
*.pks linguist-generated
51 changes: 51 additions & 0 deletions .github/workflows/build_flake_pytest_ubuntu2004.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: ImageD11_pytest
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
# because ESRF forces 20.04 for now.
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
if: matrix.python-version != '2.7'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Ubuntu python 2.7
if: matrix.python-version == '2.7'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends python2 python2-dev python3-virtualenv
virtualenv -p python2 ${HOME}/cp27
source ${HOME}/cp27/bin/activate
${HOME}/cp27/bin/python -m pip install -U pip
${HOME}/cp27/bin/python -m pip install -U setuptools wheel
echo "${HOME}/cp27/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
python -m pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude="*depreciated*"
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
cd test
python -m pytest
115 changes: 115 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Build and deploy

on:
workflow_dispatch:
release:
types:
- published

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}-${{ matrix.cibw_archs }}
runs-on: ${{ matrix.os }}
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
cibw_archs: "auto64"
#- os: ubuntu-20.04
# cibw_archs: "auto32"
- os: ubuntu-20.04
cibw_archs: "aarch64"
- os: ubuntu-20.04
cibw_archs: "ppc64le"
- os: windows-2019
cibw_archs: "auto64"
#- os: windows-2019
# cibw_archs: "auto32"
- os: macos-11
cibw_archs: "universal2"

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7"
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*
# Do not build for pypy, muslinux and python3.12 on ppc64le
CIBW_SKIP: pp* *-musllinux_* cp312-*linux_ppc64le
CIBW_ARCHS: ${{ matrix.cibw_archs }}

# Use silx wheelhouse: needed for ppc64le
CIBW_ENVIRONMENT_LINUX: "PIP_FIND_LINKS=https://www.silx.org/pub/wheelhouse/ PIP_TRUSTED_HOST=www.silx.org"

CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/test
# Skip tests for 32bits and emulated architectures, arm64 macos and on Windows
CIBW_TEST_SKIP: "*-*linux_i686 *-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64 *-macosx_universal2:arm64 *-win32 *-win_amd64"

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine

- name: Build sdist
run: python -m build --sdist

- name: Check the package
run: |
python -m twine check dist/*

- name: Install and test sdist
run: |
pip install --pre dist/ImageD11*.tar.gz
pytest test

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

pypi-publish:
needs: [build_wheels, build_sdist]
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ __pycache__/
\#*#

# Distribution / packaging
.vscode
.Python
env/
build/
Expand Down
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: python # this works for Linux but is an error on macOS or Windows
jobs:
include:
- name: "Python 3.8.0 on Xenial Linux"
python: 3.8 # this works for Linux but is ignored on macOS or Windows
- name: "Python 3.7.4 on macOS"
os: osx
osx_image: xcode11.2 # Python 3.7.4 running on macOS 10.14.4
language: shell # 'language: python' is an error on Travis CI macOS, could be generic
install:
- python3 -m pip install --upgrade pip setuptools
# fabio could not be installed as a dependency on mac automatically
- python3 -m pip install cython
- python3 -m pip install fabio
- python3 -m pip install --no-use-pep517 --editable .
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only
script:
- OMP_NUM_THREADS=2 python3 -m pytest
Loading