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

Refactor of the save/edit/delete enz. functions for all tabs #367

Conversation

dladrichem
Copy link
Contributor

No description provided.

@dladrichem dladrichem linked an issue Feb 28, 2024 that may be closed by this pull request
2 tasks
@dladrichem dladrichem force-pushed the 283-objects-used-in-a-scenario-that-has-been-run-should-not-be-editable branch from 2dca586 to e1ddf35 Compare April 4, 2024 08:09
@dladrichem dladrichem marked this pull request as ready for review April 5, 2024 09:30
@dladrichem dladrichem changed the title 283 objects used in a scenario that has been run should not be editable Refactor of the save/edit/delete enz. functions for all tabs Apr 5, 2024
flood_adapt/object_model/interface/events.py Outdated Show resolved Hide resolved
flood_adapt/dbs_classes/dbs_template.py Show resolved Hide resolved
flood_adapt/dbs_classes/dbs_template.py Outdated Show resolved Hide resolved
flood_adapt/dbs_classes/dbs_benefit.py Outdated Show resolved Hide resolved
flood_adapt/dbs_classes/dbs_template.py Outdated Show resolved Hide resolved
)

# Check if object is used in a higher level object. If it is, raise an error
if used_in := self._check_higher_level_usage(name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool way to do if statements, had to look it up to see if it wasnt a typo, but nice one

@dladrichem dladrichem merged commit 5dca547 into main Apr 9, 2024
4 checks passed
@dladrichem dladrichem deleted the 283-objects-used-in-a-scenario-that-has-been-run-should-not-be-editable branch April 9, 2024 12:29
dumontgoulart added a commit that referenced this pull request May 15, 2024
* Fix publisher

* Refactor of the save/edit/delete enz. functions for all tabs (#367)

* Fix dbs classes

* Fix rebase issues

* Add lock_count and start unit testing

* Add tests

* Temp fixes

* Add test template

* Add unit tests

* Fixed deleting function

* Fix scenarios in dbs controller

* Remove tests for other branch

* Fix scenario logging

* Fix ruff and black

* Fix spellcheck

* Fix comments and remove locking

* Make check_higher_level_usage function public

* Add rerunning validators

* Remove lock count (#415)

* Added a section on socio-economic projections (#416)

* Added a section on socio-economic projections

* Added a section on socio-economic projections

* fixed a typo in the index.qmd so the spell test passes

* Add validators (#417)

* Add validators

* Fix black

* Fix escaped backslash

* Fix errorhandling historic events

* Fix errorhandling historic events nad fix black

* Setup wiki docs

* changed how the Hazard object is initialized to avoid creating the different event object in risk run before the scenario is run (#391)

* Docs measures building level (#426)

* Added content on building-level measures and modified the main landing page for the measures

* entered content for building-level measures and edited the index file for the measures. also fixed a typo

* fix error on startup of event popup window

* Update docs.yml (#428)

* using z-value in floodwall from shp file  (#427)

* using z-value in floodwall from shp file and convertin MultiLineString to LineString

* black

* addressing review comments

* address review comment: convert also z-values from shape file

* fixed unit conversion

* black

* include logging statement when height from shape file cannot be read

* black

* include positive logging info when height from shape is used

* update raise by for datum ref tests (#431)

* Update pyproject.toml (#434)

* Update pyproject.toml

* fix ,

* Fix/docs landing page (#437)

* fix landing page

* Fix merge conflict

* Fix typo

* Test youtube video (#438)

---------

Co-authored-by: Daley Adrichem <Daley.Adrichem@deltares.nl>
Co-authored-by: dladrichem <136334482+dladrichem@users.noreply.github.com>
Co-authored-by: kathrynroscoe <79269966+kathrynroscoe@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: Santonia27 <145111392+Santonia27@users.noreply.github.com>
Co-authored-by: GundulaW <74292006+GundulaW@users.noreply.github.com>
Co-authored-by: LuukBlom <153174893+LuukBlom@users.noreply.github.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.

objects used in a scenario that has been run should not be editable
2 participants