Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Implement end-to-end testing with Playwright #420

Merged
merged 45 commits into from
Oct 10, 2024

Conversation

gwhitney
Copy link
Collaborator

@gwhitney gwhitney commented Aug 28, 2024

This is an in-progress cleaned version of the final PR (#361) of
the Delft student user interface project, which it supersedes.

Comments from the original PR that remain relevant:

  • The end-to-end tests run using Firefox and Chromium.
  • New tests are in the e2e folder.
  • The tests often depend on specific classes and IDs, so they may need to be updated upon changes to Numberscope.
  • The tests can be executed as the following npm script: npm run test:e2e
  • An interactive testing UI and debugger can be executed as the following npm script: npm run test:e2e:ui [but note that these tests run on your local machine natively, rather than in Docker, and so some image comparison tests will fail that will succeed when run non-interactively].

Caveats concerning trying this cleaned PR and its status:

  • Make certain to run npm install after pulling this PR.
  • Many of the tests do not yet pass, perhaps because of the "specific classes and IDs" point mentioned above and the fact that ui2 has diverged significantly from the Delft PR series.
  • Tests are not yet run automatically prior to commit.
  • I do not think there are any image tests yet, we need to try to add them.
  • Tests are not yet performed in the continuous integration checks to be run on GitHub; they should be.

In addition, this PR corrects a number of accumulated issues and issues that were surfaced as a result of implementing the testing. Namely:

Resolves #25.
Resolves #54.
Resolves #73.
Resolves #174.
Resolves #217.
Resolves #219.
Resolves #225.
Resolves #226.
Resolves #246.
Resolves #292.
Resolves #294.
Resolves #311.
Resolves #419.
Resolves #458.

  • Extends lint checks to include as many files as possible (necessitating, for example, some reformatting in otherwise uninvolved files, such as .github/pull-request-template.md).
  • Switches to only generating random numbers with mathjs, for which the seed can be controlled (needed to make testing deterministic). Also adds a seed parameter to numberscope URLs.
  • Replaced all calls to p5 functions noLoop() and loop() methods with visualizer stop() and continue() methods, and documented the need to do this (necessary to ensure that the play/pause control is updated properly, as the testing watches this control to know when the visualization is done and so it is safe to take a snapshot).
  • Added URL parameters and an argument to the visualizer stop() method to control the number of frames that a visualizer will run (again, needed to make the images produced by a visualizer deterministic).
  • Switches syntax for font/asset file inclusion so that both the hot-reload preview and the build bundler can find the proper asset files.
  • Uniformizes all sequences to have consistent first, last, and number of terms parameters, implemented in the base Cached class. These parameters are not independent, as number of terms = last - first + 1, so when any of them is changed by the visitor, one other changes automatically to keep them consistent. This way the visitor can control the aspect of the sequence extent that is most salient to them, and do it in a similar way regardless of what sequence is being used.
  • Eliminates the SequenceDefault class in favor of making Cached the base class of all sequences, to support the uniformity noted in the prior point.
  • Removes all parameters from visualizers that are redundant with the new sequence extent controls described just above.
  • Switches sequence indexes to bigints from number, as testing revealed that some OEIS sequences have indices too large to fit into number.
  • Takes care not to execute two different cache requests to the backend for the same OEIS sequence at the same time; this change made e2e tests more reliable.
  • Adds an ExtendedBigint type that adjoins ±∞ to bigint to handle sequences with a first index but no last index.
  • Adds a "divides" function to our math module, as that functionality was being used in multiple places, as well as bigmax and bigmin to help with the new bigint indices.
  • In updating the Factor Histogram visualizer, removed the ambiguity between numbers that have no factors because they are 0 or ±1, and those that have no factors because their factorization is unknown, by hatching the latter. The hatching requires a p5 plugin that uses WebGL rendering. So this PR adds support for that mode of p5. Note this mode automatically supports zoom and pan via mouse, and could be used to provide such functionality automatically for all visualizers, as well as handle resize without the visualizer having to restart. These latter enhancements are not pursued in this PR.
  • Stops attempting to use generic types to get narrow TypeScript typing within the Paramable hierarchy (as it wasn't working anyway), instead imposing it just on the final Sequence and Visualizer classes through class factory functions. Significantly simplifies the TypeScript-induced complexity of the Paramable code.
  • Switched to using make for building the app and testing it, to avoid expensive steps like generating a Docker image and so on from being re-run when they don't need to be.
  • Reorganizes the code to have as many configuration files in the etc/ directory as possible.
  • That reorganization necessitates updating to eslint 9, which would not work with prettier-eslint. Hence, this PR eliminates the use of prettier-eslint in favor of a simple custom tool (namely tools/prettiest.js) that runs prettier and then eslint.
  • That update causes significantly stricter lint checks on vue files, so they have numerous minor reformattings.
  • Adds a doc page on the overall code organization, including the new changes; condenses code-principles.md and code-style.md into a single page, as they were both pretty small anyway and contained similar information.
  • Moves the opening part of the User Guide documentation into Scope.vue, that implements the top-level user interface, to support keeping the interface and documentation consistent.
  • Document site generation now fails if it produces any warnings, to make sure that the doc generation is occurring smoothly.
  • Removes env.d.ts, as it did not seem to be used anywhere.
  • Refuses to make a commit if there are unstaged changes or untracked files (as those confuse/defeat the lint-check pre-commit tests).

By submitting this PR, I am indicating to the Numberscope maintainers that I have read and understood the contributing guidelines and that this PR follows those guidelines to the best of my knowledge. I have also read the pull request checklist and followed the instructions therein.

  This is an in-progress cleaned version of the final PR (numberscope#361) of
  the Delft student user interface project, which it supersedes.

  Comments from the original PR that remain relevant:
  * The end-to-end tests run using Firefox and Chromium.
  * New tests are in the e2e folder.
  * The tests often depend on specific classes and IDs, so they may
    need to be updated upon changes to Numberscope.
  * The tests can be executed as the following npm script:
    `npm run test:e2e`
  * An interactive testing UI and debugger can be executed as the
    following npm script: `npm run test:e2e:ui`

  Caveats concerning trying this cleaned PR and its status:
  * Make certain to run `npm install` after pulling this PR.
  * Many of the tests do not yet pass, perhaps because of the "specific
    classes and IDs" point mentioned above and the fact that ui2 has
    diverged significantly from the Delft PR series.
  * Tests are not yet run automatically prior to commit.
  * I do not think there are any image tests yet, we need to try to add
    them.
  * Tests are not yet performed in the continuous integration checks
    to be run on GitHub; they should be.
@gwhitney gwhitney marked this pull request as draft August 28, 2024 03:01
@gwhitney
Copy link
Collaborator Author

Wow, the testing is actually doing what it is supposed to! It uncovered #419 as part of its testing. That is to say, the first test I looked at was simply stale with respect to our diverged code. But the second test was operating exactly as designed, and it detected that the caption on the default speciment (modfill with random) is not correct if it is saved and then the gallery is viewed. So I will have to fix #419 in this PR to get it to a point in which it can be merged.

This experience makes me very positive on this PR, and makes me feel that after this PR, every PR should be required to update testing: if it is a bugfix PR, it should include a test that would fail with the bug, and passes with the PR. And if it is a feature PR, it should include either unit or end-to-end tests of the feature, preferably both. Anyhow, I will continue by investigating #419 as soon as I have a chance.

@gwhitney
Copy link
Collaborator Author

OK, I have resolved #419 in this branch, and now all of the end-to-end tests that the Delft team implemented are passing! As you can see from the above lists, there is still a lot to do before this PR is ready to merge, but @katestange @Vectornaut I would be happy for some initial review: code review, does pulling and npm installing this branch work, does npm run test:e2e work and do all tests pass? Whenever you have a chance; I will be working on this PR for some time yet -- could be 1-2 weeks even.

@katestange
Copy link
Member

Currently, npm install produces the following output:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@playwright/[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@playwright/[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@playwright/[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@vitejs/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.0.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@vue/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.18.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18.12.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>= 18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18.0.0', npm: '>=8.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^18.0.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^18.0.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^18.0.0 || >=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }

> [email protected] postinstall
> python3 -m venv .venv && cd tools && node pyrun.mjs python -m pip install -U pip && node pyrun.mjs pip install -r requirements.txt

Requirement already satisfied: pip in ./.venv/lib/python3.10/site-packages (24.1.2)
Collecting pip
  Downloading pip-24.2-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-24.2-py3-none-any.whl (1.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 3.2 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.1.2
    Uninstalling pip-24.1.2:
      Successfully uninstalled pip-24.1.2
Successfully installed pip-24.2
Requirement already satisfied: mkdocs~=1.6 in ./.venv/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (1.6.0)
Requirement already satisfied: mkdocs-semiliterate~=0.7 in ./.venv/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (0.7.0)
Requirement already satisfied: mkdocs-awesome-pages-plugin~=2.8 in ./.venv/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (2.9.2)
Requirement already satisfied: pymdown-extensions~=10.8 in ./.venv/lib/python3.10/site-packages (from -r requirements.txt (line 4)) (10.8.1)
Requirement already satisfied: python-markdown-math~=0.8 in ./.venv/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (0.8)
Requirement already satisfied: click>=7.0 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (8.1.7)
Requirement already satisfied: ghp-import>=1.0 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (2.1.0)
Requirement already satisfied: jinja2>=2.11.1 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (3.1.4)
Requirement already satisfied: markdown>=3.3.6 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (3.6)
Requirement already satisfied: markupsafe>=2.0.1 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (2.1.5)
Requirement already satisfied: mergedeep>=1.3.4 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (1.3.4)
Requirement already satisfied: mkdocs-get-deps>=0.2.0 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (0.2.0)
Requirement already satisfied: packaging>=20.5 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (24.1)
Requirement already satisfied: pathspec>=0.11.1 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (0.12.1)
Requirement already satisfied: pyyaml-env-tag>=0.1 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (0.1)
Requirement already satisfied: pyyaml>=5.1 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (6.0.1)
Requirement already satisfied: watchdog>=2.0 in ./.venv/lib/python3.10/site-packages (from mkdocs~=1.6->-r requirements.txt (line 1)) (4.0.1)
Requirement already satisfied: mkdocs-simple-plugin==2.1.2 in ./.venv/lib/python3.10/site-packages (from mkdocs-semiliterate~=0.7->-r requirements.txt (line 2)) (2.1.2)
Requirement already satisfied: natsort>=8.1.0 in ./.venv/lib/python3.10/site-packages (from mkdocs-awesome-pages-plugin~=2.8->-r requirements.txt (line 3)) (8.4.0)
Requirement already satisfied: wcmatch>=7 in ./.venv/lib/python3.10/site-packages (from mkdocs-awesome-pages-plugin~=2.8->-r requirements.txt (line 3)) (8.5.2)
Requirement already satisfied: python-dateutil>=2.8.1 in ./.venv/lib/python3.10/site-packages (from ghp-import>=1.0->mkdocs~=1.6->-r requirements.txt (line 1)) (2.9.0.post0)
Requirement already satisfied: platformdirs>=2.2.0 in ./.venv/lib/python3.10/site-packages (from mkdocs-get-deps>=0.2.0->mkdocs~=1.6->-r requirements.txt (line 1)) (4.2.2)
Requirement already satisfied: bracex>=2.1.1 in ./.venv/lib/python3.10/site-packages (from wcmatch>=7->mkdocs-awesome-pages-plugin~=2.8->-r requirements.txt (line 3)) (2.4)
Requirement already satisfied: six>=1.5 in ./.venv/lib/python3.10/site-packages (from python-dateutil>=2.8.1->ghp-import>=1.0->mkdocs~=1.6->-r requirements.txt (line 1)) (1.16.0)

> [email protected] prepare
> husky


added 5 packages, and audited 552 packages in 1m

150 packages are looking for funding
  run `npm fund` for details

6 vulnerabilities (4 moderate, 2 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

and npm run test:e2e results in:


> [email protected] test:e2e
> playwright test
[WebServer] The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
[WebServer] 
/src/assets/fonts/inter/Inter-VariableFont_slnt\,wght.ttf referenced in /home/katestange/data/projects/numberscope/frontscope-backscope/frontscope/src/App.vue?vue&type=style&index=0&lang.css didn't resolve at build time, it will remain unchanged to be resolved at runtime
[WebServer] 
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
[WebServer] INFO    -  mkdocs-simple-plugin: build_docs_dir: /tmp/mkdocs_simple_frontscopejan9epe9
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/CONTRIBUTING.md
[WebServer] INFO    -  mkdocs-simple-plugin: mkdocs.yml --> /tmp/mkdocs_simple_frontscopejan9epe9/mkdocs.yml
[WebServer] INFO    -  mkdocs-simple-plugin: mkdocs-workbench.yml --> /tmp/mkdocs_simple_frontscopejan9epe9/mkdocs-workbench.yml
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/README.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/gitting-it-right.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/onboarding.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/about.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/behind-the-scenes.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/running-from-source.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/working-with-pm.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/working-with-pm.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/working-with-bigints.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/working-with-git-and-github.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/acknowledgments.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/making-a-visualizer.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/extending.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/code-style.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/pull-request-checklist.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/code-principles.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/user_guide.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/user_guide.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/visual-studio-code-setup.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/server-administration.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/husky-pre-commit.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc/husky-pre-commit.md
[WebServer] INFO    -  mkdocs-simple-plugin: doc/img/sync-fork.png --> /tmp/mkdocs_simple_frontscopejan9epe9/doc/img/sync-fork.png
[WebServer] INFO    -  mkdocs-simple-plugin: doc/img/compare-and-pull-request.png --> /tmp/mkdocs_simple_frontscopejan9epe9/doc/img/compare-and-pull-request.png
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/FactorFence.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/ShowFactors.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/ShiftCompare.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/ModFill.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/Differences.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/Turtle.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/Histogram.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/Chaos.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers/NumberGlyph.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers-workbench/P5VisualizerTemplate.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers-workbench/Grid.md
[WebServer] INFO    -  mkdocs-simple-plugin: src/visualizers-workbench/mkdocs-index.yml --> /tmp/mkdocs_simple_frontscopejan9epe9/src/visualizers-workbench/mkdocs-index.yml
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/LogoWithMicroscope.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/LogoWithMicroscope.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/VertLogoWithMicroscope.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/VertLogoWithMicroscope.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/LogoNoMicroscope.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/LogoNoMicroscope.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Entries/1729.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Entries/1729.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Turtle/turtle-waitforit.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Turtle/turtle-waitforit.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/homepage/gof.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/homepage/gof.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/homepage/turtle.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/homepage/turtle.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/homepage/sc.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/homepage/sc.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/specimens/1.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/specimens/1.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/specimens/7.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/specimens/7.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/specimens/5.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/specimens/5.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/specimens/3.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/specimens/3.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/specimens/6.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/specimens/6.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/specimens/4.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/specimens/4.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/specimens/2.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/specimens/2.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Differences/squares.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Differences/squares.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/toolpage/1-sequence.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/toolpage/1-sequence.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/toolpage/2-tools.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/toolpage/2-tools.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/toolpage/3-draw.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/toolpage/3-draw.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/glyph/diff-func.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/glyph/diff-func.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/glyph/ring1.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/glyph/ring1.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/glyph/semiprimes.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/glyph/semiprimes.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/glyph/integers.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/glyph/integers.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/FactorFence/ramanujan-tau.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/FactorFence/ramanujan-tau.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/FactorFence/naturals.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/FactorFence/naturals.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/FactorHistogram/ExampleImage.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/FactorHistogram/ExampleImage.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/14.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/14.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/example-grid.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/example-grid.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/12.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/12.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/20.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/20.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/abundant.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/abundant.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/13.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/13.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/19.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/19.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/18.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/18.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/1.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/1.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/7.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/7.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/10.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/10.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/16.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/16.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/pi-digits.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/pi-digits.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/5.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/5.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/11.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/11.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/3.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/3.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/9.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/9.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/8.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/8.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/15.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/15.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/abundant-more.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/abundant-more.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/6.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/6.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/4.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/4.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/pi-digits-more.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/pi-digits-more.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/2.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/2.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/assets/img/Grid/17.png --> /tmp/mkdocs_simple_frontscopejan9epe9/src/assets/img/Grid/17.png
[WebServer] INFO    -  mkdocs-simple-plugin: src/shared/math.ts --> /tmp/mkdocs_simple_frontscopejan9epe9/src/shared/math.ts
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/shared/math.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/src/shared/alertMessage.md
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc_theme/base.html
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc_theme/base.html
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc_theme/main.html
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc_theme/main.html
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc_theme/main.html
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc_theme/css/coordinate.css
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc_theme/css/coordinate.css
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/doc_theme/css/coordinate.css
[WebServer] INFO    -          ... extracted /tmp/mkdocs_simple_frontscopejan9epe9/.github/pull_request_template.md
[WebServer] INFO    -  mkdocs-simple-plugin: .github/dependabot.yml --> /tmp/mkdocs_simple_frontscopejan9epe9/.github/dependabot.yml
[WebServer] INFO    -  Cleaning site directory
[WebServer] INFO    -  Building documentation to directory: /home/katestange/data/projects/numberscope/frontscope-backscope/frontscope/dist/doc
[WebServer] INFO    -  An absolute path to '/... | src/visualizers-workbench/*' is included in the 'nav' configuration, which presumably points to an external resource.
INFO    -  An absolute path to '/... | flat | src/visualizers/*' is included in the 'nav' configuration, which presumably points to an external resource.
[WebServer] INFO    -  An absolute path to '/... | flat | src/shared/*' is included in the 'nav' configuration, which presumably points to an external resource.
INFO    -  An absolute path to '/... | flat | doc/*.md' is included in the 'nav' configuration, which presumably points to an external resource.
[WebServer] INFO    -  Documentation built in 0.48 seconds
[WebServer] The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.


Running 26 tests using 4 workers
  26 passed (27.5s)

To open last HTML report run:

  npx playwright show-report

and the scope appears to work.

@gwhitney
Copy link
Collaborator Author

Wow, looks like you actually ran the tests! Great. For all of those warnings at the beginning, note that version 16 of node has been end-of-lifed. You should see if you can update your installation at least to node version 18 (or higher).

  The strong desire for image tests led to a cascade of changes in this
  commit, mostly driven by the need to have reproducible images:

  - Removes all use of `sketch.noLoop()` and `sketch.loop()` in favor
    of the previously existing `stop()` and `continue()` visualizer methods,
    to allow:
  - Adds a `frames=NNN` query parameter to URLs to set the maximum number
    of frames a visualization may draw
  - Switches from the "static" instance of mathjs to a "dynamic" one, to
    allow its random number configuration to be controlled. In conjunction
    with this, moves all math functions into a single math module, as
    extensions of mathjs.
  - Removes all use of `Math.random()` in favor of the mathjs random
    generator
  - Adds a `randomSeed=AAAA` query parameter to URLs to make the mathjs
    random generator reproducible.
  - Documents all of the above changes.
@gwhitney
Copy link
Collaborator Author

OK, I have pushed the code that facilitates image tests and institutes them for all featured gallery specimens. Presuming it is reproducible on other machines, this approach gives us the benefit that any time another featured specimen is added, another test is automatically added. (When in the future we remove featured specimens, we may want to move them to a dedicated test specimen list, if they are still of interest for testing purposes.)

@katestange @Vectornaut it would be awesome to see if the newly-added tests pass on either of your machines. Note they will definitely fail on MacOS or Windows, as Playwright image tests are enforced to be OS-specific. When we need to enable development on other platforms, I'll have to create a Windows PR (I have a dual-boot machine kicking around somewhere), and someone with access to a Mac will have to do likewise. Fingers crossed and looking forward to hearing back your results on these new tests.

  Also adds new tests for `src/shared/defineFeatured.ts` and corrects
  the documentation extraction facility for the package manager
  scripts.

  Resolves numberscope#25.
  Resolves numberscope#73.
  Resolves numberscope#246.
   In other words, it should never call calculate twice for the
   same index. This is tested by 10K random accesses to indices
   less than 1M, followed by accessing the first 10K entries,
   followed by accessing the last 10K entries. Hopefully that
   should suffice.

   Resolves numberscope#54.
  This is an initial pass at addressing numberscope#113.
  Note, however, that ModFill is not reporting to the person doing
  visualization that it is running with different parameter values
  than shown. So that still must be done, but for that part we will need
  a resolution to numberscope#112, which will be a sufficiently involve change that
  we should leave it to a spearate PR from this numberscope#420.
@katestange
Copy link
Member

Just to make sure I understand correctly, this PR is going to mean that every time I try to commit some new code, even just along the way in something I'm working on but isn't polished yet, we're running alllll these tests, right, and I can't commit if anything fails?

Copy link
Member

@katestange katestange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more thoughts.

src/visualizers/Histogram.ts Show resolved Hide resolved
src/shared/browserCaching.ts Show resolved Hide resolved
doc/husky-pre-commit.md Show resolved Hide resolved
@gwhitney
Copy link
Collaborator Author

gwhitney commented Oct 9, 2024

Just to make sure I understand correctly, this PR is going to mean that every time I try to commit some new code, even just along the way in something I'm working on but isn't polished yet, we're running alllll these tests, right, and I can't commit if anything fails?

Indeed, this PR adopts a model that a commit is a checkpoint at which the code works. That's not an uncommon code hygiene practice. (But it is by no means universal.) Your working version can be as broken as you like, but it should work at each commit. We could switch to only enforcing tests on PRs but in my experience that leads to people making PRs that don't actually pass the tests, since they end up not always bothering to run all the tests before pushing. Since the modal PR is just one or two commits, tests on every commit seems reasonable to me.

I suppose we could look into tests as pre-push rather than pre-commit actions, if you feel testing on every commit is too onerous.

@katestange
Copy link
Member

I suppose we could look into tests as pre-push rather than pre-commit actions, if you feel testing on every commit is too onerous.

Nope, I'm happy, I just wanted to make sure I understand.

@gwhitney
Copy link
Collaborator Author

gwhitney commented Oct 9, 2024

OK, I think I've addressed your latest batch of comments (thanks for them!). Looking forward to your further review when you get a chance.

@katestange
Copy link
Member

In histogram, because you can pan and zoom, the mouseover isn't working right anymore (it doesn't adjust properly to the panned and zoomed setup).

@katestange
Copy link
Member

Question: how do the tests decide how many workers to use?

@katestange
Copy link
Member

Ok, at the moment I can't think of too much more to test or ask. I've tried out all the things I can think of trying. Tests are passing. So just the mouseover in histogram.

@gwhitney
Copy link
Collaborator Author

gwhitney commented Oct 9, 2024

Question: how do the tests decide how many workers to use?

I literally have no idea. Is this something you'd like me to investigate?

@gwhitney
Copy link
Collaborator Author

gwhitney commented Oct 9, 2024

In histogram, because you can pan and zoom, the mouseover isn't working right anymore (it doesn't adjust properly to the panned and zoomed setup).

Yeah, I knew that. The original code has no contemplation that the display could have changed at all. I was sort of hoping that could be left for the future, but that was fatigue on my part. (Frankly I am not quite sure how the mouseover code can tell which box the mouse is over if there's been a combination of panning and zooming, but I am sure it is possible somehow...) I will try to fix tonight. If not, it will likely be Friday at the soonest because I am heading to Seattle tomorrow for a SUMM meeting.

@katestange
Copy link
Member

I literally have no idea. Is this something you'd like me to investigate?

No, was just curious.

@katestange
Copy link
Member

In histogram, because you can pan and zoom, the mouseover isn't working right anymore (it doesn't adjust properly to the panned and zoomed setup).

Yeah, I knew that. The original code has no contemplation that the display could have changed at all. I was sort of hoping that could be left for the future, but that was fatigue on my part. (Frankly I am not quite sure how the mouseover code can tell which box the mouse is over if there's been a combination of panning and zooming, but I am sure it is possible somehow...) I will try to fix tonight. If not, it will likely be Friday at the soonest because I am heading to Seattle tomorrow for a SUMM meeting.

Well it could be added to the Histogram overhaul issue if you'd prefer, that would be fine with me. You could also turn off mouse controls for now, and add turning them with mouseover working again to Histogram overhaul. I don't have anything else for this PR to ask for at the moment, so maybe we should just go for merging? It is an unusually large PR. :)

@gwhitney
Copy link
Collaborator Author

Well it could be added to the Histogram overhaul issue if you'd prefer, that would be fine with me

No, it's OK. Should be done now. There were other related aspects to fix, such as not having the text get unreadably tiny when zoomed out, and keeping dragging proportional when zoomed in or out. Take a look and let me know what you think; it seems from your comments that this is the last thing on your list for merging. Sorry I was kvetching, it was just me being lazy and not wanting to figure out the coordinate transform from mouse coordinates to plot coordinates depending on the pan and zoom. But fortunately the situation is simple enough (no rotations, for example) and I've done this sort of thing enough that I could just do it by trial and error: get it working for arbitrary pan, no zoom; then get it working for no pan, arbitrary zoom; and then finally combining those to get the general case...

@katestange
Copy link
Member

Well it could be added to the Histogram overhaul issue if you'd prefer, that would be fine with me

No, it's OK. Should be done now. There were other related aspects to fix, such as not having the text get unreadably tiny when zoomed out, and keeping dragging proportional when zoomed in or out. Take a look and let me know what you think; it seems from your comments that this is the last thing on your list for merging. Sorry I was kvetching, it was just me being lazy and not wanting to figure out the coordinate transform from mouse coordinates to plot coordinates depending on the pan and zoom. But fortunately the situation is simple enough (no rotations, for example) and I've done this sort of thing enough that I could just do it by trial and error: get it working for arbitrary pan, no zoom; then get it working for no pan, arbitrary zoom; and then finally combining those to get the general case...

Nice! I'm attaching a screenshot showing some text overlap issues. With the axes labels, I think overlap is probably inevitable when you zoom out, but maybe the little "too many bars" message could avoid overlapping.
Screenshot from 2024-10-09 20-26-26

@gwhitney
Copy link
Collaborator Author

but maybe the little "too many bars" message could avoid overlapping.

I just put it in a fixed position on screen, regardless of zoom or pan. How's that?

@katestange
Copy link
Member

I just put it in a fixed position on screen, regardless of zoom or pan. How's that?

It works well for zooming out, but strangely it still moves when zooming in?

Screenshot from 2024-10-09 22-38-35

@gwhitney
Copy link
Collaborator Author

It works well for zooming out, but strangely it still moves when zooming in?

As far as I can tell, that only occurs on the last frame or maybe the last two frames before zooming all the way through the graph so you can't see anything (that is literally what happens). In other words, the formulae are working just right except in case of an extremely close-up view. Mathematically, there should be no difference for those last two frames, as far as I can see. I am supposing that due to some kind of quantization in possible text sizes, or some kind of integer rounding phenomenon, at this extreme close-up range, the text height is actually being reported inaccurately by p5. So I couldn't figure out how to get that last frame or two to look perfect. So I let well enough be, as an edge case that's not of too much practical import. It's certainly readable all the way up to the last frame but one, and looking at the graph at that very last zoom level is unlikely to be useful, and anyway you would already know what that caption says by the time you get there.

You are welcome to:
(a) merge as-is,
(b) solve the very-close-up-text conundrum yourself, or
(c) let me know that you're not merging this until the text looks perfect at all zooms, in which case at some point I will try to debug in detail what text weirdness is going on at the two most extreme zoom-in levels and see if I can figure out how to fix or work around whatever is going on. But I am unsure when I would get to this dreary task.

Sorry if that was a cranky response ;-)

@katestange
Copy link
Member

Sorry if that was a cranky response ;-)

Haha, you're entitled to a cranky response! I think we should merge this and celebrate!

@katestange katestange merged commit 3ca6998 into numberscope:ui2 Oct 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants