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

Added ability to add finv table to report #49

Merged
merged 9 commits into from
May 18, 2022

Conversation

BenMaxIBI
Copy link
Contributor

CanFlood

Changelog:

  • Added function to add panda dataframe into report as table
  • Added function to fetch finv csv as panda dataframe
  • Some spelling corrections

Test coverage for this change:

  • I have added API unit tests
  • I have added appropriate UI unit tests
  • I have not added tests

Additional Notes:

@BenMaxIBI BenMaxIBI changed the title Feature/inventory table Added ability to add finv table to report May 17, 2022
@BenMaxIBI BenMaxIBI requested a review from cefect May 17, 2022 11:08
@BenMaxIBI BenMaxIBI self-assigned this May 17, 2022
@BenMaxIBI BenMaxIBI added the enhancement New feature or request label May 17, 2022
@BenMaxIBI BenMaxIBI marked this pull request as ready for review May 17, 2022 11:10
cefect added 3 commits May 18, 2022 18:13
use MOdel's native finv import
replace layer generator with existing method
Copy link
Collaborator

@cefect cefect left a comment

Choose a reason for hiding this comment

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

looks good. I didn't expect you to use the native attribute table frame... but this is a nice solution. And having the table layer show up on the user's layer list is actually a nice feature (then they can export the data if they'd like)

@cefect cefect merged commit ab71f6e into model_report May 18, 2022
@cefect cefect deleted the feature/inventory-table branch June 26, 2022 10:14
cefect added a commit that referenced this pull request Jun 26, 2022
* Update results.ui

add report tab

* setup reporter

* expand wfDial for sequence

* upgrade workflow dialogs

* Update 06_tutorials.rst

fix some typos

* dialog tut1a setup

* reporter work

dialog is crashing now

* tut1 dialog finished

* reporter progress

* add picture layouts

* Update reporter.py

* switch to reporter (progress)

* reporter working

* Update Q.py

fix context

* Feature - Results - Added page numbers and page headers to each section during report creation (#39)

* feature: Added page numbers and page headers for each generated section

* bugfix: Fixed issues with template file

* Bugfix - Switched to using value of impact_units as axis label (#40)

* chore: Added PR template

* bugfix: Setting impact label to impact_units value

* feature: Changed page header text to use name from control file (#45)

* feature: Changed page header text to use name from control file & fixed comment on impact_name variable

* chore: Removed boiler plate from PR template

* bugfix: Added page number to cover page (#44)

* Added ability to add finv table to report (#49)

* chore: Fixed some comments; feature: Added new table method

* feature: Loading csv file and displaying as frame

* bugfix: Now limiting to 10 rows, styling changes and comments

* bugfix: Removed unnecessary flag

* bugfix: Swapped to using pandas dataframe for inventory table

* bugfix: Fixed issue with lost table features during export

* add label and notes

* Update dialog.py

use MOdel's native finv import

* Update reporter.py

replace layer generator with existing method

Co-authored-by: cefect <47092034+cefect@users.noreply.github.com>

* feature: Added Damage curves plot as new section (#53)

* chore: Comment corrections

* feature: Added framework of adding damage curve plot to report, TODO: Get curves fp from cf

* feature: Loading control file and using curves filepath for plot

* Update dialog.py

add some notes and rename some functions

Co-authored-by: Seth Bryant <bryant.seth@gmail.com>

* feature: Adding Event summary table underneath diagrams (#51)

* feature: Getting raw dataframe for r_ttl, formatting for table and table header under plot

* feature: Formatting impacts values, added underline to subheader, capitalised table headers

* changed to location indexing

Co-authored-by: Seth Bryant <bryant.seth@gmail.com>
Co-authored-by: Seth Bryant <cefect@gmail.com>

* crop finv summary

* add titles. code reusability.

* 54 add damage function library purge (#56)

* Update build.ui

add purge button

* add button and ftags

* move curve output function

* Update modcom.py

cleanup some whitespace and comments

* Update dialog.py

debug run fixes

* Update basic.py

add set_info

* Update build.ui

add tooltip

* Update modcom.py

fix some comments

* Update build.ui

fix tab order

Co-authored-by: Ben Maxwell <103564326+BenMaxIBI@users.noreply.github.com>
cefect added a commit that referenced this pull request Aug 18, 2022
* Renamed rst files

* dfunc tweaks and messaging

* curve fixes

* Create vmisc.py

* Update vmisc.py

* Update modcom.py

add set_scale to vfunc

* Update vcoms.py

improve tab writing

* wFlow tweaks

* wFlow tweaks

* Update scripts.py

* fix extrapolation error reporting

* add workflow retrival v2

* migrate to native rasterCalc

* update tests

* fix rasterCalc. implement some session passing

* Update rsamp.py

* working

* improve workflows

* upgrade rsamp_dtm to retrieve2

* Update scripts_retrieve.py

* Update Q.py

 add fieldcalculator

* add summary stuff

* fix handling of zero impact L1 moderls

* fix kwarg handling on rsamp

* Update scripts.py

* Update scripts_retrieve.py

add dtm file name

* Update rsamp.py

* add testing script

* Update modcom.py

improve type check error message

* Create test.txt

* Update basic.py

* Update 05_toolsets.rst

* Model report (#57)

* Update results.ui

add report tab

* setup reporter

* expand wfDial for sequence

* upgrade workflow dialogs

* Update 06_tutorials.rst

fix some typos

* dialog tut1a setup

* reporter work

dialog is crashing now

* tut1 dialog finished

* reporter progress

* add picture layouts

* Update reporter.py

* switch to reporter (progress)

* reporter working

* Update Q.py

fix context

* Feature - Results - Added page numbers and page headers to each section during report creation (#39)

* feature: Added page numbers and page headers for each generated section

* bugfix: Fixed issues with template file

* Bugfix - Switched to using value of impact_units as axis label (#40)

* chore: Added PR template

* bugfix: Setting impact label to impact_units value

* feature: Changed page header text to use name from control file (#45)

* feature: Changed page header text to use name from control file & fixed comment on impact_name variable

* chore: Removed boiler plate from PR template

* bugfix: Added page number to cover page (#44)

* Added ability to add finv table to report (#49)

* chore: Fixed some comments; feature: Added new table method

* feature: Loading csv file and displaying as frame

* bugfix: Now limiting to 10 rows, styling changes and comments

* bugfix: Removed unnecessary flag

* bugfix: Swapped to using pandas dataframe for inventory table

* bugfix: Fixed issue with lost table features during export

* add label and notes

* Update dialog.py

use MOdel's native finv import

* Update reporter.py

replace layer generator with existing method

Co-authored-by: cefect <47092034+cefect@users.noreply.github.com>

* feature: Added Damage curves plot as new section (#53)

* chore: Comment corrections

* feature: Added framework of adding damage curve plot to report, TODO: Get curves fp from cf

* feature: Loading control file and using curves filepath for plot

* Update dialog.py

add some notes and rename some functions

Co-authored-by: Seth Bryant <bryant.seth@gmail.com>

* feature: Adding Event summary table underneath diagrams (#51)

* feature: Getting raw dataframe for r_ttl, formatting for table and table header under plot

* feature: Formatting impacts values, added underline to subheader, capitalised table headers

* changed to location indexing

Co-authored-by: Seth Bryant <bryant.seth@gmail.com>
Co-authored-by: Seth Bryant <cefect@gmail.com>

* crop finv summary

* add titles. code reusability.

* 54 add damage function library purge (#56)

* Update build.ui

add purge button

* add button and ftags

* move curve output function

* Update modcom.py

cleanup some whitespace and comments

* Update dialog.py

debug run fixes

* Update basic.py

add set_info

* Update build.ui

add tooltip

* Update modcom.py

fix some comments

* Update build.ui

fix tab order

Co-authored-by: Ben Maxwell <103564326+BenMaxIBI@users.noreply.github.com>

* Pytest migrate (#58)

* start files

* test_01_build_scenario

* move _change_tab

* remove issues

* tutorial 2 tests

* Update dialog_vfunc.py

whitespace

* Update basic.py

add pars_dir

* Delete test.txt

* Pytest migrate2 (#59)

* Create .gitignore

* Update test_build.py

switch to ui clicks

* remove aux.xmls

* change tutorial data structure

* add inventory tests to tut2

* Update Q.py

add layers to project

* Update 06_tutorials.rst

tutorial 2 tweaks

* adding tests

* Update 06_tutorials.rst

* Update modcom.py

build_exp_finv: switch check

Update modcom.py

* Update test_build.py

* test curve purges

* allow test fixtures instead of always instancing

* Update conftest.py

use pytest-qgis

* add version test

* Update 06_tutorials.rst

add purge functions to tutorial 2 docs

* test_03 data

* test_04_build_hsamp

* Update test_t2.py

test_04_build_hsamp

* Update test_t2.py

evals integration

* test_05

* Update test_t2.py

dtm sampler

* Update build.ui

validate tab tweak

* Update test_t2.py

validation

* test_06_build_dtm

* test06 update

* test_07_build_valid

* Update modcom.py

improve some validation messaging

* update test data

* Update conftest.py

clean up

* test cleanups

* finish test_t2

Update test_t2.py

* Update conftest.py

* Update model.ui

* Update 06_tutorials.rst

tweaks

* Update test_t2.py

fix writing

* test_model01

* Create test_results.py

start

* test_model_02_r2

* Update test_model.py

comments

* move cf_fp fixture

* Update test_results.py

* Update test_t2.py

* 60 add tests and documentation for new pdf reporter (#62)

* add pdf report content

* Create readme.md

* Update readme.md

* chore: Added new tests for pdf reporter function, bugfix: Fix for null check for file path and returning report object for test

* Update test_results.py

clean up imports

* Added integration tests for plot risk and reporter functions;

* Update 06_tutorials.rst

minor grammar fix

* Update test_results.py

clean up imports

* rename readme

Co-authored-by: cefect <cefect@gmail.com>
Co-authored-by: Seth Bryant <bryant.seth@gmail.com>

* change official Q version to 3.22.8

* Update build.ui

update version

* Update requirements.txt

* 63 person testing of feature report creating (#66)

* fixed get_dFuncPlot

* res reporter test fixes

Update test_t2.py

clean up

Update test_t2.py

fix report testers

refactor res_02_reporter

fix res_02_reporter

* Update dialog.py

clean up

* Create CanFlood_report_res1_0805.pdf

* Create pytest.ini

* Update reporter.py

clean up build_html
add 'tag' to add_section
add some checks to add_map

* Update 06_tutorials.rst

add more text to pdf reporter

* clean up sphinx files

* 2022-08-05

Changed Report Automator to Section 5.3.5, since BCA is already Section 5.3.4. Also changed one line in 06_tutorial.rst to add added detail. Changed 3 images to better reflect the current version of CanFlood and clarity

* results reporter comboBox_rpt_vlay

add vlay constraint and improve messaging

* docs tutorial 2: add select finv note

Co-authored-by: cefect <cefect@gmail.com>

* update documentation

* Update README.md

cleanup merge fail

* Update README.md

Co-authored-by: Dhanyatha Harish <dhanyatha.harish@ibigroup.com>
Co-authored-by: Ben Maxwell <103564326+BenMaxIBI@users.noreply.github.com>
Co-authored-by: blairscriven <72718063+blairscriven@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants