CLOSED shape passing extra elements

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

还没有人认领这个 Issue。

评估

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

调研方向

Start by locating the ShEx validation path that handles CLOSED shapes and the tests for extra RDF predicates. Reproduce the supplied graph and shape, then check whether the rdf:type triple is treated as an extra element. Done means this example fails validation for that reason, with a regression test covering the behavior.

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

描述

The following graph:

@prefix : <http://example.org/model/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://example.org/context/42> a :Person ;
    foaf:age 43 ;
    foaf:firstName "Bob",
        "Joe" ;
    foaf:lastName "smith" .

passes

<http://example.org/sample/example1/String> <http://www.w3.org/2001/XMLSchema#string>
<http://example.org/sample/example1/Int> <http://www.w3.org/2001/XMLSchema#integer>
<http://example.org/sample/example1/Boolean> <http://www.w3.org/2001/XMLSchema#boolean>
<http://example.org/sample/example1/Person> CLOSED {
    (  <http://xmlns.com/foaf/0.1/firstName> @<http://example.org/sample/example1/String> * ;
       <http://xmlns.com/foaf/0.1/lastName> @<http://example.org/sample/example1/String> ;
       <http://xmlns.com/foaf/0.1/age> @<http://example.org/sample/example1/Int> ? ;
       <http://example.org/model/living> @<http://example.org/sample/example1/Boolean> ? ;
       <http://xmlns.com/foaf/0.1/knows> @<http://example.org/sample/example1/Person> *
    )
}

It shouldn't because of the rdf:type

主要语言
Jupyter Notebook
星标
29
派生
16
平均合并
20 小时 57 分钟
30 天内合并 PR
9

环境准备

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

从这里开始

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

linkml/PyShEx 的其他 Issue

查看 linkml/PyShEx 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

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