`updateSystemMetadata()` does not remove obsoletes field

未关闭
#27 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api

调研方向

从 updateSystemMetadata() 入口点开始,将 getSystemMetadata() 的 XML 与 issue 中显示的已提交 XML 进行比较。检查已移除的可选字段(包括 obsoletes)是如何序列化的,并验证读-修改-写操作会省略从元数据中移除的字段;对其他可选字段重复进行检查。

由索引模型根据 Issue 内容生成。

描述

When doing a read-modify-write operation on System Metadata in which the obsoletes field is removed, the obsoletes field remains in GMN. Need to check the behavior for all optional fields.

Example received by getSystemMetadata():

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns3:systemMetadata xmlns:ns2="http://ns.dataone.org/service/types/v1" xmlns:ns3="http://ns.dataone.org/service/types/v2.0">
    <serialVersion>1</serialVersion>
    <identifier>10.0309_rwstg1k34w_201981021525</identifier>
    <formatId>http://www.isotc211.org/2005/gmd</formatId>
    <size>4475</size>
    <checksum algorithm="MD5">8d236914945bb03ed9211aabe463568e</checksum>
    <submitter>CN=urn:node:mnTestRW,DC=dataone,DC=org</submitter>
    <rightsHolder>CN=urn:node:mnTestRW,DC=dataone,DC=org</rightsHolder>
    <accessPolicy>
        <allow>
            <subject>public</subject>
            <permission>read</permission>
        </allow>
    </accessPolicy>
    <replicationPolicy numberReplicas="3" replicationAllowed="true"/>
    <obsoletes>10.0309_rwstg1k34u_2019810194555</obsoletes>
    <archived>false</archived>
    <dateUploaded>2019-09-10T21:52:05.571+00:00</dateUploaded>
    <dateSysMetadataModified>2019-09-10T22:22:37.661+00:00</dateSysMetadataModified>
    <originMemberNode>urn:node:mnTestRW</originMemberNode>
    <authoritativeMemberNode>urn:node:mnTestRW</authoritativeMemberNode>
    <seriesId>10.0309/rwstg1k34w</seriesId>
    <fileName>10.0309_rwstg1k34w_201981021525.xml</fileName>
</ns3:systemMetadata>

Example submitted with updateSystemMetadata().

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns3:systemMetadata xmlns:ns2="http://ns.dataone.org/service/types/v1" xmlns:ns3="http://ns.dataone.org/service/types/v2.0">
    <serialVersion>1</serialVersion>
    <identifier>10.0309_rwstg1k34w_201981021525</identifier>
    <formatId>http://www.isotc211.org/2005/gmd</formatId>
    <size>4475</size>
    <checksum algorithm="MD5">8d236914945bb03ed9211aabe463568e</checksum>
    <submitter>CN=urn:node:mnTestRW,DC=dataone,DC=org</submitter>
    <rightsHolder>CN=urn:node:mnTestRW,DC=dataone,DC=org</rightsHolder>
    <accessPolicy>
        <allow>
            <subject>public</subject>
            <permission>read</permission>
        </allow>
    </accessPolicy>
    <replicationPolicy numberReplicas="3" replicationAllowed="true"/>
    <archived>false</archived>
    <dateUploaded>2019-09-10T21:52:05.571+00:00</dateUploaded>
    <dateSysMetadataModified>2019-09-10T22:22:37.661+00:00</dateSysMetadataModified>
    <originMemberNode>urn:node:mnTestRW</originMemberNode>
    <authoritativeMemberNode>urn:node:mnTestRW</authoritativeMemberNode>
    <seriesId>10.0309/rwstg1k34w</seriesId>
    <fileName>10.0309_rwstg1k34w_201981021525.xml</fileName>
</ns3:systemMetadata>
主要语言
Python
星标
18
派生
10
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DataONEorg/d1_python 的其他 Issue

查看 DataONEorg/d1_python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。