Expose independent event keys in integrated coverage reports
Metadata integrity checks / metadata (push) Successful in 1m48s
Metadata integrity checks / metadata (push) Successful in 1m48s
This commit is contained in:
@@ -45,6 +45,8 @@ def report(db, registry, *, pg_service=None, pg_schema=None):
|
||||
database, schema = identity[0], identity[1]
|
||||
else:
|
||||
database, schema = str(Path(db).resolve()), None
|
||||
from paper_atlas.db.events import has_event_key
|
||||
event = 'e.event_key' if has_event_key(connection) else "''"
|
||||
latest = _status_counts(connection, latest=True)
|
||||
observations = _status_counts(connection, latest=False)
|
||||
# Aggregate the paper join once for the whole snapshot. Repeating it
|
||||
@@ -73,9 +75,9 @@ def report(db, registry, *, pg_service=None, pg_schema=None):
|
||||
params = (acronym, acronym)
|
||||
editions = []
|
||||
for row in connection.execute('''SELECT e.id,v.id AS venue_id,v.acronym AS canonical_venue,
|
||||
e.year,e.track FROM editions e JOIN venues v ON v.id=e.venue_id
|
||||
e.year,e.track,''' + event + ''' AS event_key FROM editions e JOIN venues v ON v.id=e.venue_id
|
||||
WHERE ''' + scope + '''
|
||||
ORDER BY e.year,e.track,v.acronym''', params):
|
||||
ORDER BY e.year,e.track,event_key,v.acronym,e.id''', params):
|
||||
edition = dict(row)
|
||||
edition.update(edition_counts.get(row['id'], {
|
||||
'submissions': 0, 'papers': 0, 'papers_without_abstract_text': 0}))
|
||||
|
||||
Reference in New Issue
Block a user