Skip to content

Commit

Permalink
v2.10.0 (#33)
Browse files Browse the repository at this point in the history
* yarn upgrade, docker builds

* docker build updates

* prepare v2.10.0, portal-core-components v2.10.0
  • Loading branch information
sampsonj authored Aug 1, 2024
1 parent 5046a59 commit 852bb5d
Show file tree
Hide file tree
Showing 33 changed files with 18,191 additions and 12,711 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.yarn

node_modules
build
templates

**/*/node_modules
**/*/build

.DS_Store
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
/node_modules
/.pnp
.pnp.js
/.yarn

# testing
/coverage
Expand Down
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
httpTimeout: 500000
nodeLinker: node-modules
11 changes: 11 additions & 0 deletions apps/data-availability/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.yarn

node_modules
build
templates

**/*/node_modules
**/*/build

.DS_Store
17 changes: 13 additions & 4 deletions apps/data-availability/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": [
"../../.eslintrc.json",
"airbnb",
"airbnb/hooks",
"airbnb-typescript",
"react-app",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:jsx-a11y/recommended"
],
"plugins": ["@typescript-eslint", "react", "jsx-a11y"],
Expand All @@ -23,8 +22,18 @@
"server.js"
],
"rules": {
"max-len": ["warn", 120],
"prefer-destructuring": "off",
"no-unreachable-loop": "off",
"no-restricted-syntax": "off",
"object-shorthand": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/space-infix-ops": "off",
"react/jsx-fragments": "off"
"@typescript-eslint/no-unused-vars": "off",
"react/jsx-fragments": "off",
"react/function-component-definition": "off",
"react/jsx-no-useless-fragment": "off",
"react/jsx-props-no-spreading": "off"
}
}
21 changes: 21 additions & 0 deletions apps/data-availability/build.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM portal-react-apps:latest-builder-base AS builder-base
FROM portal-react-apps/node:current

EXPOSE 3000
EXPOSE 3012

ARG YARN_VERSION

RUN corepack enable && corepack prepare yarn@${YARN_VERSION} --activate

WORKDIR /app

COPY --from=builder-base /app/node_modules /app/node_modules
COPY --from=builder-base /app/.yarn /app/.yarn
COPY --from=builder-base /app/.eslintrc.json /app/.eslintrc.json
COPY --from=builder-base /app/.yarnrc.yml /app/.yarnrc.yml
COPY --from=builder-base /app/package.json /app/package.json
COPY --from=builder-base /app/tsconfig.json /app/tsconfig.json
COPY --from=builder-base /app/yarn.lock /app/yarn.lock

