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

Tipping points #446

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5ceb865
Update function to handle edge case
dumontgoulart Apr 12, 2024
b014275
added config for benefits visualization threshold (#387)
dumontgoulart Apr 30, 2024
da9249d
Update tipping point#
dumontgoulart May 15, 2024
6dfae92
update tipping_points from main (#439)
dumontgoulart May 15, 2024
45ab27a
Merge remote-tracking branch 'origin/main' into tipping_points
dumontgoulart May 15, 2024
4d307a4
Update TippingPointMetrics enum with additional options
dumontgoulart May 16, 2024
cf8d0c8
Edits on tp
dumontgoulart May 16, 2024
1e91d40
more edits
dumontgoulart May 16, 2024
fd50713
updating deprecated terms
dumontgoulart May 16, 2024
34f4034
Update TippingPointMetrics enum with additional options
dumontgoulart May 16, 2024
c2f1bfa
Update TippingPointMetrics enum with additional options
dumontgoulart May 17, 2024
26ffea2
Update TippingPointMetrics enum with additional options
dumontgoulart May 17, 2024
8a1a748
Update TippingPointMetrics enum with additional options
dumontgoulart Jun 11, 2024
3ab3964
Merge branch 'main' into tipping_points
dumontgoulart Jun 18, 2024
b44fba8
chore: Refactor object_model/tipping_point.py and interface/tipping_p…
dumontgoulart Jun 19, 2024
2ff6088
Update paths in dbs_controller.py for database_name
dumontgoulart Jun 19, 2024
1f8f97c
refactor functions
dumontgoulart Jun 20, 2024
9ce90fb
add tests
dumontgoulart Jun 21, 2024
f028b87
add tests for tipping points
dumontgoulart Jun 21, 2024
e2f102c
updating tipping points wrt main (#479)
dumontgoulart Jul 9, 2024
15f63a7
update tipping_points wrt main (#480)
dumontgoulart Jul 9, 2024
fa09dbf
refactor functions
dumontgoulart Jul 9, 2024
f108e9a
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Jul 10, 2024
a4f8860
chore: Refactor object_model/tipping_point.py and interface/tipping_p…
dumontgoulart Jul 10, 2024
8bc416c
update tp from main (#482)
dumontgoulart Jul 11, 2024
c1524ed
comments
dumontgoulart Jul 11, 2024
8f57e19
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Jul 11, 2024
2a620bd
update tp (#486)
dumontgoulart Jul 11, 2024
7f2b41d
Merge remote-tracking branch 'origin/main' into tipping_points
dumontgoulart Jul 11, 2024
0a398de
chore: Refactor object_model/tipping_point.py and interface/tipping_p…
dumontgoulart Jul 11, 2024
0522ab2
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Jul 11, 2024
28df051
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Jul 18, 2024
c7e59bc
update tp (#496)
dumontgoulart Jul 18, 2024
4cec8c8
Merge branch 'main' into tipping_points
dumontgoulart Jul 18, 2024
49477fb
chore: Refactor object_model/tipping_point.py and interface/tipping_p…
dumontgoulart Jul 18, 2024
bb29294
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Jul 19, 2024
914708f
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Jul 19, 2024
509f586
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Aug 26, 2024
0d87a9b
update tp from main (#518)
dumontgoulart Aug 26, 2024
beeb7d3
update tipping points to db and api
dumontgoulart Aug 26, 2024
29a0eec
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Aug 27, 2024
a65eccd
Merge branch 'main' into tipping_points
dumontgoulart Aug 27, 2024
5394985
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Aug 27, 2024
4767068
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Aug 28, 2024
ad8cd88
Refactor object_model/tipping_point.py to ensure availability of Data…
dumontgoulart Aug 28, 2024
971d7f6
Merge branch 'main' into tipping_points
dumontgoulart Aug 28, 2024
a1d6f57
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Aug 28, 2024
dacdb31
Merge branch 'tipping_points' of https://github.com/Deltares-research…
dumontgoulart Aug 28, 2024
3360678
Refactor object_model/tipping_point.py and interface/tipping_points.py
dumontgoulart Aug 28, 2024
8170ddd
Refactor TippingPoint class to update projection name and save it if …
dumontgoulart Sep 18, 2024
c6c53f6
Merge branch 'main' of https://github.com/Deltares-research/FloodAdap…
Santonia27 Oct 2, 2024
a7b16b0
adding "_tp_" to paths for easy locating
dumontgoulart Oct 3, 2024
279ee5f
invert order database
dumontgoulart Oct 8, 2024
f638cde
Merge branch 'main' of https://github.com/Deltares-research/FloodAdap…
Santonia27 Oct 29, 2024
231f84a
instead of plot outside gui plot inside (still needs fixing)
Santonia27 Oct 29, 2024
69a7ae0
add annotation to plot
Santonia27 Oct 30, 2024
4e35370
add y axis label
Santonia27 Oct 30, 2024
bc414fc
add view plot button
Santonia27 Nov 4, 2024
d9506c6
fix plot
Santonia27 Nov 4, 2024
86821f4
Merge branch 'main' of https://github.com/Deltares-research/FloodAdap…
Santonia27 Nov 4, 2024
81ecfcd
remove comments
Santonia27 Nov 5, 2024
76b59f8
update plot labels
Santonia27 Nov 6, 2024
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
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
Loading