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 reuse metadata support #1086

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

AlitaBernachot
Copy link
Collaborator

@AlitaBernachot AlitaBernachot commented Jan 22, 2025

Description

This PR adds the support of the new type of metadata: Reuse metadata, for:

  • gn4 (read),
  • iso19139 (read/write)
  • and iso19115-3 (read-write).

Architectural changes

The new ReuseRecord Metadata Model has been added

export interface ReuseRecord extends BaseRecord {
  kind: 'reuse'
  lineage: string // Explanation of the origin of this record (e.g: how, why)"
  onlineResources: Array<OnlineLinkResource>
  reuseType: ReuseType
  spatialExtents: Array<DatasetSpatialExtent>
  temporalExtents: Array<DatasetTemporalExtent>
}

along with with ReuseType

export type ReuseType = 'application' | 'map' | 'other'

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 22, 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

@AlitaBernachot AlitaBernachot force-pushed the GSIGNGPF-49-reuse-metadata-support branch from 1a68f1d to b3f9cda Compare January 23, 2025 11:42
@AlitaBernachot AlitaBernachot marked this pull request as ready for review January 24, 2025 10:34
@AlitaBernachot AlitaBernachot force-pushed the GSIGNGPF-49-reuse-metadata-support branch from 16853b8 to d880b52 Compare January 24, 2025 11:08
Copy link
Contributor

github-actions bot commented Jan 24, 2025

📷 Screenshots are here!

@AlitaBernachot AlitaBernachot force-pushed the GSIGNGPF-49-reuse-metadata-support branch from 73cafba to bec412b Compare January 24, 2025 12:26
@AlitaBernachot AlitaBernachot force-pushed the GSIGNGPF-49-reuse-metadata-support branch from 713f62b to ede3740 Compare January 24, 2025 14:12
@coveralls
Copy link

Coverage Status

coverage: 84.272% (+0.08%) from 84.193%
when pulling ede3740 on GSIGNGPF-49-reuse-metadata-support
into 435a18a on main.

Copy link
Collaborator

@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.

That looks really good, great work! I added a couple of comments to make a few things a little bit clearer, but apart from that it's all good. Please merge once you've addressed the comments as you see fit :)

return {
...output,
kind,
reuseType,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
reuseType,
...(reuseType || { reuseType }),

We should not write this key if the reuseType is undefined

@@ -339,6 +340,7 @@ export class Iso19139Converter extends BaseConverter<string> {

fieldChanged('uniqueIdentifier') &&
this.writers['uniqueIdentifier'](record, rootEl)
fieldChanged('reuseType') && this.writers['kind'](record, rootEl)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks potentially confusing; maybe we can still have a "reuseType" writer and simply call the "kind" writer inside? At least we would have a homogeneous logic everywhere, even if it's an unnecessary step

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