COPY --from=builder-base /app/apps/data-availability /app/apps/data-availability
17 changes: 13 additions & 4 deletions apps/data-availability/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-availability",
"version": "2.9.2",
"version": "2.10.0",
"private": true,
"homepage": "https://localhost/visualizations/data-availability",
"dependencies": {
Expand All @@ -19,7 +19,7 @@
"core-js": "^3.37.1",
"lodash": "^4.17.21",
"moment": "^2.30.1",
"portal-core-components": "github:NEONScience/portal-core-components#v2.9.2",
"portal-core-components": "github:NEONScience/portal-core-components#v2.10.0",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -33,10 +33,12 @@
"typescript": "~4.9.5"
},
"devDependencies": {
"@typescript-eslint/parser": "~7.16.1",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"commander": "^12.1.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react-hooks": "^4.6.2",
"express": "^4.19.2",
"jsdom": "^24.1.1",
Expand All @@ -52,7 +54,14 @@
"eject": "react-scripts eject",
"build:sync-assets": "node ../../node_modules/portal-core-components/scripts/sync-assets.js --prettify-index --cwd-relative-public-dir-path=\"public\"",
"lint": "(npx eslint src/ --ext .js,.jsx,.ts,.tsx || true) && exit 0",
"lint:fix": "(npx eslint --fix src/ --ext .js,.jsx,.ts,.tsx || true) && exit 0"
"lint:fix": "(npx eslint --fix src/ --ext .js,.jsx,.ts,.tsx || true) && exit 0",
"checks": "npm run build:sync-assets && yarn run lint && yarn run build",
"checks:docker": "npm run build:docker-sync-assets && npm run lint:docker && npm run build:docker",
"start:docker": "docker run --rm --tty --interactive --workdir=/app/apps/data-availability --publish=3012:3012 portal-react-apps/data-availability:latest-builder-base yarn run start",
"start:docker-prod": "docker run --rm --tty --interactive --volume=/$(pwd)/build:/app/apps/data-availability/build --workdir=/app/apps/data-availability --publish=3000:3000 portal-react-apps/data-availability:latest-builder-base yarn run start:prod",
"build:docker": "docker run --rm --tty --interactive --volume=/$(pwd)/build:/app/apps/data-availability/build --workdir=/app/apps/data-availability portal-react-apps/data-availability:latest-builder-base yarn run build",
"lint:docker": "docker run --rm --tty --interactive --workdir=/app/apps/data-availability portal-react-apps/data-availability:latest-builder-base yarn run lint",
"build:docker-sync-assets": "docker run --rm --tty --interactive --volume=/$(pwd)/public:/app/apps/data-availability/public --workdir=/app/apps/data-availability portal-react-apps/data-availability:latest-builder-base npm run build:sync-assets"
},
"browserslist": {
"production": [
Expand Down
2 changes: 2 additions & 0 deletions apps/data-availability/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ const App: React.FC = (): JSX.Element => {
<Grid container className={classes.infoContainer}>
<Grid item xs={12} className={classes.introTextContainer}>
<Typography variant="subtitle1">
{/* eslint-disable */}
The availability chart and site map below show the combination of product, site, and month
where data are currently available, and distinguishes between provisional and release data
availability. Currently, the chart only captures {dataAvaLink} (i.e., is there a data record
Expand All @@ -321,6 +322,7 @@ const App: React.FC = (): JSX.Element => {
data included in that release are displayed. You must select "Latest and Provisional" to see
provisional data availability. See {dataRevReleaseLink} for more details about
the differences between these data.
{/* eslint-enable */}
</Typography>
</Grid>
<Grid item xs={12}>
Expand Down
2 changes: 1 addition & 1 deletion apps/data-availability/src/parsers/ProductParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const ProductParser = {
));
},

parseProductReleaseDoiRecord:(prdr: UnknownRecord): DataProductReleaseDoi => ({
parseProductReleaseDoiRecord: (prdr: UnknownRecord): DataProductReleaseDoi => ({
productCode: prdr.productCode as string,
release: prdr.release as string,
releaseGenerationDate: prdr.releaseGenerationDate as string,
Expand Down
11 changes: 11 additions & 0 deletions apps/data-product-detail/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.yarn

node_modules
build
templates

**/*/node_modules
**/*/build

.DS_Store
9 changes: 7 additions & 2 deletions apps/data-product-detail/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"extends": ["react-app", "airbnb", "plugin:jsx-a11y/recommended"],
"extends": [
"../../.eslintrc.json",
"airbnb",
"airbnb/hooks",
"plugin:jsx-a11y/recommended"
],
"plugins": ["react", "jsx-a11y"],
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": "latest",
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true
Expand Down
21 changes: 21 additions & 0 deletions apps/data-product-detail/build.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM portal-react-apps:latest-builder-base AS builder-base
FROM portal-react-apps/node:current

EXPOSE 3000
EXPOSE 3012

ARG YARN_VERSION

RUN corepack enable && corepack prepare yarn@${YARN_VERSION} --activate

WORKDIR /app

COPY --from=builder-base /app/node_modules /app/node_modules
COPY --from=builder-base /app/.yarn /app/.yarn
COPY --from=builder-base /app/.eslintrc.json /app/.eslintrc.json
COPY --from=builder-base /app/.yarnrc.yml /app/.yarnrc.yml
COPY --from=builder-base /app/package.json /app/package.json
COPY --from=builder-base /app/tsconfig.json /app/tsconfig.json
COPY --from=builder-base /app/yarn.lock /app/yarn.lock

COPY --from=builder-base /app/apps/data-product-detail /app/apps/data-product-detail
17 changes: 13 additions & 4 deletions apps/data-product-detail/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "portal-data-products",
"version": "2.9.2",
"version": "2.10.0",
"private": true,
"homepage": "http://localhost/data-products/",
"dependencies": {
Expand All @@ -15,7 +15,7 @@
"lodash": "^4.17.21",
"material-table": "^1.69.3",
"moment": "2.30.1",
"portal-core-components": "github:NEONScience/portal-core-components#v2.9.2",
"portal-core-components": "github:NEONScience/portal-core-components#v2.10.0",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-copy-to-clipboard": "^5.1.0",
Expand All @@ -31,11 +31,13 @@
"commander": "^12.1.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"express": "^4.19.2",
"jsdom": "^24.1.1",
"prettier": "^3.3.3",
"react-scripts": "^5.0.1",
"react-scripts": "5.0.1",
"worker-loader": "^3.0.8"
},
"scripts": {
Expand All @@ -46,7 +48,14 @@
"build:sync-assets": "node ../../node_modules/portal-core-components/scripts/sync-assets.js --prettify-index --cwd-relative-public-dir-path=\"public\"",
"lint": "(npx eslint src/ --ext .js,.jsx,.ts,.tsx || true) && exit 0",
"lint:fix": "(npx eslint --fix src/ --ext .js,.jsx,.ts,.tsx || true) && exit 0",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"checks": "npm run build:sync-assets && yarn run lint && yarn run build",
"checks:docker": "npm run build:docker-sync-assets && npm run lint:docker && npm run build:docker",
"start:docker": "docker run --rm --tty --interactive --workdir=/app/apps/data-product-detail --publish=3012:3012 portal-react-apps/data-product-detail:latest-builder-base yarn run start",
"start:docker-prod": "docker run --rm --tty --interactive --volume=/$(pwd)/build:/app/apps/data-product-detail/build --workdir=/app/apps/data-product-detail --publish=3000:3000 portal-react-apps/data-product-detail:latest-builder-base yarn run start:prod",
"build:docker": "docker run --rm --tty --interactive --volume=/$(pwd)/build:/app/apps/data-product-detail/build --workdir=/app/apps/data-product-detail portal-react-apps/data-product-detail:latest-builder-base yarn run build",
"lint:docker": "docker run --rm --tty --interactive --workdir=/app/apps/data-product-detail portal-react-apps/data-product-detail:latest-builder-base yarn run lint",
"build:docker-sync-assets": "docker run --rm --tty --interactive --volume=/$(pwd)/public:/app/apps/data-product-detail/public --workdir=/app/apps/data-product-detail portal-react-apps/data-product-detail:latest-builder-base npm run build:sync-assets"
},
"browserslist": {
"production": [
Expand Down
11 changes: 11 additions & 0 deletions apps/explore-data-products/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.yarn

node_modules
build
templates

**/*/node_modules
**/*/build

.DS_Store
11 changes: 8 additions & 3 deletions apps/explore-data-products/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"extends": ["react-app", "airbnb", "plugin:jsx-a11y/recommended"],
"plugins": ["jsx-a11y"],
"extends": [
"../../.eslintrc.json",
"airbnb",
"airbnb/hooks",
"plugin:jsx-a11y/recommended"
],
"plugins": ["react", "jsx-a11y"],
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": "latest",
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true
Expand Down
21 changes: 21 additions & 0 deletions apps/explore-data-products/build.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM portal-react-apps:latest-builder-base AS builder-base
FROM portal-react-apps/node:current

EXPOSE 3000
EXPOSE 3011

ARG YARN_VERSION

RUN corepack enable && corepack prepare yarn@${YARN_VERSION} --activate

WORKDIR /app

COPY --from=builder-base /app/node_modules /app/node_modules
COPY --from=builder-base /app/.yarn /app/.yarn
COPY --from=builder-base /app/.eslintrc.json /app/.eslintrc.json
COPY --from=builder-base /app/.yarnrc.yml /app/.yarnrc.yml
COPY --from=builder-base /app/package.json /app/package.json
COPY --from=builder-base /app/tsconfig.json /app/tsconfig.json
COPY --from=builder-base /app/yarn.lock /app/yarn.lock

COPY --from=builder-base /app/apps/explore-data-products /app/apps/explore-data-products
15 changes: 12 additions & 3 deletions apps/explore-data-products/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "explore-data-products",
"version": "2.9.2",
"version": "2.10.0",
"private": true,
"homepage": "https://localhost/data-products/explore",
"dependencies": {
Expand All @@ -14,7 +14,7 @@
"jspdf": "^2.5.1",
"lodash": "^4.17.21",
"moment": "2.30.1",
"portal-core-components": "github:NEONScience/portal-core-components#v2.9.2",
"portal-core-components": "github:NEONScience/portal-core-components#v2.10.0",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -25,6 +25,8 @@
"commander": "^12.1.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"express": "^4.19.2",
"jsdom": "^24.1.1",
Expand All @@ -42,7 +44,14 @@
"build:sync-assets": "node ../../node_modules/portal-core-components/scripts/sync-assets.js --prettify-index --cwd-relative-public-dir-path=\"public\"",
"lint": "(npx eslint src/ --ext .js,.jsx,.ts,.tsx || true) && exit 0",
"lint:fix": "(npx eslint --fix src/ --ext .js,.jsx,.ts,.tsx || true) && exit 0",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"checks": "npm run build:sync-assets && yarn run lint && yarn run build",
"checks:docker": "npm run build:docker-sync-assets && npm run lint:docker && npm run build:docker",
"start:docker": "docker run --rm --tty --interactive --workdir=/app/apps/explore-data-products --publish=3011:3011 portal-react-apps/explore-data-products:latest-builder-base yarn run start",
"start:docker-prod": "docker run --rm --tty --interactive --volume=/$(pwd)/build:/app/apps/explore-data-products/build --workdir=/app/apps/explore-data-products --publish=3000:3000 portal-react-apps/explore-data-products:latest-builder-base yarn run start:prod",
"build:docker": "docker run --rm --tty --interactive --volume=/$(pwd)/build:/app/apps/explore-data-products/build --workdir=/app/apps/explore-data-products portal-react-apps/explore-data-products:latest-builder-base yarn run build",
"lint:docker": "docker run --rm --tty --interactive --workdir=/app/apps/explore-data-products portal-react-apps/explore-data-products:latest-builder-base yarn run lint",
"build:docker-sync-assets": "docker run --rm --tty --interactive --volume=/$(pwd)/public:/app/apps/explore-data-products/public --workdir=/app/apps/explore-data-products portal-react-apps/explore-data-products:latest-builder-base npm run build:sync-assets"
},
"browserslist": {
"production": [
Expand Down
11 changes: 11 additions & 0 deletions apps/prototype-data/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.yarn

node_modules
build
templates

**/*/node_modules
**/*/build

.DS_Store
11 changes: 8 additions & 3 deletions apps/prototype-data/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"extends": ["react-app", "airbnb", "plugin:jsx-a11y/recommended"],
"plugins": ["jsx-a11y"],
"extends": [
"../../.eslintrc.json",
"airbnb",
"airbnb/hooks",
"plugin:jsx-a11y/recommended"
],
"plugins": ["react", "jsx-a11y"],
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": "latest",
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true
Expand Down
Loading

0 comments on commit 852bb5d

Please sign in to comment.