-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from GNS-Science/feature/save-disaggs-THS-v2
* disaggregation * gridded hazard
- Loading branch information
Showing
90 changed files
with
98,260 additions
and
2,740 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,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.1.0 | ||
current_version = 0.3.0 | ||
commit = True | ||
tag = True | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
.tox |
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,53 +1,13 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
name: Dev workflow | ||
|
||
name: dev workflow | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master, main ] | ||
pull_request: | ||
branches: [ master, main ] | ||
branches: [main, deploy-test] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "test" | ||
test: | ||
# The type of runner that the job will run on | ||
strategy: | ||
matrix: | ||
python-versions: [3.8, 3.9] | ||
os: [ubuntu-18.04] | ||
runs-on: ${{ matrix.os }} | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-versions }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry tox tox-gh-actions | ||
poetry export --dev --without-hashes > reqs.txt | ||
pip install -r reqs.txt | ||
pip install . | ||
- name: test with tox | ||
run: | ||
tox | ||
|
||
- name: list files | ||
run: ls -l . | ||
|
||
- uses: codecov/codecov-action@v1 | ||
with: | ||
fail_ci_if_error: true | ||
files: coverage.xml | ||
call-test-workflow: | ||
#https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow | ||
uses: ./.github/workflows/run-tests.yml |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Run Tests | ||
|
||
#https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
run_unit_tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
strategy: | ||
matrix: | ||
python-versions: [3.8, 3.9, "3.10"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-versions }} | ||
|
||
- name: Install and configure Poetry | ||
uses: GNS-Science/install-poetry@main | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: | | ||
poetry install --no-interaction --no-root --with dev --all-extras | ||
poetry add tox-gh-actions | ||
- name: test with tox (uses tox-gh-actions to select correct environment) | ||
run: | ||
poetry run tox | ||
|
||
- name: list files | ||
run: ls -l . | ||
|
||
- name: Submit coverage report if this is Linux | ||
if: runner.os == 'Linux' | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: false # optional (default = false) | ||
verbose: true # optional (default = false) |
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
Oops, something went wrong.