Skip to content

Commit

Permalink
Merge branch 'main' into volume-agents
Browse files Browse the repository at this point in the history
  • Loading branch information
frasercl committed Dec 10, 2024
2 parents 4af3d98 + 5c6deca commit 932d634
Show file tree
Hide file tree
Showing 97 changed files with 10,953 additions and 16,555 deletions.
75 changes: 0 additions & 75 deletions .eslintrc.js

This file was deleted.

30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

name: Node.js CI
env:
NODE_VERSION: "16.x"
NODE_VERSION: "20.x"

on: [push]

Expand All @@ -12,9 +12,9 @@ jobs:
name: ✅ Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
Expand All @@ -23,9 +23,9 @@ jobs:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
Expand All @@ -34,9 +34,9 @@ jobs:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
Expand All @@ -47,8 +47,8 @@ jobs:
needs: [lint, typeCheck, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
Expand All @@ -58,18 +58,18 @@ jobs:
- name: Push to branch
uses: moodiest/push-to-branch-action@develop
env:
REPO: self
BRANCH: build
FOLDER: dev-build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: self
BRANCH: build
FOLDER: dev-build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-stable:
if: startsWith(github.ref, 'refs/tags/v')
needs: [lint, typeCheck, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
registry-url: https://registry.npmjs.org/
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v1
- uses: ArtiomTr/[email protected]
- uses: actions/checkout@v4
- name: "Install Node"
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: "Install Deps"
run: npm install
- name: "Test"
run: npx vitest --coverage.enabled true
- uses: davelosert/vitest-coverage-report-action@v2
with:
annotations: failed-tests
github_token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 5 additions & 3 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"hooks": {
"pre-commit": "lint-staged"
}
{
"hooks": {
"pre-commit": "lint-staged"
}
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,29 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v3.9.0](https://github.com/simularium/simularium-viewer/compare/v3.8.4...v3.9.0)

- Bounding box toggle in tweakpane [`#434`](https://github.com/simularium/simularium-viewer/pull/434)
- testbed file organization [`#429`](https://github.com/simularium/simularium-viewer/pull/429)
- fix test bed download button [`#427`](https://github.com/simularium/simularium-viewer/pull/427)
- remove pauseOn property [`#425`](https://github.com/simularium/simularium-viewer/pull/425)
- Caching: remove vis data workers [`#420`](https://github.com/simularium/simularium-viewer/pull/420)
- Caching: refactor, memory improvements, trimming [`#411`](https://github.com/simularium/simularium-viewer/pull/411)
- Bump webpack from 5.90.3 to 5.95.0 in /examples [`#418`](https://github.com/simularium/simularium-viewer/pull/418)
- Bump cookie and express in /examples [`#421`](https://github.com/simularium/simularium-viewer/pull/421)
- Bump webpack from 5.90.3 to 5.94.0 [`#408`](https://github.com/simularium/simularium-viewer/pull/408)
- update dependencies: typescript, three, jest [`#416`](https://github.com/simularium/simularium-viewer/pull/416)
- Bump express from 4.19.2 to 4.21.0 in /examples [`#414`](https://github.com/simularium/simularium-viewer/pull/414)
- remove unused references to colorchange interface [`#410`](https://github.com/simularium/simularium-viewer/pull/410)
- code cleanup: dragAndDrop and JSON caching code [`#409`](https://github.com/simularium/simularium-viewer/pull/409)
- npm won't install anything until I bump ts-jest [`19fa8f6`](https://github.com/simularium/simularium-viewer/commit/19fa8f6ffdb2ad56fbcee70649098ef54ada4476)
- more package wrangling to fix tests (where was lodash?!) [`efa53fc`](https://github.com/simularium/simularium-viewer/commit/efa53fcf64e770c38fb036b1d5561c62450c8284)
- bump rimraf too, since it was complaining [`bce9f7e`](https://github.com/simularium/simularium-viewer/commit/bce9f7edc9762c10e9c321709d1751e871bf12e7)

#### [v3.8.4](https://github.com/simularium/simularium-viewer/compare/v3.8.3...v3.8.4)

> 22 August 2024
- Feature/session colors [`#400`](https://github.com/simularium/simularium-viewer/pull/400)
- export AgentData type properly from /types and / simularium [`#401`](https://github.com/simularium/simularium-viewer/pull/401)
- Bump ws from 7.5.9 to 7.5.10 [`#399`](https://github.com/simularium/simularium-viewer/pull/399)
Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ class Viewer extends React.Component {
this.viewerRef = React.createRef();

this.state = {
highlightId: -1,
pauseOn: -1,
highlightId: -1,
particleTypeIds: [],
currentFrame: 0,
currentTime: 0,
Expand Down Expand Up @@ -109,16 +108,16 @@ This will run the example in `/examples/src/`, demonstrating the viewer's functi
## Quick Start
| script | comments |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| build | create ES module build |
| clean | remove generated artifacts |
| generateTypes | generate type declarations |
| lint | run eslint on `src` directory |
| transpileES | run babel on `src` directory; _do not_ transpile `import/export` statements for an ES module compatible build (used by bundlers for tree-shaking) |
| test | run `jest`; searches for any files matching the pattern "src/\*_/_.test.js" |
| typeCheck | run `tsc` in type-check only mode |
| start | runs an example app from `examples` for testing. Runs at `localhost:8080/public/`. Use `--localserver` to run backend locally. With no flags, this script will default to using the staging octopus server as backend |
| script | comments |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| build | create ES module build |
| clean | remove generated artifacts |
| generateTypes | generate type declarations |
| lint | run eslint on `src` directory |
| transpileES | run babel on `src` directory; _do not_ transpile `import/export` statements for an ES module compatible build (used by bundlers for tree-shaking) |
| test | run `vitest`; searches for any files matching the pattern "src/\*_/_.test.js" |
| typeCheck | run `tsc` in type-check only mode |
| start | runs an example app from `examples` for testing. Runs at `localhost:8080/public/`. Use `--localserver` to run backend locally. With no flags, this script will default to using the staging octopus server as backend |
---
Expand Down
5 changes: 4 additions & 1 deletion babel.config.js → babel.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ module.exports = {
"@babel/plugin-transform-runtime",
],
presets: [
"@babel/preset-env",
["@babel/preset-env", { modules: false }],
"@babel/preset-typescript",
"@babel/preset-react",
],
env: {
es: {
presets: [["@babel/preset-env", { modules: false }]],
},
test: {
presets: [["@babel/preset-env", { modules: "auto" }]],
},
},
};
90 changes: 90 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import react from "eslint-plugin-react";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["examples/webpack.dev.js", "**/.eslintrc.js", "**/babel.config.js"],
}, ...compat.extends("plugin:@typescript-eslint/recommended", "plugin:react/recommended"), {
plugins: {
"@typescript-eslint": typescriptEslint,
react,
},

languageOptions: {
globals: {
...globals.mocha,
...globals.browser,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
project: ["./tsconfig.json", "./src/visGeometry/workers/tsconfig.json"],
},
},

settings: {
react: {
version: "detect",
},
},

rules: {
"@typescript-eslint/no-empty-object-type": ["warn"],
"@typescript-eslint/no-unsafe-function-type": ["warn"],
"@typescript-eslint/no-wrapper-object-types": ["warn"],

"@typescript-eslint/naming-convention": ["warn", {
selector: "default",
format: ["camelCase", "PascalCase"],
}, {
selector: "variable",
format: ["camelCase", "UPPER_CASE", "PascalCase"],
}, {
selector: "property",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
}, {
selector: "typeLike",
format: ["PascalCase"],
}, {
selector: "interface",
format: ["PascalCase"],
}, {
selector: "enumMember",
format: ["UPPER_CASE"],
}, {
selector: "parameter",
format: ["camelCase"],
leadingUnderscore: "allow",
}],

"@typescript-eslint/indent": ["off"],
"@typescript-eslint/no-empty-function": ["warn"],
"@typescript-eslint/no-inferrable-types": ["warn"],
"@typescript-eslint/no-this-alias": ["warn"],
"prefer-const": ["warn"],
"prefer-spread": ["warn"],
"no-var": ["warn"],
"no-unused-vars": "off",

"@typescript-eslint/no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
}],
},
}];
Loading

0 comments on commit 932d634

Please sign in to comment.