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

PB-1384 : modularize proj, number and coordinate utils #1227

Merged
merged 11 commits into from
Feb 7, 2025

Conversation

pakb
Copy link
Contributor

@pakb pakb commented Jan 31, 2025

in prep work to the elevation profile module, I started modularizing what will be used by both the viewer and the future elevation profile component.

I used the opportunity of having a smaller scoped project to switch to Typescript entirely all the utilities. Migration to ESLint9 was also done here, meaning there are some changes because of new linter rules. Some ESLint8 plugins weren't available in ESLint9 so I had to find equivalents, but they don't have exactly the same way of linting

Test link

@pakb
Copy link
Contributor Author

pakb commented Jan 31, 2025

CI said FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
I think we need more resources 🙃

Edit: switched to the next tier of virtual hardware for our CI

@pakb pakb force-pushed the feat-PB-1384-profile-npm-modules branch 2 times, most recently from 31c921a to 9251368 Compare January 31, 2025 14:45
Copy link

cypress bot commented Jan 31, 2025

web-mapviewer    Run #4469

Run Properties:  status check passed Passed #4469  •  git commit f5c06c37c2: PB-1384 : set cypress as dev dep only
Project web-mapviewer
Branch Review feat-PB-1384-profile-npm-modules
Run status status check passed Passed #4469
Run duration 03m 46s
Commit git commit f5c06c37c2: PB-1384 : set cypress as dev dep only
Committer Pascal Barth
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 21
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 234
View all changes introduced in this branch ↗︎

@schtibe schtibe self-requested a review February 3, 2025 13:03
adr/2025-01-27_modularization.md Outdated Show resolved Hide resolved
@@ -1,8 +1,8 @@
import { expect } from 'chai'
import { reprojectAndRound } from 'geoadmin/coordinates'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this file go to the other package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean extent utils?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah sorry, I mean this test file, not the line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

extentUtils wasn't moved yet, so let's keep the test file with its "parent"

packages/mapviewer/src/utils/components/TextInput.vue Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
packages/geoadmin/README.md Show resolved Hide resolved
packages/geoadmin/package.json Outdated Show resolved Hide resolved
@pakb pakb force-pushed the feat-PB-1384-profile-npm-modules branch from d572384 to c8595d4 Compare February 3, 2025 15:47
@pakb pakb force-pushed the feat-PB-1384-profile-npm-modules branch 2 times, most recently from 9084c8b to 4db64c2 Compare February 7, 2025 09:18
pakb and others added 10 commits February 7, 2025 10:19
in prep work to the elevation profile module, I started modularizing what will be used by both the viewer and the future elevation profile component.

I used the opportunity of having a smaller scoped project to switch to Typescript entirely all the utilities.
Migration to ESLint9 was also done here, meaning there are some changes because of new linter rules. Some ESLint8 plugins weren't available in ESLint9 so I had to find equivalents, but they don't have exactly the same way of linting

as we are running a preview on a "from scratch" CI instance, geoadmin package has never been built (and added to the local npm registry for that matter).
Building the lib with the same target in mind before running the preview script on the viewer
Switch to Chrome for CI testing (too many issues with external layer loading and Electron)

Allow clipboard use by default with Chrome on the CI

Refactor Cypress test to gather all intercept logic in one place, shared among all tests
Allow for using a list of nodes for the selector of tippy. This lets us
narrow in the selection of the DOM elements that tippy should initialize
on
Waiting in Cypress so that the tooltips are being removed on cypress.io
The map function directly called transformLayerIntoUrlString. Since the
map function provides three arguments: element, index & array, these
were mapped to the arguments of transformLayerIntoUrlString, with the
third being the parameter `featureIds`, resulting in a weird URL
Reducing a race condition with the visibility of the external test wmts layers
@pakb pakb force-pushed the feat-PB-1384-profile-npm-modules branch from 4db64c2 to ba5936e Compare February 7, 2025 09:19
@pakb pakb requested a review from schtibe February 7, 2025 09:21
@pakb pakb marked this pull request as ready for review February 7, 2025 09:23
Copy link
Contributor

@schtibe schtibe left a comment

Choose a reason for hiding this comment

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

👍

package.json Outdated Show resolved Hide resolved
"vue": "^3.5.13",
"vue-i18n": "^11.1.0"
},
"devDependencies": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is all this still needed on this level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to make sure we are using the same Vue and Vue-i18n version across all packages (I'll start exporting Vue component in the next PR)

// to avoid additional memory usage by passing the --disable-gl-drawing-for-tests flag.
launchOptions.args.push('--disable-gl-drawing-for-tests')
// to avoid additional memory usage by passing the --disable-webgl flag.
launchOptions.args.push('--disable-webgl')
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still valid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be, we could try removing it and see what happens...

"jsdom": "^26.0.0",
"mime-types": "^2.1.35",
"mocha-junit-reporter": "^2.2.1",
"rimraf": "^6.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe at some point we could do some cleanup with the dependencies? I quickly searched rimraf in the repo and didn't find any user of this, like no import or anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's used to delete JUnit test reports in an agnostic way (so that we may also have people developing on win11 for instance)

@pakb pakb force-pushed the feat-PB-1384-profile-npm-modules branch from a3af156 to f5c06c3 Compare February 7, 2025 10:24
@pakb pakb merged commit 11ea72c into develop Feb 7, 2025
6 checks passed
@pakb pakb deleted the feat-PB-1384-profile-npm-modules branch February 7, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants