Skip to content

Commit

Permalink
Merge branch 'main' into add/modeling
Browse files Browse the repository at this point in the history
  • Loading branch information
abkfenris committed Oct 25, 2022
2 parents 376ee4f + fa37297 commit b817b09
Show file tree
Hide file tree
Showing 40 changed files with 1,609 additions and 1,663 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.2.1

- name: Cache Docker image
uses: actions/cache@v3
Expand All @@ -28,14 +28,14 @@ jobs:
mariners-dashboard-image-
- name: "Login to Docker Hub"
uses: docker/login-action@v1.14.1
uses: docker/login-action@v2.1.0
continue-on-error: true
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker Image
uses: docker/build-push-action@v3.1.1
uses: docker/build-push-action@v3.2.0
with:
context: .
target: develop
Expand Down Expand Up @@ -75,6 +75,7 @@ jobs:
run: docker-compose run -e CI=true client yarn test-with-coverage

- name: Codacy Coverage Reporter
if: env.CODACY_PROJECT_TOKEN != null
uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
Expand Down Expand Up @@ -202,7 +203,7 @@ jobs:
key: mariners-dashboard-storybook-${{ github.sha }}

- name: Deploy Storybook to Github Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.3
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages
folder: /tmp/storybook-public/
Expand All @@ -222,7 +223,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.2.1

- name: Cache Docker layers
uses: actions/cache@v3
Expand All @@ -233,7 +234,7 @@ jobs:
mariners-dashboard-buildx-
- name: "Login to Docker Hub"
uses: docker/login-action@v1.14.1
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -243,7 +244,7 @@ jobs:
id: tagName

- name: Build and push Docker Image
uses: docker/build-push-action@v2.10.0
uses: docker/build-push-action@v3.2.0
with:
context: .
push: true
Expand Down Expand Up @@ -296,7 +297,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.2.1

- name: Cache Docker layers
uses: actions/cache@v3
Expand All @@ -307,17 +308,17 @@ jobs:
mariners-dashboard-buildx-
- name: "Login to Docker Hub"
uses: docker/login-action@v1.14.1
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Get tag name
id: tagName
run: echo "::set-output name=tag::$(git rev-parse --short HEAD)"
run: echo "tag=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build and push Docker Image
uses: docker/build-push-action@v2.10.0
uses: docker/build-push-action@v3.2.0
with:
context: .
push: true
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Additions:

Changes:

- Use Redux Toolkit.

Fixes:

## 0.10.5 - 03/22/2022
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=docker/dockerfile:1.2
FROM node:16.14.0-alpine@sha256:2c6c59cf4d34d4f937ddfcf33bab9d8bbad8658d1b9de7b97622566a52167f2b as develop
FROM node:19.0.0-alpine@sha256:88f6aa846169ea75341059f3104d6c5ebeac4be861a5adcf0489fccb55573ea7 as develop

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
Expand All @@ -20,7 +20,7 @@ ARG REACT_APP_ERDDAP_SERVICE

RUN yarn build

FROM nginx:1.21.6-alpine@sha256:5a0df7fb7c8c03e4158ae9974bfbd6a15da2bdfdeded4fb694367ec812325d31
FROM nginx:1.23.2-alpine@sha256:bffb4330be734e3268087e28ca51f6ae926f7d4406c7f5b5ab50c5e22570dc32

COPY --from=buildstep /usr/src/app/build /usr/share/nginx/html

