-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into default_config
# Conflicts: # .github/workflows/ci.yml # ctapipe/io/tests/test_simteleventsource.py # docs/conf.py # docs/developer-guide/index.rst # docs/examples/Tools.ipynb # docs/getting_started/index.rst # docs/index.rst # environment.yml # setup.cfg
- Loading branch information
Showing
209 changed files
with
6,447 additions
and
8,346 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 |
---|---|---|
|
@@ -24,6 +24,10 @@ jobs: | |
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Check README syntax | ||
run: | | ||
pip install restructuredtext-lint | ||
restructuredtext-lint README.rst | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --files $(git diff origin/main --name-only) | ||
|
@@ -75,25 +79,28 @@ jobs: | |
key: ctapipe-test-data | ||
|
||
- name: Prepare mamba installation | ||
if: matrix.install-method == 'mamba' | ||
if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
run: | | ||
# setup correct python version | ||
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml | ||
- name: mamba setup | ||
if: matrix.install-method == 'mamba' | ||
uses: mamba-org/provision-with-micromamba@v14 | ||
if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: environment.yml | ||
cache-downloads: true | ||
|
||
- name: Python setup | ||
if: matrix.install-method == 'pip' | ||
if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
check-latest: true | ||
|
||
- if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} | ||
- if: matrix.install-method == 'pip' && runner.os == 'macOS' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false | ||
name: Fix Python PATH on macOS | ||
# See https://github.com/actions/setup-python/issues/132 and | ||
# https://github.com/actions/setup-python/issues/132#issuecomment-779406058 | ||
|
@@ -104,34 +111,37 @@ jobs: | |
tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' | ||
- name: Install dependencies | ||
if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
run: | | ||
python --version | ||
pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0' | ||
pip install .[all] | ||
python --version | grep "Python ${PYTHON_VERSION}" | ||
pip install pytest-cov pytest-xdist 'coverage!=6.3.0' | ||
pip install -e .[all] | ||
pip install ./test_plugin | ||
pip freeze | ||
- name: Static codechecks | ||
run: | | ||
restructuredtext-lint README.rst | ||
- name: ctapipe-info | ||
if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false | ||
run: | | ||
ctapipe-info --all | ||
- name: Tests | ||
if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false | ||
run: | | ||
cd $(mktemp -d) | ||
pytest -n auto --dist loadscope \ | ||
--cov --cov-report=xml \ | ||
--cov --cov-report=xml:$GITHUB_WORKSPACE/coverage.xml \ | ||
--doctest-modules --doctest-glob='*.rst' \ | ||
--ignore=$HOME/work/ctapipe/ctapipe/docs/conf.py \ | ||
--pyargs ctapipe $HOME/work/ctapipe/ctapipe/docs | ||
--ignore=$GITHUB_WORKSPACE/docs/conf.py \ | ||
--pyargs ctapipe $GITHUB_WORKSPACE/docs | ||
ctapipe-info --version | ||
- uses: codecov/codecov-action@v3 | ||
if: contains(matrix.extra-args, 'codecov') | ||
if: contains(matrix.extra-args, 'codecov') && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false | ||
with: | ||
fail_ci_if_error: true | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
|
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
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
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
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,7 +1,10 @@ | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
""" | ||
Calibration | ||
Module for calibration code | ||
""" | ||
from .camera import CameraCalibrator, GainSelector | ||
|
||
__all__ = ["CameraCalibrator", "GainSelector"] | ||
__all__ = [ | ||
"CameraCalibrator", | ||
"GainSelector", | ||
] |
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
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
Oops, something went wrong.