From 91c2ab160e8e96973c7448535fd42d2055fd25ce Mon Sep 17 00:00:00 2001 From: Alessio Berti Date: Mon, 25 Sep 2023 11:08:34 +0200 Subject: [PATCH 1/4] Add license (BSD 3-Clause license). --- LICENSE | 30 +++++++++++++++++++++++++++++- setup.cfg | 4 ++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index 570d3f292..bf95ea99c 100644 --- a/LICENSE +++ b/LICENSE @@ -1 +1,29 @@ -License yet to be defined \ No newline at end of file +BSD 3-Clause License + +Copyright (c) 2023, the magic-cta-pipe developers +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/setup.cfg b/setup.cfg index c847633c7..6b104a8f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [metadata] name = magic-cta-pipe -description = +description = long_description = file: README.md long_description_content_type = text/markdown author = magic-cta-pipe developers author_email = alessioberti90@gmail.com -license = BSD 3-Clause License +license = BSD 3-Clause url = https://github.com/cta-observatory/magic-cta-pipe [flake8] From a9373c58f40b47f7786e1867f50773f44bf090af Mon Sep 17 00:00:00 2001 From: Alessio Berti Date: Mon, 25 Sep 2023 16:58:11 +0200 Subject: [PATCH 2/4] Add specific job for pyflakes --- .github/workflows/ci.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26f8a3f20..45098e307 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: @@ -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 }} From 9cfe244e01d8e5e24b107a943049c2745b7ca73e Mon Sep 17 00:00:00 2001 From: Alessio Berti Date: Mon, 25 Sep 2023 16:58:27 +0200 Subject: [PATCH 3/4] Update actions version. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45098e307..90ea27050 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,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 }} @@ -78,4 +78,4 @@ jobs: coverage run -m pytest -v coverage xml - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v3 From 8df2c2bd403aa5da9371bcde7f674a1160b5eafa Mon Sep 17 00:00:00 2001 From: Alessio Berti Date: Mon, 25 Sep 2023 17:07:55 +0200 Subject: [PATCH 4/4] Add numpy versions. --- environment.yml | 1 + setup.py | 1 + 2 files changed, 2 insertions(+) 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.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',