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

[Datahub] Add service metadata support #1081

Merged
merged 6 commits into from
Jan 24, 2025

Conversation

AlitaBernachot
Copy link
Collaborator

@AlitaBernachot AlitaBernachot commented Jan 20, 2025

Description

This PR completes the support of Service metadata for gn4 (read), iso19139 (read/write) and iso19115-3 (read-write).

Some fixtures were added:

Architectural changes

The ServiceRecord Metadata Model has a new spatialExtents proprety (like DatasetRecord):

export interface ServiceRecord extends BaseRecord {
  kind: 'service'
  onlineResources: Array<ServiceOnlineResource>
  spatialExtents: Array<DatasetSpatialExtent>
}

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Jan 20, 2025

Affected libs: api-metadata-converter,
Affected apps: metadata-converter,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Contributor

github-actions bot commented Jan 20, 2025

📷 Screenshots are here!

Copy link
Member

@jahow jahow left a comment

Choose a reason for hiding this comment

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

Well, that looks great, thank you!! well done 🙂

I'm approving but it seems that some tests are still failing so we'll have to fix those first

const kind = hierarchyLevel === 'service' ? 'service' : 'dataset'
resourceType: (output, source) => {
const resourceType = selectField(source, 'resourceType')
const kind = resourceType[0] === 'service' ? 'service' : 'dataset'
Copy link
Member

Choose a reason for hiding this comment

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

I know this sounds counter-intuitive but you should use the atomic operations here:

selectField(
  getFirstValue(selectField(source, 'resourceType')),
  'key'
)

This is because the documents coming from ES can sometimes have various shapes and atomic operations functions will be tolerant to nullish/unexpected values :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the suggestion!

@AlitaBernachot AlitaBernachot force-pushed the GSIGNGPF-50-service-metadata-support branch from 3039ae6 to e5ab1ed Compare January 20, 2025 16:02
@AlitaBernachot AlitaBernachot marked this pull request as ready for review January 20, 2025 16:50
@AlitaBernachot AlitaBernachot force-pushed the GSIGNGPF-50-service-metadata-support branch from 71c50c9 to 80e663f Compare January 20, 2025 17:47
@coveralls
Copy link

coveralls commented Jan 20, 2025

Coverage Status

coverage: 84.193% (-0.4%) from 84.623%
when pulling c204243 on GSIGNGPF-50-service-metadata-support
into 166506d on main.

@AlitaBernachot AlitaBernachot force-pushed the GSIGNGPF-50-service-metadata-support branch from 80e663f to c204243 Compare January 24, 2025 10:40
@AlitaBernachot AlitaBernachot merged commit 435a18a into main Jan 24, 2025
14 checks passed
@AlitaBernachot AlitaBernachot deleted the GSIGNGPF-50-service-metadata-support branch January 24, 2025 10:56
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