Skip to content

Commit

Permalink
Merge branch 'main' into 112-userwarning-error-while-time-integrating…
Browse files Browse the repository at this point in the history
…-monitors
  • Loading branch information
pbeaucage authored Sep 17, 2024
2 parents a333d1b + 7f19ee9 commit c2e8686
Show file tree
Hide file tree
Showing 28 changed files with 15,391 additions and 515 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,23 @@ jobs:
runs-on: ${{ matrix.os}}
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10','3.11']
python-version: ['3.10','3.11']
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
path: ${{ env.pythonLocation }}
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-py${{ matrix.python-version }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
Expand Down Expand Up @@ -58,6 +57,8 @@ jobs:
unzip PSS300nm_C_ccd100.zip
wget https://github.com/usnistgov/PyHyperScattering/releases/download/0.0.0-example-data/smi_example.zip
unzip smi_example.zip
wget https://github.com/usnistgov/PyHyperScattering/releases/download/0.0.0-example-data/CMS_giwaxs_series.zip
unzip CMS_giwaxs_series.zip
- name: Fetch and unzip example data (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
Expand All @@ -71,7 +72,11 @@ jobs:
unzip PSS300nm_C_ccd100.zip
C:\msys64\usr\bin\wget.exe https://github.com/usnistgov/PyHyperScattering/releases/download/0.0.0-example-data/smi_example.zip
unzip smi_example.zip
C:\msys64\usr\bin\wget.exe https://github.com/usnistgov/PyHyperScattering/releases/download/0.0.0-example-data/CMS_giwaxs_series.zip
unzip CMS_giwaxs_series.zip
- name: Test with pytest
env:
TILED_API_KEY: ${{ secrets.TILED_API_KEY }}
run: |
#pytest -v
#temporarily disabling coverage for memory usage
Expand All @@ -81,7 +86,7 @@ jobs:
coverage report
coverage html
- name: Upload coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os}}-${{ matrix.python-version }}.html
path: htmlcov/index.html
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:

steps:
- name: Fetch repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/python-test-publish-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Fetch repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ venv/*
OrientationRunDec2019/**
**/*.p
**/.*
**/*.ipynb
*.png
*.h5
*.nxs
.ipynb_checkpoints
Example/**
example-data/**
src/__pycache__
*.egg-info
src/PyHyperScattering/__pycache__
src/PyHyperScattering/.ipynb_checkpoints/*
dist
docs/_build/*
dcs/_build/*
docs/_build/html/*
*.pyc
example_data/11012/Dark_56367-AI.txt
Expand Down
102 changes: 98 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,100 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
requires = ["setuptools", "wheel", "versioneer[toml]"]
build-backend = "setuptools.build_meta"

[project]
name = "PyHyperScattering"
dynamic = ["version"]
authors = [
{name = "Peter Beaucage", email = "peter.beaucage@nist.gov"},
]
description = "Utilities for loading, reducing, fitting, and plotting hyperspectral x-ray and neutron scattering data."
readme = "README.md"
requires-python = ">=3.6"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: Freely Distributable",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
]
dependencies = [
"h5py",
"numpy<2",
"pandas",
"pyfai",
"pyopencl",
"scikit-image",
"scipy",
"pillow",
"xarray",
"tqdm",
"astropy",
"fabio",
"nodejs",
"silx==2.0.0",
"pygix",
"pydata_sphinx_theme",
"numexpr<2.8.5",
]

[project.optional-dependencies]
bluesky = [
"tiled[all]>=0.1.0a74",
"databroker[all]>=2.0.0b10",
"bottleneck"
]
performance = [
"pyopencl",
"dask",
"cupy"
]
ui = [
"holoviews==1.16.2",
"hvplot"
]
doc = [
"sphinx",
"pydata_sphinx_theme"
]
test = [
"pytest",
"black",
"codecov",
"pylint"
]
all = [
"tiled[all]>=0.1.0a74",
"databroker[all]>=2.0.0b10",
"bottleneck",
"pyopencl",
"dask",
"cupy",
"holoviews==1.16.2",
"hvplot",
"sphinx",
"pydata_sphinx_theme",
"pytest",
"black",
"codecov",
"pylint"
]

[project.urls]
"Homepage" = "https://github.com/usnistgov/pyhyperscattering"
"Bug Tracker" = "https://github.com/usnistgov/pyhyperscattering/issues"
"Project Site" = "https://www.nist.gov/laboratories/tools-instruments/polarized-resonant-soft-x-ray-scattering-p-rsoxs"

[tool.setuptools.packages.find]
where = ["src"]

[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "src/PyHyperScattering/_version.py"
versionfile_build = "PyHyperScattering/_version.py"
tag_prefix = ""
parentdir_prefix = "pyhyperscattering-"
3 changes: 2 additions & 1 deletion requirements-bluesky.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
tiled[client]>=0.1.0a74
tiled[all]>=0.1.0a74
databroker[all]>=2.0.0b10
bottleneck
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ astropy
fabio
h5py
nodejs
numpy
numpy<2
pandas
# pygix fails to improt if silx > 2.0.0
silx==2.0.0
pyfai
pygix
scikit-image
scipy
pillow
Expand Down
48 changes: 0 additions & 48 deletions setup.cfg

This file was deleted.

Loading

0 comments on commit c2e8686

Please sign in to comment.