Skip to content

Commit

Permalink
Merge branch 'main' into exposure-correction-region
Browse files Browse the repository at this point in the history
  • Loading branch information
Astro-Kirsty authored May 7, 2024
2 parents 7713b96 + 0ce3226 commit a966111
Show file tree
Hide file tree
Showing 461 changed files with 32,629 additions and 9,701 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea to make Gammapy better!
title: ''
labels: feature
labels: feature-request
assignees: ''

---
Expand Down
9 changes: 5 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
**Description**
<!-- What is the motivation for this pull request? -->
<!-- Briefly: what changes are done here? -->
<!-- If this is to address a Github issue, mention its number to create a link -->
<!-- Example: This PR is to fix issue #42 -->
<!-- If this is to address a Github issue, mention its number and use the specific keywords to create a link -->
<!-- See docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue -->
<!-- Example: This PR is to resolve #42 -->

This pull request ...

**Dear reviewer**
<!-- Let the reviewer and Gammapy team know what you want: -->
<!-- * Is this ready for review? Or is it work in progress and you want some feedback? -->
<!-- * Do you want to go through review here? Or if someone just finish this up and merge it in? -->
<!-- * Do you want to go through review here? Or if someone should just finish this up and merge it? -->
<!-- Do you have any specific questions, e.g. about API or implementation? -->
<!-- Do you include a test executing new code you're adding (to make sure it runs)? -->
<!-- Do you include a test executing the new code you're adding (to make sure it runs)? -->
<!-- Do you include some documentation? Is it needed? -->
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
4 changes: 2 additions & 2 deletions .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
pip install eossr
- name: Check out a copy of the repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/[email protected]
Expand All @@ -39,7 +39,7 @@ jobs:
eossr-metadata-validator codemeta.json
- name: commit changes
uses: stefanzweifel/git-auto-commit-action@v4.1.6
uses: stefanzweifel/git-auto-commit-action@v5.0.1
if: success()
with:
commit_author: GitHub Actions <[email protected]>
Expand Down
78 changes: 48 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,74 +6,92 @@ jobs:
name: Black check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
version: "24.2.0"
ci-runs:
name: ${{ matrix.os }}, ${{ matrix.tox_env }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allowed_fail }}
env:
PYTEST_ADDOPTS: --color=yes -n auto --dist=loadscope
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu-latest
python: '3.8'
tox_env: 'py38-test-alldeps'
- os: ubuntu-latest
python: '3.9'
tox_env: 'py39-test-alldeps-cov'
allowed_fail: false
- os: ubuntu-latest
python: '3.10'
tox_env: 'py310-test-alldeps_noray'
gammapy_data_path: /home/runner/work/gammapy/gammapy/gammapy-datasets/dev
allowed_fail: false
- os: macos-latest
python: '3.9'
tox_env: 'py39-test'
python: '3.10'
tox_env: 'py310-test'
gammapy_data_path: /Users/runner/work/gammapy/gammapy/gammapy-datasets/dev
allowed_fail: false
- os: windows-latest
python: '3.9'
tox_env: 'py39-test-alldeps'
python: '3.10'
tox_env: 'py310-test-alldeps_noray'
gammapy_data_path: D:\a\gammapy\gammapy\gammapy-datasets\dev
allowed_fail: false
- os: ubuntu-latest
python: '3.10'
tox_env: 'py310-test-alldeps'
python: '3.11'
tox_env: 'py311-test-alldeps_noray'
gammapy_data_path: /home/runner/work/gammapy/gammapy/gammapy-datasets/dev
allowed_fail: false
- os: ubuntu-latest
python: '3.9'
tox_env: 'py39-test'
python: '3.12'
tox_env: 'py312-test-alldeps_noray'
gammapy_data_path: /home/runner/work/gammapy/gammapy/gammapy-datasets/dev
allowed_fail: false
- os: ubuntu-latest
python: '3.9'
python: '3.10'
tox_env: 'py310-test'
allowed_fail: false
- os: ubuntu-latest
python: '3.10'
tox_env: 'codestyle'
allowed_fail: false
- os: ubuntu-latest
python: '3.8'
tox_env: 'py38-test-alldeps-astropylts-numpy120'
python: '3.9'
tox_env: 'py39-test-alldeps_noray-astropy50-numpy121'
allowed_fail: false
- os: ubuntu-latest
python: '3.8'
python: '3.9'
tox_env: 'oldestdeps'
allowed_fail: false
- os: ubuntu-latest
python: '3.8'
python: '3.11'
tox_env: 'devdeps'
allowed_fail: true
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install 'tox<4'
python -m pip install tox
- name: download datasets
if: ${{ matrix.gammapy_data_path }}
run: |
python -m pip install tqdm requests
python -m pip install -e .
gammapy download datasets
- name: Print Python, pip, setuptools, and tox versions
- name: Print Python, pip, and tox versions
run: |
python -c "import sys; print(f'Python {sys.version}')"
python -c "import pip; print(f'pip {pip.__version__}')"
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')"
python -c "import tox; print(f'tox {tox.__version__}')"
- name: Run tests
if: ${{ !matrix.gammapy_data_path }}
Expand All @@ -85,12 +103,12 @@ jobs:
run: tox -e ${{ matrix.tox_env }} -- -n auto
- name: Upload coverage to codecov
if: "contains(matrix.tox_env, '-cov')"
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
verbose: true
sphinx:
name: Linux python 3.8 sphinx all-deps
name: Linux python 3.9 sphinx all-deps
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -100,17 +118,17 @@ jobs:
GAMMAPY_DATA: /home/runner/work/gammapy/gammapy/gammapy-datasets/dev
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install 'tox<4'
python -m pip install tox
- name: download datasets
run: |
python -m pip install tqdm requests
Expand All @@ -122,16 +140,16 @@ jobs:
- name: check links
continue-on-error: true
run: |
tox -e linkcheck -- -j auto
tox -e linkcheck -- -j auto
conda-build:
name: Linux python 3.8 conda-build all-deps
name: Linux python 3.9 conda-build all-deps
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: create and activate env
uses: mamba-org/provision-with-micromamba@main
with:
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Build dev docs
on: push

