Preserve the CoRL 2021 Blue Sky publication track
Metadata integrity checks / metadata (push) Successful in 10m39s
Metadata integrity checks / metadata (push) Successful in 10m39s
This commit is contained in:
@@ -60,6 +60,24 @@ class MetadataTests(unittest.TestCase):
|
||||
self.assertEqual(result['files'][0]['count'], 1)
|
||||
self.assertEqual([row['external_id'] for row in rows], ['v244/paper1'])
|
||||
|
||||
def test_corl_2021_sections_keep_blue_sky_apart_from_contributed_papers(self):
|
||||
config = b'shortname: CoRL\nyear: 2021\nbooktitle: Proceedings of the 5th Conference on Robot Learning\n'
|
||||
paper = '---\nid: {id}\nlayout: inproceedings\ntitle: Paper\nabstract: Abstract\nsection: {section}\n---\n'
|
||||
posts = [('one.md', paper.format(id='one', section='Contributed Papers')),
|
||||
('two.md', paper.format(id='two', section='Blue Sky Papers'))]
|
||||
with tempfile.TemporaryDirectory() as tmp, patch('paper_atlas.collectors.pmlr.fetch', return_value=config), patch(
|
||||
'paper_atlas.collectors.pmlr.metadata_texts', return_value=iter(posts),
|
||||
):
|
||||
result = collect_volume(164, tmp, tmp)
|
||||
self.assertEqual(result['track'], 'mixed')
|
||||
files = {manifest['track']: Path(manifest['file']) for manifest in result['files']}
|
||||
self.assertEqual({key: path.name for key, path in files.items()},
|
||||
{'main': 'pmlr-v164.jsonl', 'blue_sky': 'pmlr-v164-blue_sky.jsonl'})
|
||||
rows = {track: json.loads(path.read_text()) for track, path in files.items()}
|
||||
self.assertEqual([(rows[t]['external_id'], rows[t]['track'], rows[t]['metadata']['pmlr_section'])
|
||||
for t in ('main', 'blue_sky')],
|
||||
[('v164/one', 'main', 'Contributed Papers'), ('v164/two', 'blue_sky', 'Blue Sky Papers')])
|
||||
|
||||
def test_conflicting_duplicate_posts_do_not_replace_previous_collection(self):
|
||||
config=b'shortname: CoRL\nyear: 2023\nbooktitle: CoRL\n'
|
||||
paper='---\nid: paper1\nlayout: inproceedings\ntitle: {title}\nabstract: Abstract\n---\n'
|
||||
|
||||
Reference in New Issue
Block a user