Skip to content

Commit

Permalink
Merge pull request #532 from SamuelBorden/math_refactor
Browse files Browse the repository at this point in the history
Math Refactor + Merged Main Into Refactor
  • Loading branch information
gipert authored Dec 1, 2023
2 parents 674b464 + 22fe95c commit 4de5fd4
Show file tree
Hide file tree
Showing 215 changed files with 9,389 additions and 25,346 deletions.
12 changes: 8 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!---
Before submitting a pull request, please make sure you've read and understood the pygama developer's guide: https://pygama.readthedocs.io/en/latest/developer.html. In particular, do not forget to:
- [ ] Conform to our **coding conventions**
- [ ] Update existing or add new **tests**
- [ ] Update existing or add new **documentation**
- [ ] Address any issue reported by GitHub checks
- Conform to our coding conventions
- Update existing or add new tests
- Update existing or add new documentation
- Address any issue reported by GitHub checks
--->
2 changes: 1 addition & 1 deletion .github/workflows/distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.1
- uses: pypa/gh-action-pypi-publish@v1.8.10
with:
password: ${{ secrets.pypi_password }}
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- refactor
- 'releases/**'
pull_request:
release:
Expand All @@ -21,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']
os: [ubuntu-latest, macOS-latest]

steps:
Expand Down Expand Up @@ -53,12 +52,12 @@ jobs:
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade .[test]
pytest --cov=pygama --cov-report=xml
python -m pytest --cov=pygama --cov-report=xml
- name: Upload Coverage to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
fail_ci_if_error: false

test-docs:
name: Build documentation
Expand Down
33 changes: 16 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autoupdate_schedule: "monthly"
autoupdate_schedule: "quarterly"
autofix_commit_msg: "style: pre-commit fixes"

exclude: ^(attic|tutorials|src/pygama/math|src/pygama/flow/datagroup.py)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.3.0"
rev: "v4.4.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -17,6 +17,7 @@ repos:
- id: check-json
- id: check-toml
- id: check-docstring-first
exclude: ^src/pygama/raw/(fc/fc_event_decoder.py|compass/compass_event_decoder.py)$
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-new-submodules
Expand All @@ -25,52 +26,50 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/setup-cfg-fmt
rev: "v2.2.0"
rev: "v2.4.0"
hooks:
- id: setup-cfg-fmt

- repo: https://github.com/PyCQA/isort
rev: "5.10.1"
rev: "5.12.0"
hooks:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: "v3.2.0"
rev: "v3.13.0"
hooks:
- id: pyupgrade
args: ["--py38-plus"]

- repo: https://github.com/psf/black
rev: "22.10.0"
rev: "23.9.1"
hooks:
- id: black-jupyter

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.982"
rev: "v1.5.1"
hooks:
- id: mypy
files: src
stages: [manual]

- repo: https://github.com/hadialqattan/pycln
rev: "v2.1.1"
rev: "v2.2.2"
hooks:
- id: pycln
exclude: ^src/pygama/pargen
args: [--all]

- repo: https://github.com/PyCQA/flake8
rev: "5.0.4"
rev: "6.1.0"
hooks:
- id: flake8
exclude: ^src/pygama/pargen
additional_dependencies: [
flake8-bugbear,
flake8-bugbear>=23.1.17,
flake8-print,
# flake8-docstrings,
pep8-naming
]
# args: ["--docstring-convention", "numpy"]

- repo: https://github.com/kynan/nbstripout
rev: "0.6.1"
Expand All @@ -80,31 +79,31 @@ repos:
"--extra-keys", "metadata.kernelspec metadata.language_info"]

- repo: https://github.com/mgedmin/check-manifest
rev: "0.48"
rev: "0.49"
hooks:
- id: check-manifest
stages: [manual]

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.2"
rev: "v2.2.5"
hooks:
- id: codespell

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.8.0.4"
rev: "v0.9.0.6"
hooks:
- id: shellcheck

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.9.0"
rev: "v1.10.0"
hooks:
- id: python-no-log-warn
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0-alpha.4"
rev: "v3.0.3"
hooks:
- id: prettier
types_or: [json]
Loading

0 comments on commit 4de5fd4

Please sign in to comment.