ropensci / datapack

An R package to handle data packages
https://docs.ropensci.org/datapack
44 stars 9 forks source link

GetSystemMetadata method doesn't get replica information #140

Open taojing2002 opened 3 months ago

taojing2002 commented 3 months ago

I used a piece of R code to get system metadata of an object which has three replicas. The system metadata can be see from: https://mn-sandbox-ucsb-1.test.dataone.org/knb/d1/mn/v2/meta/testReplicateJsonLD.1711738610440

pid <- "testReplicateJsonLD.1711738610440"
mn <- MNode("https://mn-sandbox-ucsb-1.test.dataone.org/knb/d1/mn/v2")
user <- "http://orcid.org/0000-0002-8916-564X"
sysmeta <- getSystemMetadata(mn, pid)

However, the replica section is missing from R even though it got the replication policy part:

Screen Shot 2024-04-04 at 10 24 00 AM Screen Shot 2024-04-04 at 10 24 21 AM
jeanetteclark commented 3 months ago

there is no field for replica within the SystemMetadata class, so we would need to add it and parse the information from the sysmeta so it fits within it, probably as a data.frame?

mbjones commented 3 months ago

Yeah, I omitted that replica field because, at the time we were discussing removing it from sysmeta altogether, and it's not client editable so I skipped it. Is it needed for editing, or just for completeness?

taojing2002 commented 3 months ago

For completeness. I think it should show the replica information. Otherwise, it may confuse users in some circumstances. Also Metacat should enforce that clients can't edit the replica parts when they call MN.updateSystemMetadata: https://github.com/NCEAS/metacat/issues/1867

On Thu, Apr 4, 2024 at 3:47 PM Matt Jones @.***> wrote:

Yeah, I omitted that replica field because, at the time we were discussing removing it from sysmeta altogether, and it's not client editable so I skipped it. Is it needed for editing, or just for completeness?

— Reply to this email directly, view it on GitHub https://github.com/ropensci/datapack/issues/140#issuecomment-2038400364, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5QQDATAD5QRS3P74BSOTDY3XJ6ZAVCNFSM6AAAAABFXX476WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZYGQYDAMZWGQ . You are receiving this because you authored the thread.Message ID: @.***>