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

Add self check to hazard run check #471

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

dladrichem
Copy link
Contributor

Don't copy the hazad if it is comming from itself
Also to make it visible that a scenario rerun is attempted, append to the logging instead of removing the entire file
This also needed to make sure all other loggers were closed

@dladrichem dladrichem requested review from GundulaW and LuukBlom June 19, 2024 13:57
@dladrichem dladrichem linked an issue Jun 19, 2024 that may be closed by this pull request
4 tasks
@dladrichem dladrichem merged commit 861d031 into main Jun 19, 2024
4 of 5 checks passed
@dladrichem dladrichem deleted the 452-output-deleted-when-running-many-files branch June 19, 2024 14:46
dumontgoulart added a commit that referenced this pull request Jul 9, 2024
* take most of the env creation script from frontend and put it in the … (#467)

* take most of the env creation script from frontend and put it in the backend

* move env_docs.yml to the docs dir

* update readme

* added temporary event name for plotting rainfall and river (#470)

* Move env creation to backend (#468)

* take most of the env creation script from frontend and put it in the backend

* move env_docs.yml to the docs dir

* update readme

* fix bug in env creation

* black

* pre-commit version and fiat adapter test not skipped anymore (#463)

* updated pre-commit version

* updated svn repo so this test can be run now

* return periods test is not skipped anymore with fiat_toolbox updates

* changed cht_observation to git repo install

* chore: close all loggers & handlers in database fixture setup and teardown

* fix: Output more info if incompatible river coordinates in SFINCS adapter and sitetoml

* add reset() to dbs_controller.py

* reset database in conftest.py

* black

* fix versions of formatting tools

---------

Co-authored-by: LuukBlom <luuk.blom@deltares.nl>
Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.com>

* Add self check to hazard run check (#471)

* Add self check to hazard run check

* Fix black

* Updates in site.toml to clear not-used attributes and update some vairables (#462)

* removed unused attributes from site toml

* small update in lint

* made observation points non mandatory

* changed site attribute obs_station to tide_gauge and removed unused attributes

* changed the flooding_threshold attribute to belong to a flood_frequency variable

* added default value for flood frequency flooding threshold

* when no river is present template discharge is used for now

* added source option to tide_gauge site attribute

* small correction in docstring

* changed slr.scenarios in site.toml and made them not mandatory

* offshore model and cyclone tracks not mandatory anymore

* small updates

* naming change

* make sure that the workflow does not break when there is nothing to plot

* todo on api for aggregation

* revert rename (#474)

* Fix logging and tests (#475)

* fix api output fixture and tests

* return -> yield in all fixtures

* return -> yield in all fixtures

* fix scenario.run() tests

* add logging class and implement in codebase

* bugfix logger contextmanager

* improve test logging

* fix bug in create_roads

* Add attribute check to adapter logger

* Config changes (#476)

* database path updates

* Update config getters to return Paths where needed

* Update lint.yml

* Update lint.yml

---------

Co-authored-by: GundulaW <gundulawinter@gmail.com>

* Split mandatory and optional metrics (#477)

---------

Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.com>
Co-authored-by: Panos Athanasiou <38324721+panosatha@users.noreply.github.com>
Co-authored-by: LuukBlom <luuk.blom@deltares.nl>
Co-authored-by: dladrichem <136334482+dladrichem@users.noreply.github.com>
Co-authored-by: Daley Adrichem <daley.adrichem@deltares.nl>
Co-authored-by: GundulaW <gundulawinter@gmail.com>
dumontgoulart added a commit that referenced this pull request Jul 9, 2024
* take most of the env creation script from frontend and put it in the … (#467)

* take most of the env creation script from frontend and put it in the backend

* move env_docs.yml to the docs dir

* update readme

* added temporary event name for plotting rainfall and river (#470)

* Move env creation to backend (#468)

* take most of the env creation script from frontend and put it in the backend

* move env_docs.yml to the docs dir

* update readme

* fix bug in env creation

* black

* pre-commit version and fiat adapter test not skipped anymore (#463)

* updated pre-commit version

* updated svn repo so this test can be run now

* return periods test is not skipped anymore with fiat_toolbox updates

* changed cht_observation to git repo install

* chore: close all loggers & handlers in database fixture setup and teardown

* fix: Output more info if incompatible river coordinates in SFINCS adapter and sitetoml

* add reset() to dbs_controller.py

* reset database in conftest.py

* black

* fix versions of formatting tools

---------

Co-authored-by: LuukBlom <luuk.blom@deltares.nl>
Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.com>

* Add self check to hazard run check (#471)

* Add self check to hazard run check

* Fix black

* Updates in site.toml to clear not-used attributes and update some vairables (#462)

* removed unused attributes from site toml

* small update in lint

* made observation points non mandatory

* changed site attribute obs_station to tide_gauge and removed unused attributes

* changed the flooding_threshold attribute to belong to a flood_frequency variable

* added default value for flood frequency flooding threshold

* when no river is present template discharge is used for now

* added source option to tide_gauge site attribute

* small correction in docstring

* changed slr.scenarios in site.toml and made them not mandatory

* offshore model and cyclone tracks not mandatory anymore

* small updates

* naming change

* make sure that the workflow does not break when there is nothing to plot

* todo on api for aggregation

* revert rename (#474)

* Fix logging and tests (#475)

* fix api output fixture and tests

* return -> yield in all fixtures

* return -> yield in all fixtures

* fix scenario.run() tests

* add logging class and implement in codebase

* bugfix logger contextmanager

* improve test logging

* fix bug in create_roads

* Add attribute check to adapter logger

* Config changes (#476)

* database path updates

* Update config getters to return Paths where needed

* Update lint.yml

* Update lint.yml

---------

Co-authored-by: GundulaW <gundulawinter@gmail.com>

* Split mandatory and optional metrics (#477)

---------

Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.com>
Co-authored-by: Panos Athanasiou <38324721+panosatha@users.noreply.github.com>
Co-authored-by: LuukBlom <luuk.blom@deltares.nl>
Co-authored-by: dladrichem <136334482+dladrichem@users.noreply.github.com>
Co-authored-by: Daley Adrichem <daley.adrichem@deltares.nl>
Co-authored-by: GundulaW <gundulawinter@gmail.com>
dumontgoulart added a commit that referenced this pull request Jul 11, 2024
* take most of the env creation script from frontend and put it in the … (#467)

* take most of the env creation script from frontend and put it in the backend

* move env_docs.yml to the docs dir

* update readme

* added temporary event name for plotting rainfall and river (#470)

* Move env creation to backend (#468)

* take most of the env creation script from frontend and put it in the backend

* move env_docs.yml to the docs dir

* update readme

* fix bug in env creation

* black

* pre-commit version and fiat adapter test not skipped anymore (#463)

* updated pre-commit version

* updated svn repo so this test can be run now

* return periods test is not skipped anymore with fiat_toolbox updates

* changed cht_observation to git repo install

* chore: close all loggers & handlers in database fixture setup and teardown

* fix: Output more info if incompatible river coordinates in SFINCS adapter and sitetoml

* add reset() to dbs_controller.py

* reset database in conftest.py

* black

* fix versions of formatting tools

---------

Co-authored-by: LuukBlom <luuk.blom@deltares.nl>
Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.com>

* Add self check to hazard run check (#471)

* Add self check to hazard run check

* Fix black

* Updates in site.toml to clear not-used attributes and update some vairables (#462)

* removed unused attributes from site toml

* small update in lint

* made observation points non mandatory

* changed site attribute obs_station to tide_gauge and removed unused attributes

* changed the flooding_threshold attribute to belong to a flood_frequency variable

* added default value for flood frequency flooding threshold

* when no river is present template discharge is used for now

* added source option to tide_gauge site attribute

* small correction in docstring

* changed slr.scenarios in site.toml and made them not mandatory

* offshore model and cyclone tracks not mandatory anymore

* small updates

* naming change

* make sure that the workflow does not break when there is nothing to plot

* todo on api for aggregation

* revert rename (#474)

* Fix logging and tests (#475)

* fix api output fixture and tests

* return -> yield in all fixtures

* return -> yield in all fixtures

* fix scenario.run() tests

* add logging class and implement in codebase

* bugfix logger contextmanager

* improve test logging

* fix bug in create_roads

* Add attribute check to adapter logger

* Config changes (#476)

* database path updates

* Update config getters to return Paths where needed

* Update lint.yml

* Update lint.yml

---------

Co-authored-by: GundulaW <gundulawinter@gmail.com>

* Split mandatory and optional metrics (#477)

---------

Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.com>
Co-authored-by: Panos Athanasiou <38324721+panosatha@users.noreply.github.com>
Co-authored-by: LuukBlom <luuk.blom@deltares.nl>
Co-authored-by: dladrichem <136334482+dladrichem@users.noreply.github.com>
Co-authored-by: Daley Adrichem <daley.adrichem@deltares.nl>
Co-authored-by: GundulaW <gundulawinter@gmail.com>
dumontgoulart added a commit that referenced this pull request Jul 11, 2024
* take most of the env creation script from frontend and put it in the … (#467)

* take most of the env creation script from frontend and put it in the backend

* move env_docs.yml to the docs dir

* update readme

* added temporary event name for plotting rainfall and river (#470)

* Move env creation to backend (#468)

* take most of the env creation script from frontend and put it in the backend

* move env_docs.yml to the docs dir

* update readme

* fix bug in env creation

* black

* pre-commit version and fiat adapter test not skipped anymore (#463)

* updated pre-commit version

* updated svn repo so this test can be run now

* return periods test is not skipped anymore with fiat_toolbox updates

* changed cht_observation to git repo install

* chore: close all loggers & handlers in database fixture setup and teardown

* fix: Output more info if incompatible river coordinates in SFINCS adapter and sitetoml

* add reset() to dbs_controller.py

* reset database in conftest.py

* black

* fix versions of formatting tools

---------

Co-authored-by: LuukBlom <luuk.blom@deltares.nl>
Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.com>

* Add self check to hazard run check (#471)

* Add self check to hazard run check

* Fix black

* Updates in site.toml to clear not-used attributes and update some vairables (#462)

* removed unused attributes from site toml

* small update in lint

* made observation points non mandatory

* changed site attribute obs_station to tide_gauge and removed unused attributes

* changed the flooding_threshold attribute to belong to a flood_frequency variable

* added default value for flood frequency flooding threshold

* when no river is present template discharge is used for now

* added source option to tide_gauge site attribute

* small correction in docstring

* changed slr.scenarios in site.toml and made them not mandatory

* offshore model and cyclone tracks not mandatory anymore

* small updates

* naming change

* make sure that the workflow does not break when there is nothing to plot

* todo on api for aggregation

* revert rename (#474)

* Fix logging and tests (#475)

* fix api output fixture and tests

* return -> yield in all fixtures

* return -> yield in all fixtures

* fix scenario.run() tests

* add logging class and implement in codebase

* bugfix logger contextmanager

* improve test logging

* fix bug in create_roads

* Add attribute check to adapter logger

* Config changes (#476)

* database path updates

* Update config getters to return Paths where needed

* Update lint.yml

* Update lint.yml

---------

Co-authored-by: GundulaW <gundulawinter@gmail.com>

* Split mandatory and optional metrics (#477)

---------

Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.com>
Co-authored-by: Panos Athanasiou <38324721+panosatha@users.noreply.github.com>
Co-authored-by: LuukBlom <luuk.blom@deltares.nl>
Co-authored-by: dladrichem <136334482+dladrichem@users.noreply.github.com>
Co-authored-by: Daley Adrichem <daley.adrichem@deltares.nl>
Co-authored-by: GundulaW <gundulawinter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

output deleted when running many files
2 participants