Skip to content

Commit

Permalink
[#8] using the new HSResourceMetadataDOC for HS resource level metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
pkdash committed Jun 20, 2024
1 parent 8598244 commit 1776703
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hsextract/adapters/hydroshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pydantic import BaseModel, EmailStr, HttpUrl, validator
from hsextract.adapters.utils import RepositoryType
from hsextract.models import schema
from hsextract.models.schema import CoreMetadataDOC
from hsextract.models.schema import HSResourceMetadataDOC


class Creator(BaseModel):
Expand Down Expand Up @@ -269,9 +269,7 @@ def to_dataset_provider():
return provider

def to_catalog_dataset(self):
# TODO: In place of CoreMetadataDOC, may have to use the new HSResourceMetadataDOC
# schema (see cataloapi for this schema)
dataset = CoreMetadataDOC.construct()
dataset = HSResourceMetadataDOC.construct()
dataset.provider = self.to_dataset_provider()
dataset.name = self.title
dataset.description = self.abstract
Expand Down

0 comments on commit 1776703

Please sign in to comment.