Skip to content

Commit

Permalink
circleci: use mambaforge (#25)
Browse files Browse the repository at this point in the history
+ circleci: use mambaforge to speedup + use PYAPS_HOME env

+ README/badge: update style/order to be consistent with mintpy
  • Loading branch information
yunjunz authored Apr 25, 2023
1 parent 2cbffac commit 244552c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
24 changes: 11 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,25 @@ jobs:
docker:
- image: ubuntu:bionic
environment:
CONDA_PREFIX: /root/tools/miniconda3
CONDA_PREFIX: /root/tools/mambaforge
PYAPS_HOME: /root/tools/PyAPS
user: root
working_directory: /root/tools/PyAPS
# Checkout the code as the first step. This is a dedicated CircleCI step.
steps:
- checkout
- run:
name: Setting Environment with Miniconda
name: Setting Environment with Mambaforge
command: |
apt update
apt-get update --yes && apt-get upgrade --yes
apt-get install --yes git wget
# download and install miniconda3
# download and install mambaforge
mkdir -p ${HOME}/tools
cd ${HOME}/tools
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p ${HOME}/tools/miniconda3
${HOME}/tools/miniconda3/bin/conda init bash
${HOME}/tools/miniconda3/bin/conda config --add channels conda-forge
${HOME}/tools/miniconda3/bin/conda install -c conda-forge --yes mamba
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh -b -p ${HOME}/tools/mambaforge
${HOME}/tools/mambaforge/bin/mamba init bash
# modify/export env var PATH to BASH_ENV to be shared across run steps
echo 'export PATH=${CONDA_PREFIX}/bin:${PATH}' >> ${BASH_ENV}
Expand All @@ -53,13 +52,12 @@ jobs:
no_output_timeout: 10m
command: |
export PYTHONUNBUFFERED=1
# install dependencies
# install dependencies and source code
source activate root
mamba install --verbose --yes --file ${HOME}/tools/PyAPS/requirements.txt
python -m pip install ${HOME}/tools/PyAPS
mamba install --verbose --yes --file ${PYAPS_HOME}/requirements.txt
python -m pip install ${PYAPS_HOME}
- run:
name: Test the Installation
command: |
python ${HOME}/tools/PyAPS/tests/test_calc.py
python ${PYAPS_HOME}/tests/test_calc.py
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![Language](https://img.shields.io/badge/python-3.8%2B-blue.svg?style=flat-square)](https://www.python.org/)
[![CircleCI](https://img.shields.io/circleci/build/github/insarlab/PyAPS.svg?logo=circleci&label=test&style=flat-square)](https://circleci.com/gh/insarlab/PyAPS)
[![Version](https://img.shields.io/github/v/release/insarlab/PyAPS?color=brightgreen&label=version&style=flat-square)](https://github.com/insarlab/PyAPS/releases)
[![Conda Download](https://img.shields.io/conda/dn/conda-forge/pyaps3?color=green&style=flat-square)](https://anaconda.org/conda-forge/pyaps3)
[![License](https://img.shields.io/badge/license-GPLv3+-yellow.svg?style=flat-square)](https://github.com/insarlab/PyAPS/blob/main/LICENSE)
[![CircleCI](https://img.shields.io/circleci/build/github/insarlab/PyAPS.svg?logo=circleci&label=tests&style=flat-square)](https://circleci.com/gh/insarlab/PyAPS)
[![Conda Download](https://img.shields.io/conda/dn/conda-forge/pyaps3?color=green&label=conda%20downloads&style=flat-square)](https://anaconda.org/conda-forge/pyaps3)
[![Version](https://img.shields.io/github/v/release/insarlab/PyAPS?color=yellow&label=version&style=flat-square)](https://github.com/insarlab/PyAPS/releases)
[![License](https://img.shields.io/badge/license-GPLv3+-blue.svg?style=flat-square)](https://github.com/insarlab/PyAPS/blob/main/LICENSE)
[![Citation](https://img.shields.io/badge/doi-10.1029%2F2011GL048757-blue?style=flat-square)](https://doi.org/10.1029/2011GL048757)

## PyAPS - Python based Atmospheric Phase Screen estimation
Expand Down

0 comments on commit 244552c

Please sign in to comment.