-
Notifications
You must be signed in to change notification settings - Fork 34
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
refactor: remove dataAccessPath from initial layer configs #2583
refactor: remove dataAccessPath from initial layer configs #2583
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 15 of 44 files at r1, all commit messages.
Reviewable status: 15 of 44 files reviewed, 2 unresolved discussions (waiting on @DamonU2)
packages/geoview-core/schema.json
line 1493 at r1 (raw file):
} }, "required": ["geoviewLayerType", "metadataAccessPath", "listOfLayerEntryConfig"]
Is it mandatory? geocore doesn not have it
packages/geoview-core/public/templates/demos/demo-cgdi.html
line 70 at r1 (raw file):
'listOfLayerEntryConfig': [ { 'layerId': 'items?f=json',
This looks weird..... should it stay hydrometric-stations for layerId but having the metadtaAccessPAth like the dataAccesssPath?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 15 of 44 files reviewed, 3 unresolved discussions (waiting on @DamonU2)
packages/geoview-core/public/templates/demos/demo-gsc.html
line 71 at r1 (raw file):
'listOfLayerEntryConfig': [ { 'layerId': '46E.JSON',
Here as well... medataDataAccesssPAth it root and layerId is last section but in this case it is duplicated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 15 of 44 files reviewed, 4 unresolved discussions (waiting on @DamonU2)
packages/geoview-core/public/templates/demos/demo-osdp-non-currated.html
line 114 at r1 (raw file):
'geoviewLayerId': 'geojsonlyr3', 'geoviewLayerName': 'Multi Polygon Layer', 'metadataAccessPath': './configs/OSDP/datasets/DDFO-CURATED-1-03336A72-E5AD-4EEE-803D-E70B7FDE9FCB_en.json',
Should it be metada.. ./configs/OSDP/datasets/ and layerId DDFO...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 44 files at r1.
Reviewable status: 16 of 44 files reviewed, 5 unresolved discussions (waiting on @DamonU2)
packages/geoview-core/public/templates/layers/csv.html
line 75 at r1 (raw file):
'geoviewLayerId': 'csvLYR1', 'geoviewLayerName': 'NPRI', 'metadataAccessPath': './datasets/csv-files/',
re is it good compared to the json sample
packages/geoview-core/public/templates/layers/csv.html
line 90 at r1 (raw file):
'geoviewLayerId': 'csvLYR2', 'geoviewLayerName': 'Station List MELCC', 'metadataAccessPath': './datasets/csv-files/Station_List_Minus_HQ-MELCC.csv',
Here we have duplication again. What is the difference with the item above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 17 of 44 files at r1.
Reviewable status: 33 of 44 files reviewed, 9 unresolved discussions (waiting on @DamonU2)
packages/geoview-core/public/templates/layers/geojson.html
line 172 at r1 (raw file):
geoviewLayerId: 'geoJsonSample', geoviewLayerName: 'Historical Flood', metadataAccessPath: './datasets/geojson/historical_flood_0.geojson',
duplication again
packages/geoview-core/src/core/utils/config/validation-classes/raster-validation-classes/esri-dynamic-layer-entry-config.ts
line 30 at r1 (raw file):
// We assign the metadataAccessPath of the GeoView layer to dataAccessPath. if (!this.source) this.source = {}; this.source.dataAccessPath = this.geoviewLayerConfig.metadataAccessPath;
workaround to keep dataAccessPath internal but remove from schema? If so we need a GV comment.
If we need some tweeking, because each class has it, we may do it here. In new config, this is not there anymore, we need comment implement behaviour in new structure when we progress in the refactor. Please add TODO comment in each class
packages/geoview-core/src/core/utils/config/validation-classes/raster-validation-classes/xyz-layer-entry-config.ts
line 19 at r1 (raw file):
if (!this.source.dataAccessPath.endsWith('{z}/{y}/{x}')) this.source.dataAccessPath = this.source.dataAccessPath!.endsWith('/') ? `${this.source.dataAccessPath}tile/{z}/{y}/{x}`
I like the way we tweak it so config is clean and internal stuff if added after
packages/geoview-core/src/geo/map/map-schema-types.ts
line 79 at r1 (raw file):
*/ nameField?: string; /** Array of the outfield objects. */
Have you looked at the map-schema type in config api to see if it need to be modify as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General question. Was this PR tested with HYBRID_MODE = true
? It should(?) be transparent, so I understand it wasn't, but I'd like to make sure we don't hit an unforeseen issue, notably with the 'source' property being removed and whatnot.
Reviewed 44 of 44 files at r1, all commit messages.
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on @DamonU2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on @jolevesq)
packages/geoview-core/schema.json
line 1493 at r1 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Is it mandatory? geocore doesn not have it
Oops, good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on @jolevesq)
packages/geoview-core/public/templates/demos/demo-cgdi.html
line 70 at r1 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
This looks weird..... should it stay hydrometric-stations for layerId but having the metadtaAccessPAth like the dataAccesssPath?
It can't. The first path has the metadata and needs "items" added to fetch the layer data
packages/geoview-core/public/templates/demos/demo-gsc.html
line 71 at r1 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Here as well... medataDataAccesssPAth it root and layerId is last section but in this case it is duplicated
Done.
packages/geoview-core/public/templates/demos/demo-osdp-non-currated.html
line 114 at r1 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Should it be metada.. ./configs/OSDP/datasets/ and layerId DDFO...
Done.
packages/geoview-core/public/templates/layers/csv.html
line 90 at r1 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Here we have duplication again. What is the difference with the item above?
Just testing to make sure it worked if entered either way
packages/geoview-core/public/templates/layers/geojson.html
line 172 at r1 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
duplication again
Done.
c359efb
to
bf3cd10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 44 files at r1, 26 of 26 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @DamonU2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @DamonU2)
aef7a7a
to
ade928e
Compare
ade928e
to
2383764
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 6 files at r3, 3 of 3 files at r4, 6 of 6 files at r5, 28 of 30 files at r6, 11 of 11 files at r7, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @DamonU2)
c06e923
into
Canadian-Geospatial-Platform:develop
Closes #2537
Description
Removes the dataAccessPath from the source in the inital layer config source.
Type of change
How Has This Been Tested?
https://damonu2.github.io/geoview/demos-navigator.html
Checklist:
I have made corresponding changes to the documentationI have added tests that prove my fix is effective or that my feature worksNew and existing unit tests pass locally with my changesThis change is