Skip to content

Commit

Permalink
update tp from main (#518)
Browse files Browse the repository at this point in the history
* 380 remove useless statements from log file (#478)

* Simplify logging

* Fix black

* Fix deleting files in hydromts

* change fiat_toolbox dependency to main branch instead of pypi (#499)

Co-authored-by: LuukBlom <[email protected]>

* fix typo in fiat-toolbox url

* revert to using the latest release of fiat-toolbox

* docs hydromt fiat (#472)

* base setup hydromt FIAT

* upload videos hydromt fiat

* add videos and title for delft fiat

* insert more videos

* cross reference video and add text quickbuild

* fill in text for GUI sections

* correct style

* update style

* Add text SVI and additional attributes

* add workflows and fill in text

* fill vulnerability

* fill in text, update style sheet

* fixes

* add video to update vulnerability curves

* update data inputs

* style

* remove bold from "Delft FIAT"

* iupdate FIAT to Delft-FIAT

* update index.qmd and remove data_input qmd, following Kathryn's comments

* update hydormt_fiat_gui with kathryn's comments

* add ground elevation docs

* fine tuning

* update gui videos

* updates

* add new diagrams and remove videos

* add figures

* textual improvements

* textual improvements

* textual improvements

* textual improvements

* textual improvements

* replace with Delft-FIAT model-builder

* replace "the user" with "you"

* textual revision

* base setup hydromt FIAT

* upload videos hydromt fiat

* add videos and title for delft fiat

* insert more videos

* cross reference video and add text quickbuild

* fill in text for GUI sections

* correct style

* update style

* Add text SVI and additional attributes

* add workflows and fill in text

* fill vulnerability

* fill in text, update style sheet

* fixes

* add video to update vulnerability curves

* update data inputs

* style

* remove bold from "Delft FIAT"

* iupdate FIAT to Delft-FIAT

* update index.qmd and remove data_input qmd, following Kathryn's comments

* update hydormt_fiat_gui with kathryn's comments

* add ground elevation docs

* fine tuning

* update gui videos

* updates

* add new diagrams and remove videos

* add figures

* textual improvements

* textual improvements

* textual improvements

* textual improvements

* textual improvements

* replace with Delft-FIAT model-builder

* replace "the user" with "you"

* textual revision

* spelling

* textual

* textual

* update spell check to ignore static docs folder

* Made mods to the Delft-FIAT setup documentation (KR)

* Finished edits to get Delft-FIAT model builder documentation online

* base setup hydromt FIAT

* upload videos hydromt fiat

* add videos and title for delft fiat

* insert more videos

* cross reference video and add text quickbuild

* fill in text for GUI sections

* correct style

* update style

* Add text SVI and additional attributes

* add workflows and fill in text

* fill vulnerability

* fill in text, update style sheet

* fixes

* add video to update vulnerability curves

* update data inputs

* style

* remove bold from "Delft FIAT"

* iupdate FIAT to Delft-FIAT

* update index.qmd and remove data_input qmd, following Kathryn's comments

* update hydormt_fiat_gui with kathryn's comments

* add ground elevation docs

* fine tuning

* update gui videos

* updates

* add new diagrams and remove videos

* add figures

* textual improvements

* textual improvements

* textual improvements

* textual improvements

* textual improvements

* replace with Delft-FIAT model-builder

* replace "the user" with "you"

* textual revision

* base setup hydromt FIAT

* upload videos hydromt fiat

* fill in text for GUI sections

* add workflows and fill in text

* fill in text, update style sheet

* fixes

* add video to update vulnerability curves

* update data inputs

* style

* remove bold from "Delft FIAT"

* iupdate FIAT to Delft-FIAT

* update index.qmd and remove data_input qmd, following Kathryn's comments

* update gui videos

* add new diagrams and remove videos

* textual improvements

* textual improvements

* spelling

* textual

* textual

* update spell check to ignore static docs folder

* Made mods to the Delft-FIAT setup documentation (KR)

* Finished edits to get Delft-FIAT model builder documentation online

* typos

* Update pyproject.toml

exclude svg files from typo checking

* Remove ignore-paths from GH action

The `ignore-paths` variable that was added to the typos action doesn't seem to be one the action recognises and probably does nothing at best, so I removed it

* add nbformat to environment

* adding more jupyter dependencies

* add python to env.yml

* update workflow

* update workflow docs

* fix workflow

* fix workflow

* update docs workflow

* clean up workflow

---------

Co-authored-by: LuukBlom <[email protected]>
Co-authored-by: Kathryn Roscoe <[email protected]>
Co-authored-by: Sam Vente <[email protected]>

* Update auto_code_doc.yml

* fix publishing of docs workflow

* Update auto_code_doc.yml

* Add github actions auth to docs workflow

* allow manual trigger (#501)

* Update workflows (#503)

Summary of changes:

 1.   updated all the used action versions to the latest vesion, as some were really quite out of date, and made any changes necessary to fix whatever broke
  2.  removed black in favour of ruff formatting as ruff formatting implements the same formatting rules as black but runs at least an order of magnitude faster
  3.  did the same two things for the pre-commit config
   4.  ran pre-commit on all files
    5. removed the manual linting steps in favor of just using the pre-commit action which is both faster (does better caching) and ensures both local and ci checks are consistent

* remove jupyter notebooks (#505)

* remove jupyter notebooks

* add image of damage_curves instead of code block

* revert docs workflow to older version

* update to find environment

* fix indentation

* revert docs workflow changes

* try docs workflow from other branch

* docs workflow like main

* remove empty space

* fix linting

* add point

* fix linting

---------

Co-authored-by: Sam Vente <[email protected]>

* comment out destination in docs workflow (#506)

* #docs add jupyter (#507)

* add jupyter notebook

* remove damage curves

* Docs update style (#509)

* clean up style sheet

* clean up

* update section update floodadapt

* Docs update directory tree (#511)

* update folder directories explanation

* update text for folder directories

* Docs measures hydraulic (#512)

* started working on hydraulic measures documentation

* worked a bit more on the hydraulics.qmd

* Finished text about floodwalls and levees

* Added some more content, started pump section

* Finished hydraulic measures, waiting on content review to merge branch

* started working on hydraulic measures documentation

* worked a bit more on the hydraulics.qmd

* Finished text about floodwalls and levees

* Added some more content, started pump section

* Finished hydraulic measures, waiting on content review to merge branch

* testing commit/push

* finished testing commit/sync

* run pre-commit

---------

Co-authored-by: Santonia27 <[email protected]>

* Docs measures urban green infra (#513)

* Added green infra documentation

* edited following review comments

* run pre-commit

---------

Co-authored-by: Santonia27 <[email protected]>

* update docs structure and add "coming soon"to empty pages (#515)

* Don't offsett water levels in synthetic events (#514)

* Don't offsett water levels in synthetic events

* set wl_ts

* store waterlevel df in event object

* historical event doesnt need the function call

* fix typo

---------

Co-authored-by: = <=>
Co-authored-by: LuukBlom <[email protected]>

* FloodAdapt builder (#421)

* first commit with outline of FA setup script

* updated builder script

* updated model builder workflow

* added template files for FA model builder

* added doc strings

* small updates

* updated relative paths to static folder instead of site folder

* updated fiat elevations method

* small update on fiat damage unit reading

* updated bfe sjoin method

* updated reading of spatial joins with Hydromt-FIAT, and added a footprint read from file

* small update in BF saving

* initial commit for station info

* added part on reading tide_gauge data

* small updates

* updates based on latest main branch changes

* updated tide_gauge checks

* updated workflows

* initial commit for templates

* updates to make sure infometrics and infographic config works well for US

* updated infometric and infographic templates

* added small change on roads graphic

* updates based on latest main merge

* updated infometric and infographic templates

* updated infometric workflow

* added generalization for FIAT geometries and tiles creation

* updated location and names

* corrected road name bug

* updated folder structure and added a executable build script

* small bug corrections

* updated template metrics and infographics

* small update in workflows

* updated NSI metrics

* updated SVI input

* updated slr and tide amplitude workflows

* added functionality for rivers

* update templates

* update metric configs

* small updates in footprints workflows

* rearranged folder structure and added api

* small updates

* small updates for NSI infographics

* update OSM metrics

* added option to get building footprint data from OSM

* update on logging and tide_gauge options

* corrected bug for bfe indexing

* change default option for overwriting database

* added functionality for relative paths

* main script config

* allowed database path to be relative as well

* corrected bug with probabilistic_set relative path

* path as posix corrections

* correction for tiles indices folder name

* correction

* small change in main method

* pre-commit changes

---------

Co-authored-by: dladrichem <[email protected]>
Co-authored-by: Panos Athanasiou <[email protected]>
Co-authored-by: LuukBlom <[email protected]>
Co-authored-by: Santonia27 <[email protected]>
Co-authored-by: Kathryn Roscoe <[email protected]>
Co-authored-by: Sam Vente <[email protected]>
Co-authored-by: kathrynroscoe <[email protected]>
Co-authored-by: Santonia27 <[email protected]>
  • Loading branch information
9 people authored Aug 26, 2024
1 parent 509f586 commit 0d87a9b
Show file tree
Hide file tree
Showing 198 changed files with 6,303 additions and 461 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug Report
description: Report incorrect behavior
description: Report incorrect behavior
labels: [bug, needs refinement]

body:
Expand All @@ -18,8 +18,8 @@ body:
attributes:
description: >
Please provide a minimal, copy-pastable example or a link to a public repository that reproduces the behavior. If providing a copy pastable example,
you may assume your in a clean up to date version of FloodAdapt with a python enviroment active. In the case of a repository, ensure the repository
has a README.md which includes intructions to reproduce the behaviour.
you may assume your in a clean up to date version of FloodAdapt with a python environment active. In the case of a repository, ensure the repository
has a README.md which includes instructions to reproduce the behaviour.
label: Reproducible Example
validations:
required: true
Expand All @@ -43,7 +43,7 @@ body:
id: task-list
attributes:
description: >
Please provide a list of tasks that need to be completed before this issue can be closed.
Please provide a list of tasks that need to be completed before this issue can be closed.
label: Task list
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ body:
id: task-list
attributes:
description: >
Please provide a list of tasks that need to be completed before this issue can be closed.
Please provide a list of tasks that need to be completed before this issue can be closed.
label: Task list
validations:
required: true
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/auto_code_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -24,13 +24,29 @@ jobs:
pip install sphinx sphinx_rtd_theme
- name: Build docs
run: make -C flood_adapt/api html
run: |
# Change to the directory where the Makefile is located
cd flood_adapt/api
# Build the documentation
make html
# Verify the build output
ls -la build/html
- name: Publish to Wiki
run: |
git clone https://github.com/${{ github.repository }}.wiki.git
cp -r _build/html/* .wiki
cd .wiki
# Clone the Wiki repository into a directory named '.wiki'
git clone https://github.com/${{ github.repository }}.wiki.git .wiki
# Copy the built documentation to the Wiki repo
cp -r flood_adapt/api/build/html/* .wiki/
# Set up Git to use the GitHub Actions token for authentication
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
# Commit and push the changes
git add .
git -c user.name='github-actions[bot]' -c user.email='github-actions[bot]@users.noreply.github.com' commit -m 'Update Wiki'
git push
git push
52 changes: 22 additions & 30 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: Build Documentation
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: write
Expand All @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest" ]
os: ["ubuntu-latest"]
python-version: ["3.11"]
include:
- os: ubuntu-latest
Expand All @@ -29,53 +29,45 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: checkout code
uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Miniforge3
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Miniforge3
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
miniforge-variant: Miniforge3
miniforge-version: latest
use-mamba: true

- name: Setup env
run: |
pip install tomli
mamba env create --file=docs/environment_docs.yml
pip install tomli
mamba env create --file=docs/environment_docs.yml
mamba run -n floodadapt_docs pip install . --no-deps
VERSION=$(mamba run -n floodadapt_docs python -c "from flood_adapt import __version__; print(__version__)")
echo "DOC_VERSION=${VERSION}" >> $GITHUB_ENV
- name: Setup quarto
- name: Setup Quarto
run: |
sudo apt install -y curl
sudo apt install -y gdebi-core
mkdir tmp
sudo apt update
sudo apt install -y curl gdebi-core
mkdir -p tmp
curl -L https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.deb --output tmp/quarto.deb
chmod +x tmp/quarto.deb
sudo gdebi -n tmp/quarto.deb
# - name: Setup api -double check
# run: |
# export PATH=/usr/share/miniconda3/bin:$PATH
# mamba run -n floodadapt_docs python -m pip install tomli-w
# cd docs
# mamba run -n floodadapt_docs python api.py
# mamba run -n floodadapt_docs python -m quartodoc interlinks

- name: Generate docs
run: |
export PATH=/usr/share/miniconda3/bin:$PATH
source /usr/share/miniconda3/etc/profile.d/conda.sh
conda activate floodadapt_docs
quarto render docs/ --execute
echo "DOC_VERSION=$(mamba run -n floodadapt_docs python -c 'from floodadapt import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV
source /usr/share/miniconda/etc/profile.d/conda.sh
mamba run -n floodadapt_docs quarto render docs/ --execute
- name: Upload to GitHub Pages
if: ${{ github.event_name != 'pull_request' && !github.event.act }}
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_site
destination_dir: ./${{ env.DOC_VERSION }}
#destination_dir: ./${{ env.DOC_VERSION }}
keep_files: false
full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages
49 changes: 11 additions & 38 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,14 @@
name: CI
on: push
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install ruff==0.4.8 # Make sure these are the same as the versions in pyproject.toml
# Include `--format=github` to enable automatic inline annotations.
- name: Run Ruff
run: ruff check . --fix
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install black==24.1.1 # Make sure these are the same as the versions in pyproject.toml
- name: Check black version
run: black --version
- name: Run black
run: black --check .
name: pre-commit

on:
pull_request:
push:
branches: [main]

typos:
name: Spell Check with Typos
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
- name: Check spelling
uses: crate-ci/typos@master
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
27 changes: 0 additions & 27 deletions .github/workflows/lint_and_test.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
build-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.11'
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Build artifacts
run: make pypi

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: releases
path: dist
Expand All @@ -38,9 +38,9 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: releases
path: dist
Expand All @@ -49,7 +49,7 @@ jobs:
ls -ltrh
ls -ltrh dist
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand All @@ -62,12 +62,12 @@ jobs:
needs: test-built-dist
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.1
uses: pypa/gh-action-pypi-publish@v1.9.0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
21 changes: 10 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -12,16 +12,15 @@ repos:
exclude: '^environment/'
- id: check-merge-conflict
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.5
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
- repo: https://github.com/crate-ci/typos
rev: v1.22.7
rev: v1.23.6
hooks:
- id: typos
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,3 @@ call pytest tests --junitxml="report.xml"]]></param>
<cleanup />
</settings>
</build-type>

1 change: 0 additions & 1 deletion .teamcity/FloodAdapt/project-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
</project-extensions>
<cleanup />
</project>

1 change: 0 additions & 1 deletion .teamcity/FloodAdapt/vcsRoots/FloodAdapt_FloodAdapt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
<param name="username" value="teamcity-deltares" />
<param name="usernameStyle" value="USERID" />
</vcs-root>

1 change: 0 additions & 1 deletion .teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincTestData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
<param name="user" value="%svn_buildserver_username%" />
<param name="working-copy-format" value="1.8" />
</vcs-root>

Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
<param name="user" value="peiter" />
<param name="working-copy-format" value="1.8" />
</vcs-root>

3 changes: 1 addition & 2 deletions _extensions/quarto-ext/fontawesome/assets/css/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.fa-regular,
.fab,
.fa-brands,
.fal,
.fal,
.fa-light,
.fat,
.fa-thin,
Expand Down Expand Up @@ -7968,4 +7968,3 @@ readers do not read off random characters that represent icons */
font-display: block;
src: url("../webfonts/FontAwesome6Free-Regular-400.woff2") format("woff2"), url("../../webfonts/FontAwesome6Free-Regular-400.ttf") format("truetype");
unicode-range: U+F003,U+F006,U+F014,U+F016-F017,U+F01A-F01B,U+F01D,U+F022,U+F03E,U+F044,U+F046,U+F05C-F05D,U+F06E,U+F070,U+F087-F088,U+F08A,U+F094,U+F096-F097,U+F09D,U+F0A0,U+F0A2,U+F0A4-F0A7,U+F0C5,U+F0C7,U+F0E5-F0E6,U+F0EB,U+F0F6-F0F8,U+F10C,U+F114-F115,U+F118-F11A,U+F11C-F11D,U+F133,U+F147,U+F14E,U+F150-F152,U+F185-F186,U+F18E,U+F190-F192,U+F196,U+F1C1-F1C9,U+F1D9,U+F1DB,U+F1E3,U+F1EA,U+F1F7,U+F1F9,U+F20A,U+F247-F248,U+F24A,U+F24D,U+F255-F25B,U+F25D,U+F271-F274,U+F278,U+F27B,U+F28C,U+F28E,U+F29C,U+F2B5,U+F2B7,U+F2BA,U+F2BC,U+F2BE,U+F2C0-F2C1,U+F2C3,U+F2D0,U+F2D2,U+F2D4,U+F2DC; }

Loading

0 comments on commit 0d87a9b

Please sign in to comment.