Skip to content

Commit

Permalink
Nx migration (#139)
Browse files Browse the repository at this point in the history
* Update to angular 13

* Update packages and theming

* More updates

* Fix lint error

* Update workflows yml

* Update workflows yaml

* Upgrade to Angular 14

* Update to Angular 15

* Upgrade to angular 15

* Update packages

* Update to standalone ngx-vega component

* Upgrade to Angular 17

* Fix linting

* Remove empty tests

* Fix opioid misspelling

* Fix issue in vis3

* Update some angular material components

* Upgrade all material components to current version

* Remove unneeded css

* Move website into root

* Add nx

* Remove access token

* Update workflows

* Switch netlify deploy action

* Update data processor scripts

* Change directory name
  • Loading branch information
edlu77 authored and bherr2 committed Jun 24, 2024
1 parent 863e482 commit 3036466
Show file tree
Hide file tree
Showing 255 changed files with 25,716 additions and 35,959 deletions.
File renamed without changes.
58 changes: 29 additions & 29 deletions website/.eslintrc.json → .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
// Eslint rules
"arrow-body-style": "error",
"curly": [
"error",
Expand Down Expand Up @@ -62,9 +61,6 @@
"no-whitespace-before-property": "error",
"prefer-object-spread": "warn",
"require-atomic-updates": "error",


// Disabled eslint rules superseded by @typescript-eslint rules or the TS compiler itself
"brace-style": "off",
"func-call-spacing": "off",
"indent": "off",
Expand All @@ -80,9 +76,6 @@
"quotes": "off",
"semi": "off",
"space-before-function-paren": "off",


// @typescript-eslint rules
"@typescript-eslint/array-type": "error",
"@typescript-eslint/ban-tslint-comment": "warn",
"@typescript-eslint/brace-style": [
Expand Down Expand Up @@ -125,19 +118,14 @@
"default": [
"static-field",
"static-method",

"public-decorated-field",
"public-instance-field",
"public-abstract-field",

"signature",

"protected-field",
"private-field",
"field",

"constructor",

"method"
],
"interfaces": [
Expand All @@ -152,36 +140,54 @@
"error",
{
"selector": "default",
"format": ["camelCase"]
"format": [
"camelCase"
]
},

{
"selector": "classProperty",
"modifiers": ["readonly"],
"format": ["camelCase", "UPPER_CASE"]
"modifiers": [
"readonly"
],
"format": [
"camelCase",
"UPPER_CASE"
]
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"modifiers": [
"private"
],
"format": [
"camelCase"
],
"leadingUnderscore": "allow"
},
{
"selector": "parameter",
"modifiers": ["unused"],
"format": ["camelCase"],
"modifiers": [
"unused"
],
"format": [
"camelCase"
],
"leadingUnderscore": "require"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
"format": [
"PascalCase"
]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"]
"format": [
"camelCase",
"UPPER_CASE"
]
}
],
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/no-explicit-any": [
"error",
{
Expand Down Expand Up @@ -237,18 +243,12 @@
],
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/type-annotation-spacing": "error",


// @angular-eslint rules
"@angular-eslint/no-queries-metadata-property": "error",
"@angular-eslint/prefer-on-push-component-change-detection": "warn",
"@angular-eslint/prefer-output-readonly": "warn",
"@angular-eslint/relative-url-prefix": "error",
"@angular-eslint/use-component-selector": "error",
"@angular-eslint/use-component-view-encapsulation": "error",


// Per repo @angular-eslint rules
"@angular-eslint/component-selector": [
"error",
{
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/build-previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci for website
- name: npm ci for a2agc
run: npm ci
working-directory: website
- run: npm run build -- --output-hashing=none --base-href=/
working-directory: website

- uses: jsmrcaga/action-netlify-deploy@master
- uses: netlify/actions/cli@master
with:
args: deploy --dir=dist/a2agc --filter=a2agc
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
install_command: false
build_command: false
build_directory: website/dist/a2agc
15 changes: 6 additions & 9 deletions .github/workflows/production-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci for website
- name: npm ci for a2agc
run: npm ci
working-directory: website
- run: npm run build -- --output-hashing=none --base-href=/
working-directory: website

- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/dist/a2agc
publish_dir: dist/a2agc
commit_message: "Production deploy -- ${{ github.event.head_commit.message }}"
14 changes: 6 additions & 8 deletions .github/workflows/staging-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,27 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci for website
- name: npm ci for a2agc
run: npm ci
working-directory: website
- run: npm run build -- --output-hashing=none --base-href=/
working-directory: website

- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/dist/a2agc
publish_dir: dist/a2agc
publish_branch: staging
commit_message: "Staging deploy -- ${{ github.event.head_commit.message }}"
13 changes: 4 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci for website
run: npm ci
working-directory: website
- run: npm run lint
working-directory: website
- run: npm run test
working-directory: website
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
projectBaseDir: website
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
59 changes: 55 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
.env
/.vscode
/raw-data
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
.nx/cache
container.sif
website/debug.log

# System Files
.DS_Store
Thumbs.db

# Generated assets
**/assets/generated
**/assets/schema

# Proxy Configuration
proxy.config.json
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"nrwl.angular-console",
"angular.ng-template",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner"
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
Loading

0 comments on commit 3036466

Please sign in to comment.