Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/BGC0000198.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"N52IJH5LHPQ7BFWMKQOBW6U7"
"UJYWT4SZRXDY2IOPYAIF6MII"
],
"version": "1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0000559.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"E5I4QXFMI3VSYYO3K7I7IJJH"
"UGZC47L5XXBEURRXQ62GTQAB"
],
"version": "1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0000582.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"SJOI7JSMELHUIOC3HESCTFXV"
"BWBU6RQ63PUYKPLUPLLRC4A7"
],
"version": "1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0000583.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"SJOI7JSMELHUIOC3HESCTFXV"
"BWBU6RQ63PUYKPLUPLLRC4A7"
],
"version": "1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0001028.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"N52IJH5LHPQ7BFWMKQOBW6U7"
"UJYWT4SZRXDY2IOPYAIF6MII"
],
"version": "1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0001172.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"N52IJH5LHPQ7BFWMKQOBW6U7"
"UJYWT4SZRXDY2IOPYAIF6MII"
],
"version": "1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0001435.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"FLY65ZCPMC2MOEEXU6QSP7DO"
"YFQE6LBJ4VCTUO2RYKJB5QD7"
],
"version": "1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0001436.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"HXVGKRLKDXN3R6A25AQJSXQH"
"HDJ3EC3TGIV3UPD32FQLYIFP"
],
"version": "1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0001440.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"4ACA66D6INRVNJRPWB3JQW5E"
"MQCAQSV425YQGLSERITRLP7K"
],
"version": "1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0001441.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"4ACA66D6INRVNJRPWB3JQW5E"
"MQCAQSV425YQGLSERITRLP7K"
],
"version": "1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0001442.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"4ACA66D6INRVNJRPWB3JQW5E"
"MQCAQSV425YQGLSERITRLP7K"
],
"version": "1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0001443.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Submitted"
],
"contributors": [
"4ACA66D6INRVNJRPWB3JQW5E"
"MQCAQSV425YQGLSERITRLP7K"
],
"version": "1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0002063.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Added version to NCBI accession"
],
"contributors": [
"5B66KLYJNZGZOCCCX4CRFPVL",
"HDJ3EC3TGIV3UPD32FQLYIFP",
"AAAAAAAAAAAAAAAAAAAAAAAA"
],
"version": "3.0"
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0002071.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Updated NRP substrate specificities"
],
"contributors": [
"O3ZSI4V6BQREG2DOQHOQ27FT",
"572PGVN4FCFMN3D46RF5EJPT",
"AAAAAAAAAAAAAAAAAAAAAAAA"
],
"version": "3.0"
Expand Down
2 changes: 1 addition & 1 deletion data/BGC0002082.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Added version to NCBI accession"
],
"contributors": [
"SSSZYUCEUV37TGDT5UNOPARF",
"RWYY5IOXGZUT2OPVWGVF5SYB",
"AAAAAAAAAAAAAAAAAAAAAAAA"
],
"version": "3.0"
Expand Down
10 changes: 9 additions & 1 deletion schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$schema_created": "2022-08-18T19:36:44+02:00",
"$schema_version": "2.12",
"$schema_version": "2.13",
"additionalProperties": false,
"properties": {
"changelog": {
Expand Down Expand Up @@ -229,6 +229,14 @@
},
"evidence": {
"items": {
"enum": [
"Chemical derivatization",
"Mass spectrometry",
"MS/MS",
"NMR",
"Total synthesis",
"X-ray"
],
"type": "string"
},
"title": "Technique(s) used to elucidate/verify the structure",
Expand Down
30 changes: 18 additions & 12 deletions scripts/add_changelog.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import argparse
from datetime import datetime
import json
import os
from typing import Any, Dict, List
Expand Down Expand Up @@ -43,22 +44,27 @@ def add_changelog(record: Dict[str, Any], release: str, comments: List[str], con
contributors = ["AAAAAAAAAAAAAAAAAAAAAAAA"]

previous = record["changelog"][-1]
new = False

if previous["version"] != release:
new_entry = {
"comments": comments,
"contributors": contributors,
entry = {
"comments": [],
"contributors": [],
"updated_at": [],
"version": release,
}
record["changelog"].append(new_entry)
return

for comment in comments:
if comment not in previous["comments"]:
previous["comments"].append(comment)
for contributor in contributors:
if contributor not in previous["contributors"]:
previous["contributors"].append(contributor)
new = True
else:
entry = previous

assert len(comments) == len(contributors)
for comment, contributor in zip(comments, contributors):
entry["comments"].append(comment)
entry["contributors"].append(contributor)
entry["updated_at"].append(datetime.now().strftime("%Y-%m-%dT%H:%M:%S%:z"))

if new:
record["changelog"].append(entry)

def amend_changelog(record: Dict[str, Any], release: str, comments: List[str], contributors: List[str]) -> None:
entry = record["changelog"][-1]
Expand Down