Skip to content

Commit

Permalink
Merge pull request #427 from dbekaert/dev
Browse files Browse the repository at this point in the history
Release: v0.2.0
  • Loading branch information
jhkennedy authored Dec 3, 2022
2 parents 3998dad + c37bf3a commit 4197fea
Show file tree
Hide file tree
Showing 189 changed files with 140,319 additions and 15,168 deletions.
63 changes: 63 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: 2.1
jobs:
build:
docker:
- image: cimg/base:current
user: root
steps:
- checkout
- run:
name: Setup micromamba
command: |
apt update --yes && apt-get upgrade --yes
apt install -y --no-install-recommends wget ca-certificates git
cd $HOME
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
- run:
name: Setup environment
command: |
eval "$($HOME/bin/micromamba shell hook -s posix)"
micromamba create -f environment.yml
micromamba activate RAiDER
pip install coveralls
echo url: https://cds.climate.copernicus.eu/api/v2 > $HOME/.cdsapirc
echo key: $cdsak >> $HOME/.cdsapirc
echo { > $HOME/.ecmwfapirc
echo ' "url": "https://api.ecmwf.int/v1",' >> $HOME/.ecmwfapirc
echo ' "email": "'$ecmwfu'",' >> $HOME/.ecmwfapirc
echo ' "key": "'$ecmwfk'"' >> $HOME/.ecmwfapirc
echo } >> $HOME/.ecmwfapirc
echo url: $NCUMloc > $HOME/.ncmrlogin
echo username: $NCUMu >> $HOME/.ncmrlogin
echo password: $NCUMp >> $HOME/.ncmrlogin
python --version
python -c "import numpy; print(numpy.__version__)"
python -c "import pyproj; print(pyproj.__version__)"
- run:
name: Install RAiDER and test the install
command: |
eval "$($HOME/bin/micromamba shell hook -s posix)"
micromamba activate RAiDER
python -m pip install .
python -c "import RAiDER; from RAiDER.delay import main"
python -c "import RAiDER; from RAiDER.interpolator import interp_along_axis"
- run:
name: Run unit tests
shell: /bin/bash -l
command: |
eval "$($HOME/bin/micromamba shell hook -s posix)"
micromamba activate RAiDER
COV_OPTIONS=`python -c "import importlib;print(*(' --cov='+p for p in importlib.util.find_spec('RAiDER').submodule_search_locations))"`
pytest -m "not long" test/ $COV_OPTIONS --cov-report=
- run:
name: Report coverage
command: |
eval "$($HOME/bin/micromamba shell hook -s posix)"
micromamba activate RAiDER
python .circleci/fix_coverage_paths.py .coverage $(pwd)/tools/RAiDER/
coverage report -mi
coveralls
23 changes: 23 additions & 0 deletions .circleci/fix_coverage_paths.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import re
import sqlite3
import sys


def main(file, replacement):
conn = sqlite3.connect(file)
cur = conn.cursor()
cur.execute("select path, id from file")

patched = [
(re.sub(r"/.*/RAiDER/", replacement, r[0]), r[1])
for r in cur
]

cur.executemany("update file set path=? where id=?", patched)

conn.commit()
conn.close()


if __name__ == '__main__':
main(*sys.argv[1:])
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Download
2. Command used
3. Error Output

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- RAiDER git tag: [e.g. git show --summary]
- OS

**Additional context**
Add any other context about the problem her
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "weekly"
39 changes: 39 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please run the following command on your PR to ensure code formatting consistency: -->
<!--- autopep8 <changed files/folders> --recursive --in-place --ignore=E5 -->

<!--- Please describe how you tested your changes. -->


<!--- For new functionality, describe added unit tests. -->


<!--- If this PR breaks existing unit tests, please describe in detail -->
<!--- which tests break and why. Describe what functionality is changed. -->


## Screenshots (if appropriate):

## Type of change
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] I have added an explanation of what your changes do and why you'd like us to include them.
- [ ] I have written new tests for your core changes, as applicable.
- [ ] I have successfully ran tests with your changes locally.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Docker Build

on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

jobs:
call-version-info-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.6.0
with:
conda_env_name: RAiDER
python_version: '3.10'

call-docker-ghcr-workflow:
needs: call-version-info-workflow
uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.6.0
with:
version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }}
release_branch: main
develop_branch: dev
user: ${{ github.actor }}
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Changelog updated?

on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
branches:
- main
- dev

jobs:
call-changelog-check-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.6.0
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Is PR labeled?

on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
branches:
- main

jobs:
call-labeled-pr-check-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.6.0
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.6.0
with:
release_prefix: RAiDER
develop_branch: dev
sync_pr_label: bot
secrets:
USER_TOKEN: ${{ secrets.RELEASE_ACCESS_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Tag version

on:
push:
branches:
- main

jobs:
call-bump-version-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.6.0
with:
user: dbekaert
email: bekaertdavid@gmail.com
secrets:
USER_TOKEN: ${{ secrets.RELEASE_ACCESS_TOKEN }}
27 changes: 23 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
*.swp
__pycache__
.vscode
*.pyc
*~
*.swp
*.DS_Store
.ftpignore
.ftpconfig
.ipynb_checkpoints
build
*.so
*.cmake
CMake*
Makefile
dummy*
weather_files
test/data
*.log
test/ERA*
*.dat
*.pdf
*.pyc
*.cpp
test/*/geom/*.dem
test/*/geom/*.nc
.eggs/
dist/
tools/RAiDER.egg-info/
tools/bindings/utils/makePoints.c
Loading

0 comments on commit 4197fea

Please sign in to comment.