From 8c1cf2a6d29b9b482168c03bf20798eddd6ff07e Mon Sep 17 00:00:00 2001 From: Alessio Berti Date: Mon, 25 Sep 2023 17:14:55 +0200 Subject: [PATCH] Updates from add_license branch. --- .github/workflows/ci.yml | 29 ++++++++++++++++++----------- environment.yml | 1 + setup.cfg | 1 + setup.py | 1 + 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26f8a3f20..90ea27050 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,21 @@ env: PYTEST_ADDOPTS: --color=yes jobs: + pyflakes: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: 3.8 + + - name: pyflakes + run: | + pip install pyflakes + pyflakes magicctapipe + tests: runs-on: ubuntu-latest strategy: @@ -16,12 +31,12 @@ jobs: ctapipe-version: [v0.12.0] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -43,14 +58,6 @@ jobs: pip install -e . git describe --tags - - name: Static codechecks - # need to use a login shell for the conda setup to work - shell: bash -leo pipefail {0} - run: | - source $CONDA/etc/profile.d/conda.sh - conda activate ci - pyflakes magicctapipe - #- name: Download test data # env: # TEST_DATA_USER: ${{ secrets.test_data_user }} @@ -71,4 +78,4 @@ jobs: coverage run -m pytest -v coverage xml - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v3 diff --git a/environment.yml b/environment.yml index d69b0a691..fd30be377 100644 --- a/environment.yml +++ b/environment.yml @@ -8,6 +8,7 @@ dependencies: - pip - black - nbsphinx + - numpy=1.21 - ctapipe=0.12 - gammapy=0.19.0 - cython diff --git a/setup.cfg b/setup.cfg index 989dfd847..e2b2619a5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,7 @@ install_requires= ctaplot~=0.5.5 gammapy~=0.19.0 uproot~=4.1 + numpy<1.22.0a0 joblib pandas pyirf~=0.6.0 diff --git a/setup.py b/setup.py index 84a35ed41..f8c4a145e 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ 'ctaplot~=0.5.5', 'gammapy~=0.19.0', 'uproot~=4.1', + 'numpy<1.22.0a0', 'joblib', 'pandas', 'pyirf~=0.6.0',