Skip to content

Create utilities to support reliable data package fetching, uploading, and updating #2804

@robyngit

Description

@robyngit

This PR encompasses building reusable classes needed for the broader data package refactor #2567.

MetacatUI's current package behaviour depends on older models that combine XML handling, DataONE api calls, system metadata logic, and resource map logic in ways that are difficult to test and difficult to change safely. Before we refactor editor save behaviour or package loading behaviour, we need a smaller set of stable, reusable lower-level classes:

  • A typed SysMeta class with:
    • normalization
    • validation
    • XML parsing
    • XML serialization
    • support for all fields including access policy, replication policy, replicas, media type, file name, and versioning fields
  • Reusable service classes for:
    • object fetch/download/create/update
    • sysmeta fetch/update
    • identifier generate/reserve
  • XML utilities to help with parsing XML without relying on jQuery
  • A minimal (for now) ResourceMap class for parsing and inspecting resource maps, including:
    • aggregated member PIDs
    • documents relationships
  • Unit tests for all new components and behaviours
  • Evaluation of whether updating rdflib is safe and worthwhile in this refactor; defer if it expands scope or risk too much.

This issue will support later fixes to package saving, updating, and loading, but does not implement those user-facing fixes yet. These changes are also going to make it easier in the future to handle larger data packages.

Metadata

Metadata

Assignees

Labels

ADC CI-09Enhanced data submission tools & portals (ADC deliverable)arctic data centereditorsubmission & error handlingProblems surrounding failed metadata submissions in the editor

Projects

Status

In Progress

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions