Skip to content

Commit c4988ed

Browse files
committed
🔀 Merge branch 'bundle_deepicedrain' (#37)
Closes #37 Bundle deepicedrain components into a Python package.
2 parents d34455d + a825d06 commit c4988ed

File tree

16 files changed

+500
-747
lines changed

16 files changed

+500
-747
lines changed

.github/workflows/python-app.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Test DeepIceDrain package
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: ${{ matrix.os }} - Python ${{ matrix.python_version }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
max-parallel: 1
15+
fail-fast: false
16+
matrix:
17+
python_version: [3.8]
18+
os: [ubuntu-latest]
19+
20+
steps:
21+
- name: Checkout current git repository
22+
uses: actions/[email protected]
23+
24+
- name: Setup Miniconda
25+
uses: goanpeca/[email protected]
26+
with:
27+
miniconda-version: py38_4.8.2
28+
activate-environment: deepicedrain
29+
python-version: ${{ matrix.python-version }}
30+
channels: conda-forge
31+
show-channel-urls: true
32+
auto-activate-base: false
33+
use-only-tar-bz2: true
34+
35+
- name: Cache virtual environment
36+
uses: actions/cache@v2
37+
id: cache
38+
with:
39+
path: |
40+
/usr/share/miniconda3/envs/deepicedrain
41+
key: cache-venv-${{ github.ref }}-${{ hashFiles('**/environment.yml') }}-${{ hashFiles('**/poetry.lock') }}
42+
restore-keys: |
43+
cache-venv-refs/heads/master-
44+
45+
- name: Install conda dependencies
46+
shell: bash -l {0}
47+
run: conda env update -n deepicedrain -f environment.yml
48+
if: steps.cache.outputs.cache-hit != 'true'
49+
50+
- name: Install Poetry python dependencies
51+
shell: bash -l {0}
52+
run: poetry install
53+
if: steps.cache.outputs.cache-hit != 'true'
54+
55+
- name: Display virtualenv and installed package information
56+
shell: bash -l {0}
57+
run: |
58+
conda info
59+
conda list
60+
poetry env info
61+
poetry show
62+
63+
- name: Code Quality
64+
shell: bash -l {0}
65+
run: poetry run black . --check
66+
67+
- name: Test with pytest
68+
shell: bash -l {0}
69+
run: poetry run pytest --verbose tests/

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution / packaging
7+
.Python
8+
build/
9+
develop-eggs/
10+
dist/
11+
downloads/
12+
eggs/
13+
.eggs/
14+
lib/
15+
lib64/
16+
parts/
17+
sdist/
18+
var/
19+
wheels/
20+
pip-wheel-metadata/
21+
share/python-wheels/
22+
*.egg-info/
23+
.installed.cfg
24+
*.egg
25+
MANIFEST
26+
27+
# Jupyter Notebook
28+
.ipynb_checkpoints

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ SHELL ["/bin/bash", "-ic"]
4545
COPY environment.yml ${HOME}
4646
RUN conda env create -n deepicedrain -f environment.yml && \
4747
conda clean --all --yes && \
48+
conda info && \
4849
conda list -n deepicedrain
4950

5051
# Install dependencies in poetry.lock using poetry
@@ -53,6 +54,7 @@ COPY poetry.lock ${HOME}/
5354
RUN conda activate deepicedrain && \
5455
poetry install && \
5556
rm --recursive ${HOME}/.cache/pip && \
57+
poetry env info && \
5658
poetry show
5759

5860
# Install jupyterlab extensions

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# DeepIceDrain
22

3-
Mapping Antarctic subglacial water using a deep neural network.
3+
Mapping and monitoring deep subglacial water activity
4+
in Antarctica using remote sensing and machine learning.
45

56
![GitHub top language](https://img.shields.io/github/languages/top/weiji14/deepicedrain.svg)
67
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
7-
[![Github Actions Status](https://github.com/weiji14/deepicedrain/workflows/Build%20DeepIceDrain/badge.svg)](https://github.com/weiji14/deepicedrain/actions)
8+
![Test DeepIceDrain package](https://github.com/weiji14/deepicedrain/workflows/Test%20DeepIceDrain%20package/badge.svg)
89
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=weiji14/deepicedrain)](https://dependabot.com)
10+
![License](https://img.shields.io/github/license/weiji14/deepicedrain)
11+
12+
![ATL11 Cycle 6 minus Cycle 5 height change over Antarctica](https://user-images.githubusercontent.com/23487320/83100017-ffb0ba00-a102-11ea-9603-ac469f09e58b.png)
913

1014
# Getting started
1115

@@ -17,7 +21,17 @@ Launch in [Pangeo Binder](https://pangeo-binder.readthedocs.io) (Interactive jup
1721

1822
## Installation
1923

20-
Start by cloning this [repo-url](/../../)
24+
### Basic
25+
26+
To just try out the scripts, download the `environment.yml` file from the repository and run the commands below:
27+
28+
cd deepicedrain
29+
conda env create --name deepicedrain --file environment.yml
30+
pip install git+https://github.com/weiji14/deepicedrain.git
31+
32+
### Advanced
33+
34+
To help out with development, start by cloning this [repo-url](/../../)
2135

2236
git clone <repo-url>
2337

atl11_play.ipynb

Lines changed: 30 additions & 388 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)