Skip to content

Commit

Permalink
Conda activate fix and development environment (#665)
Browse files Browse the repository at this point in the history
* fixed bug in install_shapepipe

* Added development environment.

* added BigMac depdendency for macOS

* activate dev environment

* added cs_util to dev env

* unpinned pip dependencies

* updated install setup

* set checkout action version

* fix checkout action version

* source Source Extractor from Conda-Forge

* test Apple Silicon workflow

* revert macOS runner

* add gfortran to macOS deps

* test reinstall of gcc to find gfortran

* test without symlinks

* update symlink script and dev requirements

* update LDFLAGS and add license

* test CXXFLAGS='-fcommon' for ww

* test Ubuntu with gcc-9

* add Dockerfile and corresponding workflow

* update CDS version

* fix release CI trigger

* removed Dockerfile and corresponding workflow

* fix licence

* use latest release of PySAP
  • Loading branch information
sfarrens authored Oct 29, 2024
1 parent 1502cf8 commit 2b75551
Show file tree
Hide file tree
Showing 112 changed files with 644 additions and 273 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
pull_request:
branches:
- develop

jobs:

test-full:
name: Full Test Suite
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.11]

steps:
- uses: actions/checkout@v4

- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get install libopenblas-dev gcc-9 g++-9
- name: Install macOS Dependencies
shell: bash -l {0}
if: runner.os == 'macOS'
run: |
brew tap sfarrens/sf
brew install bigmac libomp
brew reinstall gcc
- name: Set up conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate-base: true
miniforge-version: latest

- name: Install package (Linux)
shell: bash -l {0}
env:
CC: gcc-9
CXX: g++-9
if: runner.os == 'Linux'
run: ./install_shapepipe --env-dev

- name: Install package (macOS)
shell: bash -l {0}
if: runner.os == 'macOS'
run: ./install_shapepipe --env-dev

- name: Run tests
shell: bash -l {0}
run: |
conda activate shapepipe-dev
pytest
shapepipe_run -c example/config.ini
39 changes: 25 additions & 14 deletions .github/workflows/ci-tests.yml → .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,59 @@ on:
branches:
- main
- master
- develop

jobs:

test-full:
name: Full Test Suite
runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9]
python-version: [3.11]

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get install libopenblas-dev
run: |
sudo apt-get install libopenblas-dev gcc-9 g++-9
- name: Install macOS Dependencies
shell: bash -l {0}
if: runner.os == 'macOS'
run: brew install libomp
run: |
brew tap sfarrens/sf
brew install bigmac libomp
brew reinstall gcc
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate-base: true
miniforge-version: latest

- name: Install package (Linux)
shell: bash -l {0}
env:
CC: gcc-9
CXX: g++-9
if: runner.os == 'Linux'
run: ./install_shapepipe --develop

- name: Install package
- name: Install package (macOS)
shell: bash -l {0}
if: runner.os == 'macOS'
run: ./install_shapepipe --develop

- name: Run tests
shell: bash -l {0}
run: |
conda activate shapepipe
python setup.py test
conda activate shapepipe-dev
pytest
shapepipe_run -c example/config.ini
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 CosmoStat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 0 additions & 6 deletions develop.txt

This file was deleted.

5 changes: 0 additions & 5 deletions docs/requirements.txt

This file was deleted.

41 changes: 41 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ShapePipe Development Environment
# ---------------------------------
# This environment should only be used for development and testing of
# ShapePipe (i.e. nothing that could be published). Packages need only
# specify the minimum compatible versions. This environment can updated
# as needed.
name: shapepipe-dev
channels:
- conda-forge
dependencies:
- python=3.11
- pip>=21.2.4
- astropy>=5.0
- astromatic-source-extractor>=2.25.0
- autoconf>=2.71
- automake>=1.16
- cmake>=3.27
- galsim>=2.5
- joblib>=1.3
- libtool>=2.4
- matplotlib>=3.8
- numba>=0.57
- numpy>=1.22
- pandas>=2.1
- pyqt5-sip>=12.12
- pyqtgraph>=0.13
- reproject>=0.12
- sqlitedict>=2.1
- termcolor>=2.3
- tqdm>=4.66
- treecorr>=4.3
- wget
- pip:
- cs_util>=0.0.5
- mccd>=1.2.3
- modopt>=1.6
- sip_tpv>=1.1
- sf_tools>=2.0.4
- python-pysap>=0.2.1
- git+https://github.com/aguinot/ngmix@stable_version
- git+https://github.com/tobias-liaudat/Stile@v0.1
Loading

0 comments on commit 2b75551

Please sign in to comment.