jobs:
dispatch-docs:
runs-on: ubuntu-latest
steps:
- name: Dispatch Gammapy Docs
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REMOTE_DISPATCH }}
repository: gammapy/gammapy-docs
event-type: dev-docs
if: github.repository_owner == 'gammapy'
runs-on: ubuntu-latest
steps:
- name: Dispatch Gammapy Docs
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REMOTE_DISPATCH }}
repository: gammapy/gammapy-docs
event-type: dev-docs
16 changes: 16 additions & 0 deletions .github/workflows/dispatch_benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Run profiler on benchmarks
on:
pull_request:
types:
- closed
jobs:
dispatch-benchmarks:
if: ${{ (github.repository_owner == 'gammapy') && (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'trigger-benchmarks')) }}
runs-on: ubuntu-latest
steps:
- name: Dispatch Gammapy Benchmarks
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REMOTE_DISPATCH }}
repository: gammapy/gammapy-benchmarks
event-type: dev-benchmarks
24 changes: 15 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ on:

jobs:
release-pypi:
if: github.repository_owner == 'gammapy'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Update tags
run: git fetch --tags
run: git fetch --tags --force
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
Expand All @@ -27,37 +28,42 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

release-github:
if: github.repository_owner == 'gammapy' && !contains(github.ref_name, 'rc')
needs: release-pypi
runs-on: ubuntu-latest
if: ${{ !contains(github.ref_name, 'rc') }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body: |
Gammapy is a Python package for gamma-ray astronomy. See [changelog for this release](https://github.com/gammapy/gammapy/blob/main/docs/release-notes/${{ github.ref_name }}.rst).
dispatch-docs:
if: github.repository_owner == 'gammapy'
needs: release-pypi
runs-on: ubuntu-latest
steps:
- name: Dispatch Gammapy Docs
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REMOTE_DISPATCH }}
repository: gammapy/gammapy-docs
event-type: release
client-payload: '{"release": "${{ github.ref_name }}"}'

