Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* enable dropping of bcfishpass schema for upgrades * add renamed job and upgrade job * move csv load to /jobs * load data files in first workflow job so all subsequet jobs have latest * fix job name * load param and data csvs in same job * fix #302 * remove unneeded observations table, use observations mvw, presume observations are refreshed by jobs, add upstr salmon/steelhead observation counts to dams view * fix #487 * add missing file * simplify modelled crossing data flow/scripts * load modelled crossings from temp table on completion * note when to load existing modelled crossings * call pscis from prep job, remove pscis and gradient barriers from access makefile * update job names * add missing job * remove observation refresh from weekly load job so things function on initial setup * add wcrp table * use wcrp table for wcrp views, add test db build script, fix view creation order, further slim access model makefile * fix #493, fix #492 * add moved file * note how to upgrade * update missed file with wcrp table * another missed wcrp query * fix #479 * add optional cross-db model output comparison view * separate join from where * prelim fix #480 * use target spp in wcrp crossings summary, more fix #480 * shuffle/add job files to accomodate test script/db * remove old file, ignore dump files * fix #495 * add mechanism to force matching of cabd waterfalls to correct blkey * allow for force matching dams to blkey as well * add cabd-blkey xref file * update version * note updated waterfall source, tidy source list * remove changes file, see gh issues and milestones * rename wcrp table to wcrp_watersheds, add draft tracking tables * fix types, column names * remove temp desc * add draft barrier auto rank query/report * Auto rank integration - Created output table in db\bcfishpass\tables\wcrp.sql - Created 1 script per watershed to populate the output table * hold only rank info in rank table, add rank info to wcrp crossings view * Created auto_rank.py - Removed all individual watershed sql files - Replaced with 1 python script which runs the ranking and populates the output table with the ranked barriers for the specified wcrp * Update auto_rank.py Species variable for _wct columns in ELKR wcrp and _ch_cm_co_pk_sk columns in other wcrps * use database_url for connection * auto format with black * Auto rank integration (#517) * Auto rank integration - Created output table in db\bcfishpass\tables\wcrp.sql - Created 1 script per watershed to populate the output table * hold only rank info in rank table, add rank info to wcrp crossings view * Created auto_rank.py - Removed all individual watershed sql files - Replaced with 1 python script which runs the ranking and populates the output table with the ranked barriers for the specified wcrp * Update auto_rank.py Species variable for _wct columns in ELKR wcrp and _ch_cm_co_pk_sk columns in other wcrps * use database_url for connection * auto format with black --------- Co-authored-by: Simon Norris <[email protected]> * Update connection in auto_rank.py Modified to parse the DATABASE_URL environment variable to get connection info for psycopg2 connection formatting. * structure files to enable migrations going forward, use cached DRA * note how to dump a db with date/version tags * adjust db folder name as v0.5.0 has not yet been tagged * fix missed merge conflict * prevent collisions by removing redundant inserts * Update api functions (#523) * Update to wcrp_habitat_connectivity_status_vw View now includes unique case for upstream and downstream of Elko Dam * Update barrier severity calculation - [# of assessed structures where barrier_status IN (BARRIER, POTENTIAL) + ((failure rate)*(# of unassessed structures))/(total # of structures)] - Failure rate = # of assessed structures that are barrier or potential/ total # of assessed structures E.g.,: 44 assessed crossings (23 are potential or barriers) = failure rate of 52% 193 unassessed crossings 237 total crossings Severity = (23 + 0.52(193))/237 = 123.36/237 -> (round to nearest “barrier”) ->123/237 = 51.9% * Changes to wcrp_barrier_count Update so that only barriers on accessible streams and habitat for target species are included for each watershed. Fourth entry option 'OVERVIEW' for the model_status parameter, which would call and return results for all three of the other options combined (i.e., would return counts of barriers for ALL, ACCESSIBLE, and HABITAT in the same return) * fix #518 (#524) * Issue527 (#528) * move wcrp crossings view def to separate file, prune fields that are included in the view, add fptwg prefix to their view * further consolidate wcrp relations, calculate wcrp upstream habitat for all crossings (not just barriers) * update wcrp crossings view to report on upstream barriers having spawn/rear habitat for wcrp target spp upstream, fixes #527 * add basic qa views of barriers with observations upstr, plus prelim draft detailed report of observations with barriers downstream * note concern in crossings load * remove all user falls other than Bonnington (historic), falls are covered by CABD * restore header * remove data from cabd dam exclusions file * restore empty file for now * move wcrp auto rank report to /jobs and clean git conflict * bump db folder tag * move barrier/observation qa report to reports * replace postgisftw functions for easier upgrade * remove upgrade script --------- Co-authored-by: andrewp-CWF <[email protected]> Co-authored-by: andrewp-CWF <[email protected]>
- Loading branch information