-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from woutdenolf/support_py3_12
Support py3 12
- Loading branch information
Showing
438 changed files
with
3,511 additions
and
7,589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
extend-ignore = E203,E501,E701 | ||
max-line-length = 88 | ||
exclude = [".eggs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8_nb] | ||
extend-ignore = E203,E501,E701 | ||
max-line-length = 88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,66 @@ | ||
name: CI | ||
name: Unit Tests, Linting, and Formatting Checks | ||
|
||
on: | ||
# Triggers the workflow on push only for the master branch or pull request events | ||
push: | ||
branches: [ master ] | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
branches: | ||
- master | ||
|
||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} ${{ matrix.name-suffix }}" | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- name-suffix: "Linux" | ||
os: ubuntu-20.04 | ||
python-version: 3.6 | ||
BUILD_COMMAND: sdist | ||
#- name-suffix: "Mac" | ||
# os: macos-latest | ||
# python-version: 3.8 | ||
# BUILD_COMMAND: sdist | ||
#- name-suffix: "Windows" | ||
# os: windows-latest | ||
# python-version: 3.9 | ||
# BUILD_COMMAND: sdist | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Runs a single command using the runners shell | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
- name: Upgrade pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Run linting with Flake8 | ||
if: ${{ matrix.python-version == '3.12' }} | ||
run: | | ||
pip install "flake8 >=4" "flake8_nb >= 0.3.1" | ||
flake8 . | ||
- name: Check code formatting with Black | ||
if: ${{ matrix.python-version == '3.12' }} | ||
run: | | ||
pip install "black[jupyter] >=25" | ||
black --check . | ||
- name: Build source distribution | ||
run: | | ||
pip install build | ||
python -m build -s | ||
- name: Install source distribution | ||
run: | | ||
pip install --pre "$(ls dist/*.tar.gz)[test]" | ||
- name: Install non-pypi dependencies | ||
if: false | ||
run: | | ||
if [ ${{ runner.os }} == 'Windows' ]; then | ||
call tools\\windows-install-deps.bat -y -t -s -u | ||
else | ||
set +e # subprocesses that return >0 should not stop the script | ||
source tools/linux-install-deps.sh -y -t -s -u | ||
cprint "AAAAAAAAAAAAAAAA" | ||
pip_bin | ||
pip_bin list | ||
python -m pip list | ||
cprint "AAAAAAAAAAAAAAAA" | ||
fi | ||
- name: Print python info | ||
- name: Run tests | ||
run: | | ||
cprint "AAAAAAAAAAAAAAAA" | ||
pip_bin | ||
pip_bin list | ||
python -m pip list | ||
cprint "AAAAAAAAAAAAAAAA" | ||
python -m pip list | ||
python ci/info_platform.py | ||
- name: Generate source package or wheel | ||
run: | | ||
python setup.py ${{ matrix.BUILD_COMMAND }} | ||
ls dist | ||
- name: Install package | ||
run: python -m pip install --pre --find-links dist/ spectrocrunch | ||
|
||
- name: Run the tests | ||
run: python -m unittest -v spectrocrunch.tests.test_all.test_suite | ||
pytest --pyargs spectrocrunch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
*.py[cod] | ||
|
||
# Generated | ||
build | ||
dist | ||
*.egg* | ||
doc/source/apidocs | ||
# Hidden files | ||
.* | ||
!.gitignore | ||
!.flake8 | ||
!.flake8_nb | ||
|
||
# Temporary files | ||
*~ | ||
*.h5 | ||
*.nx5 | ||
*.hdf5 | ||
log.* | ||
*.png | ||
*.log | ||
*.*.txt | ||
*.cprof | ||
.[^.]* | ||
test.* | ||
# Byte / compiled / optimized | ||
*.py[cod] | ||
__pycache__/ | ||
*.so | ||
|
||
# Generated data | ||
testresults | ||
testdata | ||
# Distribution / packaging | ||
/build/ | ||
/dist/ | ||
*.egg-info/ | ||
.eggs/ | ||
/doc/_generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Change Log | ||
|
||
## develop (unreleased) | ||
|
||
- Noise propagation for fullfield XANES and micro-XANES (fluo and transmission) | ||
- Alignment of XRF maps on raw spectrum (integrated with dead time correction, flux normalization, and detector summing) | ||
- HDF5 based job pipelines | ||
- File system proxies | ||
|
||
## 0.0.1-alpha2 (unreleased) | ||
|
||
- Cross-section calculations combining xraylib (tables) with fdmnes (calculation) | ||
- Parse ESRF ID21 specific fullfield data | ||
- Fullfield XANES normalization | ||
- Parse ESRF ID16b specific fluoXAS data | ||
- ESRF ID21 specific data visualization | ||
- 1D spectrum alignment (only phase correlation and simple properties) | ||
|
||
## genesis (unreleased) | ||
|
||
- Initial version for Python 2.7 | ||
- Image alignment based on phase correlation, SIFT, Elastix, and simple image properties (max, min, centroid, and gaussfit) | ||
- XRF fitting and deadtime correction of fluoXAS stacks using pyMca | ||
- fluoXAS normalization | ||
- Parse ESRF ID21 specific fluoXAS data |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# MIT License | ||
|
||
**Copyright (c) 2021 European Synchrotron Radiation Facility** | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 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. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SpectroCrunch: spectroscopic imaging library (XRF/XAS) | ||
|
||
> **Warning:** | ||
> This library is deprecated and no longer maintained. | ||
> It is replaced by [ewoksfluo](https://ewoksfluo.readthedocs.io) and [ewoksndreg](https://ewoksndreg.readthedocs.io). | ||
## Getting started | ||
|
||
### Install from PyPi | ||
|
||
```bash | ||
pip install [--user] spectrocrunch | ||
``` | ||
|
||
### Install from source | ||
|
||
```bash | ||
git clone https://github.com/woutdenolf/spectrocrunch | ||
cd spectrocrunch | ||
pip install [--user] . | ||
``` | ||
|
||
### Install non-pypi dependencies | ||
|
||
```bash | ||
git clone https://github.com/woutdenolf/spectrocrunch | ||
. spectrocrunch/tools/linux-install-deps.sh [-u] | ||
``` | ||
|
||
### Test | ||
|
||
```bash | ||
pip install -e .[test] | ||
pytest . | ||
``` |
Oops, something went wrong.