Skip to content

Commit

Permalink
update commonmeta schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mfenner committed Dec 6, 2023
1 parent 32a2cdd commit a6bf6ea
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion commonmeta/metadata/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def is_valid(self) -> Any:
"""validate against JSON schema"""
try:
file_path = os.path.join(
os.path.dirname(__file__), "resources/commonmeta_v0.10.1.json"
os.path.dirname(__file__), "resources/commonmeta_v0.10.4.json"
)
print(file_path)
with open(file_path, encoding="utf-8") as file:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://commonmeta.org/commonmeta_v0.10.2.json",
"title": "Commonmeta v0.10.2",
"$id": "https://commonmeta.org/commonmeta_v0.10.4.json",
"title": "Commonmeta v0.10.4",
"description": "JSON representation of the Commonmeta schema.",
"additionalProperties": false,
"definitions": {
Expand Down Expand Up @@ -205,42 +205,36 @@
},
"date": {
"description": "The dates for the resource.",
"$comment": "The date fields are not required. Dates should be formatted as ISO 8601 dates.",
"type": "object",
"properties": {
"created": {
"description": "The date the resource was created.",
"type": "string",
"format": "date"
"type": "string"
},
"submitted": {
"description": "The date the resource was submitted.",
"type": "string",
"format": "date"
"type": "string"
},
"accepted": {
"description": "The date the resource was accepted.",
"type": "string",
"format": "date"
"type": "string"
},
"published": {
"description": "The date the resource was published.",
"type": "string",
"format": "date"
"type": "string"
},
"updated": {
"description": "The date the resource was updated.",
"type": "string",
"format": "date"
"type": "string"
},
"available": {
"description": "The date the resource was made available.",
"type": "string",
"format": "date"
"type": "string"
},
"withdrawn": {
"description": "The date the resource was withdrawn.",
"type": "string",
"format": "date"
"type": "string"
}
}
},
Expand Down Expand Up @@ -522,6 +516,15 @@
"description": "The state of the resource.",
"type": "string",
"enum": ["findable", "not_found"]
},
"archive_locations": {
"description": "The location where content is archived.",
"type": "array",
"items": {
"type": "string",
"enum": ["CLOCKSS", "LOCKSS", "Portico", "KB", "Internet Archive", "DWT"]
},
"uniqueItems": true
}
},
"required": [
Expand Down
2 changes: 1 addition & 1 deletion docs/_site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h2 id="toc-title">On this page</h2>



<p><a href="https://github.com/front-matter/commonmeta-py/actions/workflows/build.yml"><img src="https://github.com/front-matter/commonmeta-py/actions/workflows/build.yml/badge.svg" class="img-fluid" alt="Build"></a> <a href="https://pypi.org/project/commonmeta-py/"><img src="https://img.shields.io/pypi/v/commonmeta-py.svg" class="img-fluid" alt="PyPI version"></a> <a href="https://commonmeta-py.docs.front-matter.io/"><img src="https://img.shields.io/badge/docs-passing-blue.png" class="img-fluid" alt="docs"></a> <img src="https://img.shields.io/github/license/front-matter/commonmeta-py?logo=MIT.png" class="img-fluid" alt="GitHub"></p>
<p><a href="https://github.com/front-matter/commonmeta-py/actions/workflows/build.yml"><img src="https://github.com/front-matter/commonmeta-py/actions/workflows/build.yml/badge.svg" class="img-fluid" alt="Build"></a> <a href="https://pypi.org/project/commonmeta-py/"><img src="https://img.shields.io/pypi/v/commonmeta-py.svg" class="img-fluid" alt="PyPI version"></a> <a href="https://python.commonmeta.org/"><img src="https://img.shields.io/badge/docs-passing-blue.png" class="img-fluid" alt="docs"></a> <img src="https://img.shields.io/github/license/front-matter/commonmeta-py?logo=MIT.png" class="img-fluid" alt="GitHub"></p>
<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>commonmeta-py is a Python library to implement commonmeta, the metadata format for common scholarly metadata. Use commonmeta-py to convert scholarly metadata from/to a variety of metadata formats, listed below. Commonmeta-py is work in progress, the first release on PyPi (version 0.5.0) was on February 16, 2023. Up until version 0.5.1, the library was called talbot. Commonmeta-py is modelled after the <a href="https://github.com/front-matter/briard">briard ruby gem</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ toc-expand: true

[![Build](https://github.com/front-matter/commonmeta-py/actions/workflows/build.yml/badge.svg)](https://github.com/front-matter/commonmeta-py/actions/workflows/build.yml)
[![PyPI version](https://img.shields.io/pypi/v/commonmeta-py.svg)](https://pypi.org/project/commonmeta-py/)
[![docs](https://img.shields.io/badge/docs-passing-blue)](https://commonmeta-py.docs.front-matter.io/)
[![docs](https://img.shields.io/badge/docs-passing-blue)](https://python.commonmeta.org/)
![GitHub](https://img.shields.io/github/license/front-matter/commonmeta-py?logo=MIT)

## Introduction
Expand Down

0 comments on commit a6bf6ea

Please sign in to comment.