Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the env_fix branch with changes from main (#182) #257

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 36 additions & 31 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
name: Build Docs
name: Build Documentation

# We don't want pushes (or PRs) to gh-pages to kick anything off
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- tests/*
- hydromt_fiat/*
- docs/*
- examples/*
- pyproject.toml
pull_request:
branches: [ main ]
paths:
- tests/*
- hydromt_fiat/*
- docs/*
- examples/*
- pyproject.toml

jobs:
# Build docs on Linux
Expand All @@ -18,45 +30,38 @@ jobs:
run:
shell: bash -l {0}
steps:
- name: Checkout source
uses: actions/checkout@v2

# - name: Get tags
# run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Checkout code
uses: actions/checkout@v3

- name: Setup environment
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.9"
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
environment-file: envs/hydromt-fiat-dev.yml
activate-environment: hydromt-fiat-dev
python-version: "3.10"
miniforge-variant: Mambaforge
miniforge-version: latest
channels: conda-forge
use-mamba: true

- name: Install hydromt-fiat
run: flit install
- name: Install and activate environment
run: |
mamba env create -f envs/hydromt-fiat-docs.yml
conda activate hydromt-fiat-docs
pip install .

# Move examples folder before make html for nbsphinx
- name: Build docs
- name: Generate docs
if: ${{ github.event_name != 'pull_request' && !github.event.act }}
run: |
mv examples docs/_examples
pushd docs
make html
popd
# This overrides the version "dev" with the proper version if we're building off a
# branch that's not main (which is confined to n.nn.x above) or on a tag.
- name: Set doc version
if: ${{ github.event_name != 'push' || !contains(github.ref, 'main') }}
run: echo "DOC_VERSION=$(python -c 'from hydromt_fiat import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV
export PATH=/usr/share/miniconda3/bin:$PATH
PYTHONPYCACHEPREFIX=~/pycache mamba run -n hydromt-fiat-docs sphinx-build -M html ./docs ./docs/_build
echo "DOC_VERSION=$(mamba run -n hydromt-fiat-docs python -c 'from hydromt_fiat import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV

- name: Upload to GitHub Pages
if: ${{ github.event_name != 'pull_request'}}
uses: peaceiris/actions-gh-pages@v3.8.0
if: ${{ github.event_name != 'pull_request' && !github.event.act }}
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
exclude_assets: '.buildinfo,_sources/*'
exclude_assets: .buildinfo,_sources/*,_examples/*.ipynb
destination_dir: ./${{ env.DOC_VERSION }}
keep_files: false
full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages
full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages
47 changes: 0 additions & 47 deletions .github/workflows/tests.yml

This file was deleted.

24 changes: 23 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,26 @@ venv.bak/

/examples/data/miami_dade_landuse.gpkg
cache
/examples/FIAT_database
/examples/FIAT_database
hydromt_fiat/data/damage_functions/flooding/AllDDF_HAZUS_fractions.xlsx
hydromt_fiat/data/damage_functions/flooding/Hazus_IWR_curves.csv
hydromt_fiat/data/damage_functions/flooding/Hazus_IWR_curves.xlsx

# notebooks
/examples/aggregation_zones_example_files/
/examples/data/aggregation_zones/aggregation_zones_test1/
/examples/data/aggregation_zones/aggregation_zones_test2/
examples/aggregation_zones_example.html
examples/aggregation_zones_example_files/
examples/data/road_network/FIAT model/
examples/data/global_OSM_JRC/fiat_model/
examples/data/update_ground_floor_height/test_update_ground_floor_height_points/
examples/data/update_ground_floor_height/test_update_ground_floor_height_polygons/
examples/data/building_footprints/fiat_model_bfs/
examples/data/aggregation_zones/output/
examples/data/setup_exposure_buildings_with_dem_data/test_vulnerability_and_exposure_NSI_with_dem_data/
examples/data/setup_new_composite_area/test_setup_new_composite_area_datum/
examples/data/setup_new_composite_area/test_setup_new_composite_area_elevation/
examples/data/setup_new_composite_area/test_setup_new_composite_area_geom/
examples/data/update_max_potential_damage/test_update_max_potential_damage_points/
examples/data/update_max_potential_damage/test_update_max_potential_damage_polygons/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
26 changes: 5 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HydroMT-FIAT: Delft-FIAT plugin for HydroMT
#########################################
HydroMT-FIAT: HydroMT plugin for Delft-FIAT
############################################

.. image:: https://codecov.io/gh/Deltares/hydromt_fiat/branch/main/graph/badge.svg
:target: https://codecov.io/gh/Deltares/hydromt_fiat
Expand All @@ -20,7 +20,7 @@ HydroMT-FIAT: Delft-FIAT plugin for HydroMT
:target: https://mybinder.org/v2/gh/Deltares/hydromt_fiat/main?urlpath=lab/tree/examples


hydroMT_ is a python package, developed by Deltares, to build and analyze hydro models.
HydroMT_ is a python package, developed by Deltares, to build and analyze hydro models.
It provides a generic model api with attributes to access the model schematization,
(dynamic) forcing data, results and states. This plugin provides an implementation
for the Delft-FIAT_ model.
Expand Down Expand Up @@ -52,25 +52,9 @@ For developing on HydroMT-FIAT, do:
Documentation
-------------

Learn more about the hydroMT_fiat plugin in its `online documentation <https://deltares.github.io/hydromt_fiat/>`_
Learn more about the HydroMT-FIAT plugin in its `online documentation <https://deltares.github.io/hydromt_fiat/>`_

Contributing
------------

You can find information about contributing to hydroMT at our `Contributing page <https://deltares.github.io/hydromt_fiat/latest/contributing.html>`_.

License
-------

Copyright (c) 2021, Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along with this program. If not,
see <https://www.gnu.org/licenses/>.
You can find information about contributing to HydroMT at our `Contributing page <https://deltares.github.io/hydromt/latest/dev/contributing>`_.
Binary file added docs/_static/Region_download.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions docs/_static/charleston.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/_static/deltares-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/_static/fiat_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/format_vulnerability_curves.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading