Skip to content

Add book section serialization to bibtex #5836

Add book section serialization to bibtex

Add book section serialization to bibtex #5836

Triggered via pull request January 6, 2025 22:47
Status Failure
Total duration 27m 11s
Artifacts

tests.yml

on: pull_request
Matrix: JS / Tests
Matrix: Python / Tests
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 2 warnings
Python / Tests (3.9, postgresql14, opensearch2): tests/resources/serializers/test_bibtex_serializer.py#L1
Black format check --- /home/runner/work/invenio-rdm-records/invenio-rdm-records/tests/resources/serializers/test_bibtex_serializer.py 2025-01-06 22:47:36.491845+00:00 +++ /home/runner/work/invenio-rdm-records/invenio-rdm-records/tests/resources/serializers/test_bibtex_serializer.py 2025-01-06 22:58:32.974274+00:00 @@ -192,21 +192,20 @@ " month = mar,", "}", ] ) + def test_serialize_publication_booksection(running_app, updated_minimal_record): """Test bibtex formatter for a section of a book. It serializes into `incollection` based on - incollection - inbook """ - updated_minimal_record["metadata"]["resource_type"][ - "id" - ] = "publication-section" + updated_minimal_record["metadata"]["resource_type"]["id"] = "publication-section" # Force serialization into 'inproceedings' updated_minimal_record.update( {"custom_fields": {"imprint:imprint": {"title": "book title"}}} ) @@ -245,10 +244,11 @@ "}", ] ) assert serialized_record == expected_data + def test_serialize_publication_book(running_app, updated_minimal_record): """Test bibtex formatter for books. It serializes into the following formats, depending on the data:
Python / Tests (3.9, postgresql14, opensearch2): tests/resources/serializers/test_bibtex_serializer.py#L249
test_serialize_publication_booksection AssertionError: assert '@misc{brown_...Acme Inc},\n}' == '@inBook{brow... = mar,\n}' - @inBook{brown_2023_abcde-fghij, ? ^^^^^ + @misc{brown_2023_abcde-fghij, ? + ^^ author = {Name and Troy Inc.}, title = {A Romans story}, + month = mar, year = 2023, publisher = {Acme Inc}, - month = mar, }
Python / Tests (3.9, postgresql14, opensearch2)
Process completed with exit code 1.
Python / Tests (3.12, postgresql14, opensearch2): tests/resources/serializers/test_bibtex_serializer.py#L1
Black format check --- /home/runner/work/invenio-rdm-records/invenio-rdm-records/tests/resources/serializers/test_bibtex_serializer.py 2025-01-06 22:47:36.371330+00:00 +++ /home/runner/work/invenio-rdm-records/invenio-rdm-records/tests/resources/serializers/test_bibtex_serializer.py 2025-01-06 23:00:11.235818+00:00 @@ -192,21 +192,20 @@ " month = mar,", "}", ] ) + def test_serialize_publication_booksection(running_app, updated_minimal_record): """Test bibtex formatter for a section of a book. It serializes into `incollection` based on - incollection - inbook """ - updated_minimal_record["metadata"]["resource_type"][ - "id" - ] = "publication-section" + updated_minimal_record["metadata"]["resource_type"]["id"] = "publication-section" # Force serialization into 'inproceedings' updated_minimal_record.update( {"custom_fields": {"imprint:imprint": {"title": "book title"}}} ) @@ -245,10 +244,11 @@ "}", ] ) assert serialized_record == expected_data + def test_serialize_publication_book(running_app, updated_minimal_record): """Test bibtex formatter for books. It serializes into the following formats, depending on the data:
Python / Tests (3.12, postgresql14, opensearch2): tests/resources/serializers/test_bibtex_serializer.py#L249
test_serialize_publication_booksection AssertionError: assert '@misc{brown_...Acme Inc},\n}' == '@inBook{brow... = mar,\n}' - @inBook{brown_2023_abcde-fghij, ? ^^^^^ + @misc{brown_2023_abcde-fghij, ? + ^^ author = {Name and Troy Inc.}, title = {A Romans story}, + month = mar, year = 2023, publisher = {Acme Inc}, - month = mar, }
Python / Tests (3.12, postgresql14, opensearch2)
Process completed with exit code 1.