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

Use FIAT columns interface for columns calls #75

Open
2 tasks
panosatha opened this issue Jan 29, 2025 · 0 comments
Open
2 tasks

Use FIAT columns interface for columns calls #75

panosatha opened this issue Jan 29, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@panosatha
Copy link
Contributor

Kind of request

Changing existing functionality

Enhancement Description

Write now the name of the FIAT output columns is hard coded at each code line. We should use an interface class instead. Something like this has already been implemented in fiat_toolbox but only for the footprints module:

class Fiat:
"""
Object with mapping of FIAT attributes to columns names
"""
object_id = "Object ID"
primary_object_type = "Primary Object Type"
max_potential_damage = "Max Potential Damage: "
aggregation_label = "Aggregation Label: "
inundation_depth = "Inundation Depth"
damage = "Damage: "
total_damage = "Total Damage"
risk_ead = "Risk (EAD)"

A similar class (but more complete) should be placed somewhere in a higher level so all the modules can use it. The class could be more like the one implemented in FloodAdapt:
https://github.com/Deltares-research/FloodAdapt/blob/e00b358905a891b7d0bc7d5526b50872fbf26726/flood_adapt/adapter/fiat_adapter.py#L43

Task list

  • update interface class and put at higher level for import from each module
  • update modules so they use that class when calling FIAT columns

Use case

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants