Inventory KDD 2026 programme cycles and withdrawal evidence
Metadata integrity checks / metadata (push) Successful in 8m7s
Metadata integrity checks / metadata (push) Successful in 8m7s
This commit is contained in:
@@ -35,6 +35,7 @@ COMMANDS = {
|
||||
('collect','icaps2026-program'): ('paper_atlas.collectors.icaps2026', {}, '核验 ICAPS 2026 官方录用名单并分开既有论文展示'),
|
||||
('collect','rss2026-proceedings'): ('paper_atlas.collectors.rss2026', {}, '核验 RSS 2026 官方论文集与独立录用表'),
|
||||
('collect','recsys2026-program'): ('paper_atlas.collectors.recsys2026', {}, '核验 RecSys 2026 公开录用贡献并保留 DOI 来源版本'),
|
||||
('collect','kdd2026-program'): ('paper_atlas.collectors.kdd2026', {}, '核对 KDD 2026 两个投稿周期、分轨及撤回更换标注'),
|
||||
('collect','mm2026-program'): ('paper_atlas.collectors.mm2026', {}, '恢复 MM 2026 全部来源 track 与重复展示上下文,待贡献和身份核查'),
|
||||
('collect','mm2026-publications'): ('paper_atlas.collectors.mm_publications2026', {}, '核验 MM 2026 全部注册出版条目并分别保留节目分轨、摘要与版本差异'),
|
||||
('collect','cvf'): ('paper_atlas.collectors.vision', {'source':'cvf'}, 'CVPR / ICCV 官方开放目录'),
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
"""Inventory KDD 2026 programme DOI, cycle and track observations."""
|
||||
import argparse
|
||||
from collections import Counter
|
||||
from hashlib import sha256
|
||||
from html.parser import HTMLParser
|
||||
import json
|
||||
from pathlib import Path
|
||||
import re
|
||||
|
||||
SOURCE_URL = 'https://kdd2026.kdd.org/papers/'
|
||||
CYCLES = {1: 'july', 2: 'february'}
|
||||
TRACKS = {
|
||||
'rtp': 'research', 'ads': 'applied_data_science', 'dtb': 'datasets_and_benchmarks',
|
||||
'ais': 'ai_for_sciences', 'bsi': 'blue_sky_ideas',
|
||||
}
|
||||
DOI_URL = re.compile(r'https://doi\.org/(10\.1145/\d+\.\d+)')
|
||||
WITHDRAWN = re.compile(
|
||||
r'^\*\*WITHDRAWN/New SUBMISSION ID for Authorship Order Change (\d{1,2}/\d{1,2}/26) -- (.+)$'
|
||||
)
|
||||
OTHER_STATUS = re.compile(r'^[*\[(!#\s]*(?:withdrawn|rejected|desk[\s_-]+rejected|retracted|cancell?ed)\b', re.I)
|
||||
|
||||
|
||||
class ProgrammeScripts(HTMLParser):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.current = None
|
||||
self.scripts = []
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
if tag == 'script' and 'src' not in dict(attrs):
|
||||
self.current = []
|
||||
|
||||
def handle_data(self, data):
|
||||
if self.current is not None:
|
||||
self.current.append(data)
|
||||
|
||||
def handle_endtag(self, tag):
|
||||
if tag == 'script' and self.current is not None:
|
||||
self.scripts.append(''.join(self.current))
|
||||
self.current = None
|
||||
|
||||
|
||||
def cycle_rows(scripts, cycle):
|
||||
pattern = re.compile(r'\bconst\s+cycle' + str(cycle) + r'Papers\s*=\s*(\[)')
|
||||
matches = [(code, match) for code in scripts for match in pattern.finditer(code)]
|
||||
if len(matches) != 1:
|
||||
raise ValueError(f'Expected one KDD programme array for cycle {cycle}')
|
||||
code, match = matches[0]
|
||||
body = code[match.start(1):]
|
||||
rows, consumed = json.JSONDecoder().raw_decode(body)
|
||||
if not rows or not body[consumed:].lstrip().startswith('.map((paper, index)'):
|
||||
raise ValueError(f'Unexpected KDD programme array boundary for cycle {cycle}')
|
||||
return rows
|
||||
|
||||
|
||||
def inventory(raw):
|
||||
parser = ProgrammeScripts()
|
||||
parser.feed(raw.decode('utf-8'))
|
||||
parser.close()
|
||||
records = {}
|
||||
source_counts = {}
|
||||
for cycle, cycle_name in CYCLES.items():
|
||||
rows = cycle_rows(parser.scripts, cycle)
|
||||
source_counts[cycle_name] = Counter()
|
||||
for row in rows:
|
||||
if (not isinstance(row, dict) or row.keys() != {'track', 'title', 'url', 'authors'}
|
||||
or not all(isinstance(value, str) for value in row.values())
|
||||
or row['track'] not in TRACKS or not row['title'].strip()):
|
||||
raise ValueError('Unexpected KDD programme row')
|
||||
match = DOI_URL.fullmatch(row['url'])
|
||||
if not match:
|
||||
raise ValueError('Invalid DOI link in KDD programme')
|
||||
doi = match[1]
|
||||
track = TRACKS[row['track']]
|
||||
source_counts[cycle_name][track] += 1
|
||||
row_hash = sha256(json.dumps(row, sort_keys=True, ensure_ascii=False).encode()).hexdigest()
|
||||
if doi in records:
|
||||
entry = records[doi]
|
||||
if (entry['cycle'], entry['source_row_sha256']) != (cycle_name, row_hash):
|
||||
raise ValueError('Conflicting duplicate DOI in KDD programme: ' + doi)
|
||||
entry['occurrences'] += 1
|
||||
continue
|
||||
status = 'listed'
|
||||
withdrawn = WITHDRAWN.fullmatch(row['title'])
|
||||
if withdrawn:
|
||||
status = 'withdrawn_with_replacement_mentioned'
|
||||
elif OTHER_STATUS.match(row['title']):
|
||||
raise ValueError('Unrecognized status annotation in KDD programme: ' + doi)
|
||||
records[doi] = {
|
||||
'doi': doi, 'doi_url': row['url'], 'source_title': row['title'],
|
||||
'title': withdrawn[2] if withdrawn else row['title'],
|
||||
'cycle': cycle_name, 'track': track, 'programme_status': status,
|
||||
'authors_listed': bool(row['authors'].strip()), 'occurrences': 1,
|
||||
'source_row_sha256': row_hash,
|
||||
}
|
||||
if withdrawn:
|
||||
records[doi]['source_withdrawal_date_literal'] = withdrawn[1]
|
||||
ordered = [records[doi] for doi in sorted(records)]
|
||||
return ordered, source_counts
|
||||
|
||||
|
||||
def collect(snapshot, expected_sha256, out):
|
||||
snapshot = Path(snapshot)
|
||||
with snapshot.open('rb') as stream:
|
||||
raw = stream.read(4_000_001)
|
||||
if len(raw) > 4_000_000 or sha256(raw).hexdigest() != expected_sha256:
|
||||
raise ValueError('KDD programme snapshot hash or size differs')
|
||||
rows, cycle_counts = inventory(raw)
|
||||
result = {
|
||||
'source': SOURCE_URL, 'snapshot_sha256': expected_sha256,
|
||||
'source_rows_by_cycle_and_track': cycle_counts, 'unique_dois': len(rows),
|
||||
'identical_repeat_rows': sum(row['occurrences'] - 1 for row in rows),
|
||||
'programme_status_counts': Counter(row['programme_status'] for row in rows),
|
||||
'records': rows, 'database_written': False,
|
||||
}
|
||||
with Path(out).open('x', encoding='utf-8') as stream:
|
||||
json.dump(result, stream, ensure_ascii=False, indent=2)
|
||||
stream.write('\n')
|
||||
return result
|
||||
|
||||
|
||||
def main(argv=None, *, prog=None):
|
||||
parser = argparse.ArgumentParser(prog=prog)
|
||||
parser.add_argument('--snapshot', required=True)
|
||||
parser.add_argument('--snapshot-sha256', required=True)
|
||||
parser.add_argument('--out', required=True)
|
||||
args = parser.parse_args(argv)
|
||||
result = collect(args.snapshot, args.snapshot_sha256, args.out)
|
||||
print(json.dumps({k: result[k] for k in ('unique_dois', 'identical_repeat_rows', 'programme_status_counts')}))
|
||||
Reference in New Issue
Block a user