WikiWatershed / model-my-watershed

The web application front end for Model My Watershed.
https://modelmywatershed.org
Apache License 2.0
57 stars 31 forks source link

1.26.0 Deploy to Production #3206

Closed rajadain closed 4 years ago

rajadain commented 4 years ago
set maintenance_work_mem='2 GB';
CREATE EXTENSION pg_trgm;
CREATE INDEX CONCURRENTLY trgm_idx_boundary_huc08_name ON boundary_huc08 USING gin (name gin_trgm_ops);
CREATE INDEX CONCURRENTLY trgm_idx_boundary_huc10_name ON boundary_huc10 USING gin (name gin_trgm_ops);
CREATE INDEX CONCURRENTLY trgm_idx_boundary_huc12_name ON boundary_huc12 USING gin (name gin_trgm_ops);

SELECT
  t.tablename,
  indexname,
  c.reltuples AS num_rows,
  pg_size_pretty(pg_relation_size(quote_ident(t.tablename)::text)) AS table_size,
  pg_size_pretty(pg_relation_size(quote_ident(indexrelname)::text)) AS index_size,
  CASE WHEN indisunique THEN 'Y'
    ELSE 'N'
  END AS UNIQUE,
  idx_scan AS number_of_scans,
  idx_tup_read AS tuples_read,
  idx_tup_fetch AS tuples_fetched
FROM pg_tables t
  LEFT OUTER JOIN pg_class c ON t.tablename=c.relname
  LEFT OUTER JOIN
    ( SELECT c.relname AS ctablename, ipg.relname AS indexname, x.indnatts AS number_of_columns, idx_scan, idx_tup_read, idx_tup_fetch, indexrelname, indisunique FROM pg_index x
      JOIN pg_class c ON c.oid = x.indrelid
      JOIN pg_class ipg ON ipg.oid = x.indexrelid
      JOIN pg_stat_all_indexes psai ON x.indexrelid = psai.indexrelid )
    AS foo
  ON t.tablename = foo.ctablename
WHERE t.schemaname='public' AND indexname LIKE 'trgm_%'
ORDER BY 1,2;
   tablename    |          indexname           | num_rows | table_size | index_size | unique | number_of_scans | tuples_read | tuples_fetched
----------------+------------------------------+----------+------------+------------+--------+-----------------+-------------+----------------
 boundary_huc08 | trgm_idx_boundary_huc08_name |     2116 | 184 kB     | 240 kB     | N      |               0 |           0 |              0
 boundary_huc10 | trgm_idx_boundary_huc10_name |    15939 | 2296 kB    | 1144 kB    | N      |               0 |           0 |              0
 boundary_huc12 | trgm_idx_boundary_huc12_name |    86269 | 445 MB     | 6904 kB    | N      |               0 |           0 |              0
(3 rows)
DELETE
FROM core_job
WHERE uuid NOT IN (
    SELECT mapshed_job_uuid_id AS uuid
    FROM modeling_project
    WHERE mapshed_job_uuid_id IS NOT NULL
    UNION
    SELECT subbasin_mapshed_job_uuid_id AS uuid
    FROM modeling_project
    WHERE subbasin_mapshed_job_uuid_id IS NOT NULL
);
VACUUM (FREEZE, ANALYZE, VERBOSE);
rajadain commented 4 years ago

~Must include fix for #3209~ Fix is in #3218

rajadain commented 4 years ago

This is now ready to go. The version that's on staging, 29736b4, should be promoted to production.

rajadain commented 4 years ago

Tentative CHANGELOG:

This major release was deployed at HH:MM PM EST on January DD, 2020.

**New Features**:

* Watershed Multi-Year Worksheet: Add the ability for users to generate an Excel Worksheet containing Streams and Land analyses of the selected Area of Interest, as well as the Streams and Land analyses in addition to the GWLF-E Water Quality results for the HUC-12 the Area of Interest intersected with. This primarily serves the PA DEP workflow. For more details, see [the technical documentation](https://wikiwatershed.org/help/model-help/mmw-tech/#watershed-multi-year-worksheet).
  #3191 #3205 #3216 #3225
* Active River Area Analysis: Adds the total of Active River Areas to the Land analysis tab if the selected Area of Interest is within the North-East Mid-Atlantic region.
  #3200 #3218 #3220
* Ability to Override C- and P-Factors for Cropland in Watershed Multi-Year Model
  #3212

**Improvements**:

* Upgrade Basemap to a higher resolution, more modern one
  #3208
* Make Climate Analysis faster and more resilient by switching the implementation to Multi-Operation Geoprocessing
  #3221
* Make Watershed Mult-Year Model more accurate by tweaking some defaults
  #3210 #3224
* Make HUC Search faster
  #3207
* Make TR-55 Modifications List scrollable
  #3232 

**Infrastructure Upgrades**:

* Upgrade Node to 12 #3180
* Upgrade Pillow to 6.2.0 #3186
* Upgrade Front-end Dependencies #3187
rajadain commented 4 years ago

Added an extra point to this card, making it 2️⃣, to account for compiling the CHANGELOG.

rajadain commented 4 years ago

Release is now up: https://modelmywatershed.org/ Notes: https://github.com/WikiWatershed/model-my-watershed/releases/tag/1.26.0