diff --git a/.github/workflows/deploy_prod_to_s3.yml b/.github/workflows/deploy_prod_to_s3.yml
index 5a0d0f99..cc27f207 100644
--- a/.github/workflows/deploy_prod_to_s3.yml
+++ b/.github/workflows/deploy_prod_to_s3.yml
@@ -65,10 +65,10 @@ jobs:
echo "REACT_APP_SA_PERIODMAX=10" >> .env
echo "REACT_APP_SA_PERIODMIN=0" >> .env
echo "REACT_APP_SA_PERIODMAX_LOG=10" >> .env
- echo "REACT_APP_SA_PERIODMIN_LOG=0.01" >> .env
+ echo "REACT_APP_SA_PERIODMIN_LOG=0.03" >> .env
echo "REACT_APP_SA_GMAX=auto" >> .env
echo "REACT_APP_SA_GMIN=0" >> .env
- echo "REACT_APP_SA_LOG_PGA_SUBSTITUTE=0.02" >> .env
+ echo "REACT_APP_SA_LOG_PGA_SUBSTITUTE=0.04" >> .env
echo
echo "REACT_APP_MEAN=mean" >> .env
echo "REACT_APP_UPPER1=0.9" >> .env
diff --git a/.github/workflows/deploy_test_to_s3.yml b/.github/workflows/deploy_test_to_s3.yml
index b80187d3..38e44010 100644
--- a/.github/workflows/deploy_test_to_s3.yml
+++ b/.github/workflows/deploy_test_to_s3.yml
@@ -65,10 +65,10 @@ jobs:
echo "REACT_APP_SA_PERIODMAX=10" >> .env
echo "REACT_APP_SA_PERIODMIN=0" >> .env
echo "REACT_APP_SA_PERIODMAX_LOG=10" >> .env
- echo "REACT_APP_SA_PERIODMIN_LOG=0.01" >> .env
+ echo "REACT_APP_SA_PERIODMIN_LOG=0.03" >> .env
echo "REACT_APP_SA_GMAX=auto" >> .env
echo "REACT_APP_SA_GMIN=0" >> .env
- echo "REACT_APP_SA_LOG_PGA_SUBSTITUTE=0.02" >> .env
+ echo "REACT_APP_SA_LOG_PGA_SUBSTITUTE=0.04" >> .env
echo
echo "REACT_APP_MEAN=mean" >> .env
echo "REACT_APP_UPPER1=0.9" >> .env
diff --git a/.github/workflows/deploy_to_s3.yml b/.github/workflows/deploy_to_s3.yml
index 92d6199a..d79469a4 100644
--- a/.github/workflows/deploy_to_s3.yml
+++ b/.github/workflows/deploy_to_s3.yml
@@ -95,10 +95,10 @@ jobs:
echo "REACT_APP_SA_PERIODMAX=10" >> .env
echo "REACT_APP_SA_PERIODMIN=0" >> .env
echo "REACT_APP_SA_PERIODMAX_LOG=10" >> .env
- echo "REACT_APP_SA_PERIODMIN_LOG=0.01" >> .env
+ echo "REACT_APP_SA_PERIODMIN_LOG=0.03" >> .env
echo "REACT_APP_SA_GMAX=auto" >> .env
echo "REACT_APP_SA_GMIN=0" >> .env
- echo "REACT_APP_SA_LOG_PGA_SUBSTITUTE=0.02" >> .env
+ echo "REACT_APP_SA_LOG_PGA_SUBSTITUTE=0.04" >> .env
echo
echo "REACT_APP_MEAN=mean" >> .env
echo "REACT_APP_UPPER1=0.9" >> .env
diff --git a/cypress/e2e/HazardCurves.cy.ts b/cypress/e2e/HazardCurves.cy.ts
index 8e4c667f..6a818d8d 100644
--- a/cypress/e2e/HazardCurves.cy.ts
+++ b/cypress/e2e/HazardCurves.cy.ts
@@ -8,7 +8,7 @@ describe('Hazard Curves', () => {
});
it('Displays inital charts when first visiting page', () => {
- cy.get('[role="curve"]').should('have.length', 9);
+ cy.get('[role="curve"]').should('have.length', 10);
});
it('Displays out of range error when POE over 100 or below 0 is selected', () => {
@@ -40,8 +40,9 @@ describe('Hazard Curves', () => {
cy.get('li[data-value="SA(0.1)"]').click();
cy.get('li[data-value="SA(0.2)"]').click();
cy.get('li[data-value="SA(0.3)"]').click();
+ cy.get('body').click();
cy.get('[type="submit"]').click({ force: true });
- cy.get('[role="curve"]').should('have.length', 16);
+ cy.get('[role="curve"]').should('have.length', 20);
});
it('Displays tooltips for all selected spectral periods', () => {
@@ -56,8 +57,9 @@ describe('Hazard Curves', () => {
cy.get('li[data-value="SA(0.1)"]').click();
cy.get('li[data-value="SA(0.2)"]').click();
cy.get('li[data-value="SA(0.3)"]').click();
+ cy.get('body').click();
cy.get('[type="submit"]').click({ force: true });
- cy.get('[role="curve"]').should('have.length', 4);
+ cy.get('[role="curve"]').should('have.length', 5);
cy.get('[role="listbox"]').focus().type('{esc}');
});
@@ -65,7 +67,7 @@ describe('Hazard Curves', () => {
cy.get('[data-testid="ArrowDropDownIcon"]').first().click({ force: true });
cy.get('li').contains('Christchurch').click({ force: true });
cy.get('[type="submit"]').click({ force: true });
- cy.get('[role="curve"]').should('have.length', 8);
+ cy.get('[role="curve"]').should('have.length', 10);
cy.get('div[class="visx-legend-label"]').should('contain.text', '400m/s PGA Christchurch 400m/s PGA Wellington');
});
@@ -75,7 +77,7 @@ describe('Hazard Curves', () => {
cy.get('li').contains('Wellington').click({ force: true });
cy.get('[class="MuiInputBase-input MuiInput-input MuiInputBase-inputAdornedEnd css-1x51dt5-MuiInputBase-input-MuiInput-input"]').first().type('-42, 173');
cy.get('[type="submit"]').click({ force: true });
- cy.get('[role="curve"]').should('have.length', 4);
+ cy.get('[role="curve"]').should('have.length', 5);
cy.get('div[class="visx-legend-label"]').should('contain.text', '400m/s PGA -42.0, 173.0');
});
@@ -83,7 +85,7 @@ describe('Hazard Curves', () => {
cy.get('div').contains('400').click();
cy.get('li').contains('350').click();
cy.get('[type="submit"]').click({ force: true });
- cy.get('[role="curve"]').should('have.length', 4);
+ cy.get('[role="curve"]').should('have.length', 5);
cy.get('[role="listbox"]').focus().type('{esc}');
});
diff --git a/package.json b/package.json
index 9dddc557..6472d2ad 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,11 @@
{
"name": "kororaa",
- "version": "1.0.2",
+ "version": "1.0.3",
"private": true,
"dependencies": {
"@emotion/react": "^11.9.0",
"@emotion/styled": "^11.8.1",
- "@gns-science/toshi-nest": "^3.6.3",
+ "@gns-science/toshi-nest": "^3.6.5",
"@mui/icons-material": "^5.6.2",
"@mui/material": "^5.6.4",
"adblock-detect-react": "^1.1.0",
diff --git a/src/App.tsx b/src/App.tsx
index d6a4dc75..f41b011f 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -26,6 +26,8 @@ import ContactPage from './views/contact/ContactPage';
import AboutPage from './views/about/AboutPage';
import TechInfoPage from './views/techinfo/TechInfoPage';
import ChangelogPage from './views/changelog/ChangelogPage';
+import OtherDocumentsPage from './views/info/OtherDocumentsPage';
+import ModelComponentsPage from './views/info/ModelComponentsPage';
// The Home component needs to know how to access the Relay environment, and we
// need to specify a fallback in case it suspends:
@@ -67,6 +69,8 @@ function App(props: { environment?: Environment }) {
} />
} />
} />
+ } />
+ } />
} />
diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md
index 0ef93c09..a13dcc34 100644
--- a/src/CHANGELOG.md
+++ b/src/CHANGELOG.md
@@ -7,7 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
-## [1.0.2](https://github.com/GNS-Science/kororaa/compare/1.0.1...1.0.2)
+## [v1.0.3](https://github.com/GNS-Science/kororaa/compare/v1.0.2...v1.0.3)
+
+### Merged
+
+- removes changelog text from start of changelog page; adds new intro text; [`#285`](https://github.com/GNS-Science/kororaa/pull/285)
+- Fix/cypress tests [`#284`](https://github.com/GNS-Science/kororaa/pull/284)
+- feature/238_PGA_boxplot [`#281`](https://github.com/GNS-Science/kororaa/pull/281)
+- Feature/280 Model Components [`#282`](https://github.com/GNS-Science/kororaa/pull/282)
+- hazard chart automcomplete expands horizontally; [`#279`](https://github.com/GNS-Science/kororaa/pull/279)
+- Feature/277 Other Reports [`#278`](https://github.com/GNS-Science/kororaa/pull/278)
+- Deploy test [`#276`](https://github.com/GNS-Science/kororaa/pull/276)
+
+## [v1.0.2](https://github.com/GNS-Science/kororaa/compare/v1.0.1...v1.0.2) - 2022-10-26
### Merged
@@ -18,7 +30,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- update nest; add cov property to map component; adds tooltip to map; [`2b14a0d`](https://github.com/GNS-Science/kororaa/commit/2b14a0d7b50917fa8f3196b16dda2bcbb27e90f6)
-## [1.0.1](https://github.com/GNS-Science/kororaa/compare/v1.0.0...v1.0.1) - 2022-10-20
+## [v1.0.1](https://github.com/GNS-Science/kororaa/compare/v1.0.0...v1.0.1) - 2022-10-20
### Merged
diff --git a/src/components/common/NavBar.tsx b/src/components/common/NavBar.tsx
index f995d919..038dbbcc 100644
--- a/src/components/common/NavBar.tsx
+++ b/src/components/common/NavBar.tsx
@@ -174,7 +174,11 @@ const NavBar: React.FC = () => {
{ name: 'Coming Features', path: '/Previews' },
{
name: 'Resources',
- submenu: [{ name: 'Science reports', path: '/Resources/ScienceReports' }],
+ submenu: [
+ { name: 'Science reports', path: '/Resources/ScienceReports' },
+ { name: 'Other Documents', path: '/Resources/OtherDocuments' },
+ { name: 'Model Components', path: '/Resources/ModelComponents' },
+ ],
},
{
name: 'Help',
@@ -193,6 +197,8 @@ const NavBar: React.FC = () => {
{ name: 'Hazard Maps', path: '/HazardMaps' },
{ name: 'Coming Features', path: '/Previews' },
{ name: 'Science Reports', path: '/Resources/ScienceReports' },
+ { name: 'Other Documents', path: '/Resources/OtherDocuments' },
+ { name: 'Model Components', path: '/Resources/ModelComponents' },
{ name: 'About', path: '/About' },
{ name: 'Technical Info', path: '/TechInfo' },
{ name: 'Contacts', path: '/Contacts' },
diff --git a/src/services/spectralAccel/testCases/calculateSpectralAccelCurveTestCase.ts b/src/services/spectralAccel/testCases/calculateSpectralAccelCurveTestCase.ts
index de279786..b941c9f7 100644
--- a/src/services/spectralAccel/testCases/calculateSpectralAccelCurveTestCase.ts
+++ b/src/services/spectralAccel/testCases/calculateSpectralAccelCurveTestCase.ts
@@ -1,5 +1,7 @@
+import { SA_LOG_PGA_SUBSTITUTE } from '../../../utils/environmentVariables';
+
export const expected = [
- [0.001, 1.5840401423927233],
+ [SA_LOG_PGA_SUBSTITUTE, 1.5840401423927233],
[0.1, 2.8186969404092443],
[0.2, 3.6533775147057184],
[0.3, 3.7181320251892513],
diff --git a/src/views/changelog/ChangelogPage.tsx b/src/views/changelog/ChangelogPage.tsx
index 6a54bec5..ae94f639 100644
--- a/src/views/changelog/ChangelogPage.tsx
+++ b/src/views/changelog/ChangelogPage.tsx
@@ -18,13 +18,22 @@ const TitleContainer = styled('div')({
paddingBottom: '1rem',
});
+const markdownToRemove = `# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+Generated by [\`auto-changelog\`](https://github.com/CookPete/auto-changelog).`;
+
const ChangelogPage: React.FC = () => {
const [markdown, setMarkdown] = useState('');
useEffect(() => {
fetch(CHANGELOG)
.then((res) => res.text())
- .then((text) => setMarkdown(text.replace('# Changelog', '')));
+ .then((text) => setMarkdown(text.replace(markdownToRemove, '')));
}, []);
return (
@@ -36,6 +45,9 @@ const ChangelogPage: React.FC = () => {
Releases
+
+ This is a changelog for the NSHM webapp service. The changelog tracks updates only to the web interface and not to the model itself.
+
diff --git a/src/views/hazardCharts/HazardChartsControls.tsx b/src/views/hazardCharts/HazardChartsControls.tsx
index 5208a574..787fbdd9 100644
--- a/src/views/hazardCharts/HazardChartsControls.tsx
+++ b/src/views/hazardCharts/HazardChartsControls.tsx
@@ -120,7 +120,7 @@ const HazardChartsControls: React.FC = ({ state, disp
setInputValue(newInputValue);
}}
options={hazardPageOptions.locations.sort()}
- style={{ width: 230, marginLeft: 16 }}
+ style={{ minWidth: 240, maxWidth: 270, marginLeft: 16 }}
renderInput={(params) => (
diff --git a/src/views/info/ModelComponentsPage.tsx b/src/views/info/ModelComponentsPage.tsx
index 979fe445..053a9135 100644
--- a/src/views/info/ModelComponentsPage.tsx
+++ b/src/views/info/ModelComponentsPage.tsx
@@ -1,70 +1,43 @@
import React from 'react';
import { styled } from '@mui/material/styles';
import Grid from '@mui/material/Grid';
-import { Link } from 'react-router-dom';
-import { Paper, Typography } from '@mui/material';
+import { Typography } from '@mui/material';
const PageContainer = styled('div')({
- width: '100%',
- // display: 'flex',
- // flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
- padding: '4rem',
+ padding: '2rem',
+ marginBottom: '2rem',
});
-const InfoContainer = styled('div')({
- // display: 'flex',
- // flexDirection: 'column',
+const TitleContainer = styled('div')({
justifyContent: 'left',
textAlign: 'left',
width: '100%',
- // padding: '4rem',
+ paddingBottom: '1rem',
});
-interface InfoCardProps {
- title: string;
- text: string;
-}
-
-const ModelComponent: React.FC = ({ title, text }: InfoCardProps) => {
- return (
-
-
-
-
- {title}
-
-
- {text}
-
-
-
-
- );
-};
-
const ModelComponentsPage: React.FC = () => {
return (
-
-
-
-
- Resources ::
- Model Components
-
-
-
-
-
- Source Models
-
+
+
+
+
+
+
+ Model Components
+
+
+
+
+ Please contact us at nshm@gns.cri.nz for OpenQuake input files and instructions on how to run the NSHM.
+
+
+
-
-
- {/**/}
+
);
diff --git a/src/views/info/OtherDocumentsPage.tsx b/src/views/info/OtherDocumentsPage.tsx
new file mode 100644
index 00000000..1e5fdd14
--- /dev/null
+++ b/src/views/info/OtherDocumentsPage.tsx
@@ -0,0 +1,71 @@
+import React from 'react';
+import { styled } from '@mui/material/styles';
+import Grid from '@mui/material/Grid';
+import { Card, CardContent, Typography, Link, Button } from '@mui/material';
+
+const StyledCard = styled(Card)(() => ({
+ justifyContent: 'center',
+ alignItems: 'center',
+}));
+
+const PageContainer = styled('div')({
+ width: '100%',
+ justifyContent: 'center',
+ alignItems: 'center',
+ padding: '2rem',
+});
+
+const SectionContainer = styled('div')({
+ justifyContent: 'left',
+ textAlign: 'left',
+ width: '100%',
+ paddingTop: '2rem',
+ paddingBottom: '1rem',
+});
+
+const OtherDocumentsPage: React.FC = () => {
+ return (
+
+
+
+
+ Other Documents
+
+
+
+
+
+
+
+ NSHM Project Assurance Review
+
+
+
+ View report
+
+
+
+
+ Led by Hugh Cowan, the purpose of the Assurance and Lessons Review is to support the uptake of the new National Seismic Hazard Model into policy and practice, and to inform how
+ future iterations of the Model and its development may ensure best practice. It provides assurance to decision-makers that the processes followed for development of the revised
+ NSHM facilitated reasonable and legitimate scientific review, and led to best practice science and a rational consensus model.
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default OtherDocumentsPage;
diff --git a/yarn.lock b/yarn.lock
index 1f3478cb..b4f1f517 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1360,10 +1360,10 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@gns-science/toshi-nest@^3.6.3":
- version "3.6.3"
- resolved "https://npm.pkg.github.com/download/@GNS-Science/toshi-nest/3.6.3/052faf31684eeffba01e46813744cd65bd38191d#052faf31684eeffba01e46813744cd65bd38191d"
- integrity sha512-nVfqCJ8kvHAJuk69shr2GgNr1dsspN/4GkIT7mgHT+mpFnAqFF5ZuK6KodHaGXl6Ucz5Y2RcRozyGKD6rEdPWg==
+"@gns-science/toshi-nest@^3.6.5":
+ version "3.6.5"
+ resolved "https://npm.pkg.github.com/download/@GNS-Science/toshi-nest/3.6.5/5599f8727dbef2390969578f94a0fbc916bd6231#5599f8727dbef2390969578f94a0fbc916bd6231"
+ integrity sha512-oxoLMlg3XID+qDjNicetn0oIcWHyE7qERP8/04GmM89bAszIsvuCF90NomyxYeTUB7+K8lIOqZ2hmpu89Vw28g==
dependencies:
"@emotion/react" "^11.8.2"
"@emotion/styled" "^11.8.1"
@@ -1381,6 +1381,7 @@
"@visx/responsive" "^2.8.0"
"@visx/scale" "^2.2.2"
"@visx/shape" "^2.11.1"
+ "@visx/stats" "^2.10.0"
"@visx/threshold" "^2.11.1"
"@visx/tooltip" "^2.10.0"
"@visx/xychart" "^2.9.0"
@@ -2450,7 +2451,7 @@
dependencies:
"@types/d3-time" "^2"
-"@types/d3-shape@^1.3.1":
+"@types/d3-shape@^1.3.1", "@types/d3-shape@^1.3.2":
version "1.3.8"
resolved "https://registry.yarnpkg.com/@types/d3-shape/-/d3-shape-1.3.8.tgz#c3c15ec7436b4ce24e38de517586850f1fea8e89"
integrity sha512-gqfnMz6Fd5H6GOLYixOZP/xlrMtJms9BaS+6oWxTKHNqPGZ93BkWWupQSCYm6YHqx6h9wjRupuJb90bun6ZaYg==
@@ -3133,6 +3134,19 @@
lodash "^4.17.21"
prop-types "^15.5.10"
+"@visx/stats@^2.10.0":
+ version "2.10.0"
+ resolved "https://registry.yarnpkg.com/@visx/stats/-/stats-2.10.0.tgz#890272dbeb10467c98d6c2785bbc2216f60003eb"
+ integrity sha512-4p8rQamOc1IC3IkqTHgfMHbSXvRl9DMWFCglJy+DmbH6Wx1TaWt2nj/N0Ttp350UTRzBy4o5ou/D4Gts8LZHuA==
+ dependencies:
+ "@types/d3-shape" "^1.3.2"
+ "@types/react" "*"
+ "@visx/group" "2.10.0"
+ "@visx/scale" "2.2.2"
+ classnames "^2.3.1"
+ d3-shape "^1.2.0"
+ prop-types "^15.5.10"
+
"@visx/text@2.12.2":
version "2.12.2"
resolved "https://registry.yarnpkg.com/@visx/text/-/text-2.12.2.tgz#f4cd32424b1866d8a7f26bdc7cc8396727da06f0"