dispatch-webpage:
if: github.repository_owner == 'gammapy'
needs: release-github
runs-on: ubuntu-latest
steps:
- name: Dispatch Gammapy Webpage
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REMOTE_DISPATCH }}
repository: gammapy/gammapy-webpage
event-type: release
client-payload: '{"release": "${{ github.ref_name }}"}'
client-payload: '{"release": "${{ github.ref_name }}"}'
15 changes: 15 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Anne Lemière <[email protected]> Anne Lemière <alemiere@MacBook-Pro-de-Ann
Andrew Chen <[email protected]> mealworm <[email protected]>

Arnau Aguasca-Cabot <[email protected]> aaguasca <[email protected]>
Arnau Aguasca-Cabot <[email protected]> aaguasca <[email protected]>

Arjun Voruganti <[email protected]> vorugantia <[email protected]>

Expand Down Expand Up @@ -37,6 +38,8 @@ Axel Donath <[email protected]> axel <[email protected]>

Brigitta M Sipőcz <[email protected]> Brigitta Sipocz <[email protected]>
Brigitta M Sipőcz <[email protected]> Brigitta Sipocz <[email protected]>
Brigitta M Sipőcz <[email protected]> Brigitta Sipőcz <[email protected]>
Brigitta M Sipőcz <[email protected]> Brigitta Sipőcz <[email protected]>

Bruno Khélifi <[email protected]> Bruno Khelifi <[email protected]>
Bruno Khélifi <[email protected]> Bruno Khelifi <khelifi@[email protected]>
Expand Down Expand Up @@ -68,6 +71,7 @@ Fabio Pintore <[email protected]> fabiopintore <39336833+fabiopintore@users.
Fabio Pintore <[email protected]> Mac_di_Fabio <[email protected]>
Fabio Pintore <[email protected]> Fabio Pintore <[email protected]>
Fabio Pintore <[email protected]> Fabio Pintore <[email protected]>
Fabio Pintore <[email protected]> Fabio Pintore <[email protected]>

Fabio Acero <[email protected]> facero <[email protected]>
Fabio Acero <[email protected]> facero <[email protected]>
Expand Down Expand Up @@ -103,6 +107,12 @@ Maximilian Linhoff <[email protected]> Maximilian Nöthe <maximil
Kai Brügge <[email protected]> Kai B <[email protected]>
Kai Brügge <[email protected]> Kai Bruegge <[email protected]>

Katrin Streil <[email protected]> Katrin Streil <[email protected]>
Katrin Streil <[email protected]> katrinstreil <[email protected]>

Kirsty Feijen <[email protected]> Astro-Kirsty <[email protected]>
Kirsty Feijen <[email protected]> AstroKirsty <[email protected]>

Lars Mohrmann <[email protected]> Lars <[email protected]>
Lars Mohrmann <[email protected]> Lars Mohrmann <[email protected]>

Expand Down Expand Up @@ -135,6 +145,8 @@ Matthias Wegenmat <[email protected]> Matthias Wegen <[email protected]
Matthias Wegenmat <[email protected]> Matthias Wegen <[email protected]>
Matthias Wegenmat <[email protected]> wegenmat <[email protected]>

Maxime Regeard <[email protected]> MRegeard <[email protected]>

Quentin Remy <[email protected]> QRemy <[email protected]>
Quentin Remy <[email protected]> Quentin Remy <[email protected]>

Expand All @@ -148,6 +160,9 @@ Sam Carter <[email protected]> samcarter <43832342+sam

Sebastian Panny <[email protected]> sebastianpanny <[email protected]>

Simone Mender <[email protected]> SimoneMender <[email protected]>
Simone Mender <[email protected]> Simone <[email protected]>

Stefan Klepser <[email protected]> klepser <[email protected]>

Thomas Armstrong <[email protected]> Thomas Armstrong <[email protected]>
Expand Down
Loading

0 comments on commit a966111

Please sign in to comment.