Collect official ICLR programs with presentation identity checks
Metadata integrity checks / metadata (push) Successful in 3s
Metadata integrity checks / metadata (push) Successful in 3s
This commit is contained in:
@@ -109,6 +109,22 @@ class Store:
|
||||
c.execute('INSERT OR IGNORE INTO match_candidates VALUES(?,?,?,?,?,?)',(min(paper,other),max(paper,other),'exact_title_unconfirmed',None,json.dumps({'title':title}), 'pending'))
|
||||
return paper,record
|
||||
|
||||
def record_tags(self,paper,record,source,tags):
|
||||
"""Refresh this record's platform tags without removing other evidence."""
|
||||
values=set()
|
||||
for tag in tags:
|
||||
namespace,value=tag['namespace'],tag['value']
|
||||
if not isinstance(namespace,str) or not namespace.startswith(source+':') or not isinstance(value,str) or not value.strip():
|
||||
raise ValueError('Platform tag must have its own source namespace and a nonempty text value')
|
||||
values.add((namespace,value.strip()))
|
||||
evidence=f'{source}:record:{record}:tags'
|
||||
c=self.conn
|
||||
c.execute('DELETE FROM paper_tags WHERE source_record_id=? AND evidence_key=?',(record,evidence))
|
||||
for namespace,value in sorted(values):
|
||||
c.execute('INSERT OR IGNORE INTO tags(namespace,value) VALUES(?,?)',(namespace,value))
|
||||
tag=c.execute('SELECT id FROM tags WHERE namespace=? AND value=?',(namespace,value)).fetchone()[0]
|
||||
c.execute('INSERT OR IGNORE INTO paper_tags VALUES(?,?,?,?)',(paper,tag,record,evidence))
|
||||
|
||||
def decision(self,paper,record,venue,year,track,external_id,url,status,raw_value,aliases=None):
|
||||
c = self.conn
|
||||
c.execute("INSERT OR IGNORE INTO venues(acronym,name,field,venue_type) VALUES(?,?,?,'conference')",(venue,venue,'unclassified'))
|
||||
|
||||
Reference in New Issue
Block a user