Skip to content

Commit

Permalink
Merge branch 'main' into dpz
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBorden authored Mar 7, 2024
2 parents fc629e2 + ae3752a commit 7fdd904
Show file tree
Hide file tree
Showing 13 changed files with 222 additions and 134 deletions.
49 changes: 27 additions & 22 deletions .github/workflows/distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,47 @@ name: distribute

on:
workflow_dispatch:
pull_request:
push:
tags: "v*"
branches:
- main
release:
types:
- published

jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FORCE_COLOR: 3

jobs:
dist:
name: Distribution build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build SDist and wheel
run: pipx run build

- uses: actions/upload-artifact@v4
with:
path: dist/*
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check metadata
run: pipx run twine check dist/*
- uses: hynek/build-and-inspect-python-package@v2

publish:
needs: [dist]
name: Publish to PyPI
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- uses: pypa/[email protected]
with:
password: ${{ secrets.pypi_password }}
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release' && github.event.action == 'published'
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: pygama

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/**'
pull_request:
release:
- "releases/**"

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

env:
FORCE_COLOR: 3
TQDM_MININTERVAL: 100

jobs:
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ repos:
flake8-print,
pep8-naming
]
args: ["--extend-ignore", "E203,E501"]

- repo: https://github.com/kynan/nbstripout
rev: "0.6.1"
Expand Down
58 changes: 58 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
cff-version: 1.2.0
title: pygama
doi: https://doi.org/10.5281/zenodo.10614246
date-released: 2024-02-03
url: https://github.com/github-linguist/linguist
message: "If you use this software, please cite it as below."
authors:
- family-names: Agostini
given-names: Matteo
orcid: https://orcid.org/0000-0003-1151-5301
- family-names: Detwiler
given-names: Jason
orcid: https://orcid.org/0000-0002-9050-4610
- family-names: Pertoldi
given-names: Luigi
orcid: https://orcid.org/0000-0002-0467-2571
- family-names: Guinn
given-names: Ian
orcid: https://orcid.org/0000-0002-2424-3272
- family-names: Marshall
given-names: George
orcid: https://orcid.org/0000-0002-5470-5132
- family-names: D'Andrea
given-names: Valerio
orcid: https://orcid.org/0000-0003-2037-4133
- family-names: Krause
given-names: Patrick
orcid: https://orcid.org/0000-0002-9603-7865
- family-names: Song
given-names: Grace
email: [email protected]
- family-names: Engelhardt
given-names: Erin
email: [email protected]
- family-names: Borden
given-names: Sam
orcid: https://orcid.org/0009-0003-2539-4333
- family-names: Deckert
given-names: Rosanna
orcid: https://orcid.org/0009-0006-0431-341X
- family-names: Sweigart
given-names: David
email: [email protected]
- family-names: Zschocke
given-names: Andreas
email: [email protected]
- family-names: Wiseman
given-names: Clint
orcid: https://orcid.org/0000-0002-4232-1326
- family-names: Mathew
given-names: Tim
email: [email protected]
- family-names: Kermaïdic
given-names: Yoann
orcid: https://orcid.org/0000-0001-8007-8016
- family-names: Shanks
given-names: Ben
email: [email protected]
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[![GitHub pull requests](https://img.shields.io/github/issues-pr/legend-exp/pygama?logo=github)](https://github.com/legend-exp/pygama/pulls)
[![License](https://img.shields.io/github/license/legend-exp/pygama)](https://github.com/legend-exp/pygama/blob/main/LICENSE)
[![Read the Docs](https://img.shields.io/readthedocs/pygama?logo=readthedocs)](https://pygama.readthedocs.io)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10614246.svg)](https://zenodo.org/doi/10.5281/zenodo.10614246)

*pygama* is a Python package for:

Expand All @@ -28,7 +29,14 @@

Check out the [online documentation](https://pygama.readthedocs.io).

If you are using this software, consider
[citing](https://zenodo.org/doi/10.5281/zenodo.10614246)!

## Related repositories
- [legend-exp/legend-pydataobj](https://github.com/legend-exp/legend-pydataobj) → LEGEND Python Data Objects
- [legend-exp/legend-daq2lh5](https://github.com/legend-exp/legend-daq2lh5) → Convert digitizer data to LEGEND HDF5
- [legend-exp/dspeed](https://github.com/legend-exp/dspeed) → Fast Digital Signal Processing for particle detector signals in Python

- [legend-exp/legend-pydataobj](https://github.com/legend-exp/legend-pydataobj)
→ LEGEND Python Data Objects
- [legend-exp/legend-daq2lh5](https://github.com/legend-exp/legend-daq2lh5)
→ Convert digitizer data to LEGEND HDF5
- [legend-exp/dspeed](https://github.com/legend-exp/dspeed)
→ Fast Digital Signal Processing for particle detector signals in Python
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ Next steps

Source Code <https://github.com/legend-exp/pygama>
License <https://github.com/legend-exp/pygama/blob/main/LICENSE>
Citation <https://zenodo.org/doi/10.5281/zenodo.10614246>
Changelog <https://github.com/legend-exp/pygama/releases>
developer
115 changes: 111 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,126 @@
[build-system]
requires = [
"setuptools>=42.0.0",
"setuptools_scm[toml]>=3.4",
"setuptools>=61.2",
"setuptools_scm[toml]>=7",
]

build-backend = "setuptools.build_meta"

[project]
name = "pygama"
description = "Python package for data processing and analysis"
authors = [
{ name = "The LEGEND collaboration" },
]
maintainers = [
{ name = "The LEGEND collaboration" },
]
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: MacOS",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.9"
dependencies = [
"colorlog",
"dspeed>=1.3",
"h5py>=3.2",
"iminuit",
"legend-daq2lh5>=1.2",
"legend-pydataobj>=1.5",
"matplotlib",
"numba!=0.53.*,!=0.54.*,!=0.57",
"numpy>=1.21",
"pandas>=1.4.4",
"pint",
"scikit-learn",
"scipy>=1.0.1",
"tables",
"tqdm>=4.27",
]
dynamic = [
"version",
]

[project.urls]
Homepage = "https://github.com/legend-exp/pygama"
"Bug Tracker" = "https://github.com/legend-exp/pygama/issues"
Discussions = "https://github.com/legend-exp/pygama/discussions"
Changelog = "https://github.com/legend-exp/pygama/releases"

[tool.setuptools_scm]
write_to = "src/pygama/_version.py"

[project.optional-dependencies]
all = [
"pygama[docs,test]",
]
docs = [
"furo",
"jupyter",
"myst-parser",
"nbsphinx",
"sphinx",
"sphinx-copybutton",
"sphinx-inline-tabs",
]
test = [
"pre-commit",
"pylegendtestdata",
"pytest>=6.0",
"pytest-cov",
]

[project.scripts]
pygama = "pygama.cli:pygama_cli"

[tool.setuptools]
include-package-data = true
zip-safe = false
license-files = [
"LICENSE",
]

[tool.setuptools.package-dir]
"" = "src"

[tool.setuptools.packages.find]
where = [
"src",
]
namespaces = false

[tool.setuptools.package-data]
"*" = [
"*.json",
]

[tool.coverage]
run.source = ["pygama"]
report.exclude_also = [
'\.\.\.',
'if typing.TYPE_CHECKING:',
]

[tool.flake8]
extend-ignore = "E203, E501"

[tool.codespell]
ignore-words-list = "hist, gaus, nd, ans, crate, nin, puls, spms, fom"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = ["error"]
filterwarnings = ["error", 'ignore:\nPyarrow:DeprecationWarning']
log_cli_level = "info"
testpaths = "tests"

Expand Down
Loading

0 comments on commit 7fdd904

Please sign in to comment.