Package Paper Atlas with organized modules and a unified CLI
Metadata integrity checks / metadata (push) Successful in 1m12s

This commit is contained in:
2026-11-06 17:32:24 +08:00
parent dc7be9d6a4
commit 1c18cbe03a
62 changed files with 835 additions and 518 deletions
+17 -3
View File
@@ -26,10 +26,24 @@ jobs:
root = pathlib.Path(tmp)
with tarfile.open(fileobj=io.BytesIO(archive), mode='r:gz') as tar:
tar.extractall(root, filter='data')
candidates = list(root.glob('*/test_import_arxiv.py'))
candidates = list(root.glob('*/pyproject.toml'))
if len(candidates)!=1:
raise SystemExit('Unexpected repository archive layout')
src = candidates[0].parent
subprocess.run(['python3','-B','-m','unittest','discover','-v'],cwd=src,check=True)
subprocess.run(['python3','-B','query.py','--help'],cwd=src,check=True)
subprocess.run(['python3','-B','-m','unittest','discover','-s','tests','-t','.','-v'],cwd=src,check=True)
# Build and installation checks run only on the approved remote runner.
venv = root / 'venv'
subprocess.run(['python3','-B','-m','venv','--system-site-packages',str(venv)],check=True)
python = str(venv / 'bin/python')
wheels = root / 'wheels'
subprocess.run([python,'-B','-m','pip','wheel','--no-deps','--wheel-dir',str(wheels),str(src)],check=True)
wheel, = wheels.glob('paper_atlas-*.whl')
subprocess.run([python,'-B','-m','pip','install','--no-deps',str(wheel)],check=True)
outside = root / 'outside-checkout'
outside.mkdir()
subprocess.run([str(venv/'bin/paper-atlas'),'--help'],cwd=outside,check=True)
subprocess.run([python,'-I','-B','-m','paper_atlas','collect','cvf','--help'],cwd=outside,check=True)
smoke = "from paper_atlas.db.store import Store; from paper_atlas.config import DEFAULT_REGISTRY; import json; assert len(json.loads(DEFAULT_REGISTRY.read_text())['venues'])==41; s=Store('installed.sqlite'); s.conn.close()"
subprocess.run([python,'-I','-B','-c',smoke],cwd=outside,check=True)
subprocess.run([python,'-I','-B','-m','paper_atlas','query','--db','installed.sqlite','--stats'],cwd=outside,check=True)
PY