-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump version to 0.2.0 for new release * add missing lxml to environment.yaml, pin minimum versions * use env file instead of hard coding installs for `freeze-deps.sh` * update readme for install instructions * specfile script needs `--network=host`. `conda env` has no install or -y * point README install instrs. to correct file * use geoffs version of dependency freezing script * remove brackets from license * Update .circleci/freeze-deps.sh Co-authored-by: Seongsu Jeong <sjeong.kr@gmail.com> --------- Co-authored-by: Seongsu Jeong <sjeong.kr@gmail.com>
- Loading branch information
1 parent
752c711
commit 559f026
Showing
5 changed files
with
80 additions
and
30 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 |
---|---|---|
@@ -1,6 +1,46 @@ | ||
#!/bin/sh | ||
docker run -v "$PWD:/mnt" -w /mnt --rm -it continuumio/miniconda3 bash -c '\ | ||
conda config --add channels conda-forge && \ | ||
conda config --remove channels defaults && \ | ||
conda update -y conda && \ | ||
conda install -y -c conda-forge isce3=0.8 build setuptools pytest isce3 shapely lxml && conda list --explicit > specfile.txt' | ||
#!/usr/bin/env bash | ||
|
||
# Enable common error handling options. | ||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
readonly HELP='usage: ./freeze-deps.sh ENVFILE > specfile.txt | ||
Create a conda lockfile from an environment YAML file for reproducible | ||
environments. | ||
positional arguments: | ||
ENVFILE a YAML file containing package specifications | ||
options: | ||
-h, --help show this help message and exit | ||
' | ||
|
||
main() { | ||
# Get absolute path of input YAML file. | ||
local ENVFILE | ||
ENVFILE=$(realpath "$1") | ||
|
||
# Get concretized package list. | ||
local PKGLIST | ||
PKGLIST=$(docker run --network=host \ | ||
-v "$ENVFILE:/tmp/environment.yml:ro" --rm \ | ||
mambaorg/micromamba:1.1.0 bash -c '\ | ||
micromamba install -y -n base -f /tmp/environment.yml > /dev/null && \ | ||
micromamba env export --explicit') | ||
|
||
# Sort packages alphabetically. | ||
# (The first 4 lines are assumed to be header lines and ignored.) | ||
echo "$PKGLIST" | (sed -u 4q; sort) | ||
} | ||
|
||
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then | ||
echo "$HELP" | ||
elif [[ "$#" -ne 1 ]]; then | ||
echo 'Illegal number of parameters' >&2 | ||
echo "$HELP" | ||
exit 1 | ||
else | ||
main "$@" | ||
fi |
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,11 +1,12 @@ | ||
name: s1reader | ||
channels: | ||
- defaults | ||
- conda-forge | ||
dependencies: | ||
- numpy | ||
- gdal | ||
- isce3 | ||
- packaging | ||
- requests | ||
- shapely | ||
- python>=3.8 | ||
- numpy>=1.20 | ||
- gdal>=3.0 | ||
- isce3>=0.13 | ||
- packaging>=21.0 | ||
- requests>=2.0 | ||
- shapely>=1.8 | ||
- lxml>=4.8 |
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