Expand Down
9 changes: 9 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
projectId: "xhz4kt",
defaultCommandTimeout: 10000,
pageLoadTimeout: 10000,
e2e: {
baseUrl: "http://localhost:3000",
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
},
}
6 changes: 0 additions & 6 deletions cypress.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
79 changes: 39 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@
"private": true,
"homepage": "http://mariners.neracoos.org/",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.3.0",
"@fortawesome/free-solid-svg-icons": "^6.0.0",
"@fortawesome/react-fontawesome": "^0.1.18",
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.2.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@gulfofmaine/tsstac": "0.1.2",
"@sentry/react": "^6.18.1",
"@sentry/tracing": "^6.18.1",
"@reduxjs/toolkit": "^1.8.6",
"@sentry/react": "^7.16.0",
"@sentry/tracing": "^7.16.0",
"@turf/bbox-polygon": "6.5.0",
"@turf/boolean-contains": "6.5.0",
"@turf/helpers": "6.5.0",
"@types/highcharts": "^7.0.0",
"@types/history": "^5.0.0",
"@types/react-responsive": "8.0.5",
"bootstrap": "^5.1.3",
"bootstrap": "^5.2.2",
"convert-units": "2.3.4",
"highcharts": "^9",
"highcharts": "^10",
"jsurl2": "^2.1.0",
"moment": "2.29.2",
"moment-timezone": "0.5.34",
"ol": "^6.13.0",
"moment": "2.29.4",
"moment-timezone": "0.5.38",
"ol": "^7.1.0",
"prop-types": "^15.8.1",
"react": "16.14.0",
"react-app-polyfill": "^3.0.0",
"react-dom": "16.14.0",
"react-ga": "^3.3.0",
"react-jsx-highcharts": "^4.3.1",
"react-query": "^3.34.19",
"react-redux": "7.2.6",
"react-router-dom": "6.2.2",
"react-scripts": "^5.0.0",
"react-select": "^5.4.0",
"react-use": "^17.3.2",
"reactstrap": "9.0.1",
"redux": "4.1.2",
"redux-first-history": "^5.0.8",
"rlayers": "^1.3.1",
"sass": "^1.49.10"
"react-ga": "^3.3.1",
"react-jsx-highcharts": "^4.3.2",
"react-query": "^3.39.2",
"react-redux": "8.0.4",
"react-router-dom": "6.4.2",
"react-scripts": "^5.0.1",
"react-select": "^5.5.6",
"react-use": "^17.4.0",
"reactstrap": "9.1.4",
"redux-first-history": "^5.1.1",
"rlayers": "^1.4.4",
"sass": "^1.55.0"
},
"scripts": {
"start": "GENERATE_SOURCEMAP=false react-scripts start",
Expand All @@ -53,33 +53,32 @@
"build-storybook": "build-storybook -c .storybook -o storybook-public"
},
"devDependencies": {
"@storybook/addon-a11y": "^6.4.19",
"@storybook/addon-essentials": "^6.4.19",
"@storybook/addon-storyshots": "^6.4.19",
"@storybook/builder-webpack5": "^6.4.19",
"@storybook/manager-webpack5": "^6.4.19",
"@storybook/preset-create-react-app": "^4.1.0",
"@storybook/react": "^6.4.19",
"@types/enzyme": "3.10.11",
"@storybook/addon-a11y": "^6.5.13",
"@storybook/addon-essentials": "^6.5.13",
"@storybook/addon-storyshots": "^6.5.13",
"@storybook/builder-webpack5": "^6.5.13",
"@storybook/manager-webpack5": "^6.5.13",
"@storybook/preset-create-react-app": "^4.1.2",
"@storybook/react": "^6.5.13",
"@types/enzyme": "3.10.12",
"@types/enzyme-adapter-react-16": "1.0.6",
"@types/jest": "27.4.1",
"@types/node": "17.0.23",
"@types/react": "17.0.42",
"@types/react-dom": "17.0.14",
"@types/react-test-renderer": "17.0.1",
"@types/jest": "29.2.0",
"@types/node": "18.11.5",
"@types/react": "18.0.21",
"@types/react-dom": "18.0.6",
"@types/react-test-renderer": "18.0.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"jest-fetch-mock": "3.0.3",
"react-is": "^17.0.2",
"react-test-renderer": "16.14.0",
"redux-devtools-extension": "2.13.5",
"redux-devtools-extension": "2.13.9",
"redux-mock-store": "1.5.4",
"typescript": "^4.6.3",
"typescript": "^4.8.4",
"wait-on": "6.0.1",
"webpack": "5"
},
"optionalDependencies": {
"cypress": "9.5.3"
"cypress": "10.10.0"
},
"prettier": {
"semi": false,
Expand Down
4 changes: 0 additions & 4 deletions src/Features/StatefulMap/actionTypes.ts

This file was deleted.

24 changes: 0 additions & 24 deletions src/Features/StatefulMap/actions.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/Features/StatefulMap/hook.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { useSelector, useDispatch } from "react-redux"
import type { RView } from "rlayers/RMap"

import { StoreState } from "Shared/constants/store"
import { RootState } from "store"

import { setView } from "./actions"
import { setView } from "./slice"

/**
* Hook to handle returning and setting current view
*
* @returns current view and setter for view
*/
export const useStatefulView: () => [RView | undefined, (RView) => void] = () => {
const view = useSelector((state: StoreState) => state.mapState.view)
const view = useSelector((state: RootState) => state.mapState.view)
const dispatch = useDispatch()

const handleSetView = (view: RView) => {
Expand Down
2 changes: 1 addition & 1 deletion src/Features/StatefulMap/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { mapStateReducer } from "./reducer"
export { mapStateReducer } from "./slice"
export { useStatefulView } from "./hook"
15 changes: 0 additions & 15 deletions src/Features/StatefulMap/reducer.ts

This file was deleted.

17 changes: 17 additions & 0 deletions src/Features/StatefulMap/slice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { createSlice, PayloadAction } from "@reduxjs/toolkit"
import type { RView } from "rlayers/RMap"

import { initialStoreState } from "./types"

const mapSlice = createSlice({
name: "map-view",
initialState: initialStoreState,
reducers: {
setView(state, action: PayloadAction<RView>) {
state.view = action.payload
},
},
})

export const { setView } = mapSlice.actions
export const mapStateReducer = mapSlice.reducer
6 changes: 3 additions & 3 deletions src/Features/Units/UnitSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import { Button, ButtonGroup } from "reactstrap"
import { connect } from "react-redux"
import { bindActionCreators, Dispatch } from "redux"

import { StoreState } from "Shared/constants/store"
import { RootState } from "store"

import { unitSwitch } from "../actions"
import { unitSwitch } from "../slice"
import { UnitSystem } from "../types"

export interface ReduxProps {
system: UnitSystem
switchUnits: (system: UnitSystem) => void
}

const mapStateToProps = ({ unit }: StoreState): Pick<ReduxProps, "system"> => {
const mapStateToProps = ({ unit }: RootState): Pick<ReduxProps, "system"> => {
return {
system: unit.system,
}
Expand Down
5 changes: 0 additions & 5 deletions src/Features/Units/actionTypes.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/Features/Units/actions.spec.ts

This file was deleted.

Loading

0 comments on commit b817b09

Please sign in to comment.