diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-11-21 02:41:16 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-11-21 02:41:16 +0100 |
commit | 4c4f0ed18c269445e89020fc15e3ae07793d2589 (patch) | |
tree | 40737bdef99d2a912507dc6ab73cbeea64204d58 /tests/fixtures | |
parent | 3ab4829870a90d7a3a7c359436776e0a96370ba5 (diff) | |
download | fuzzycat-4c4f0ed18c269445e89020fc15e3ae07793d2589.tar.gz fuzzycat-4c4f0ed18c269445e89020fc15e3ae07793d2589.zip |
tests: find a simple format"
Diffstat (limited to 'tests/fixtures')
-rw-r--r-- | tests/fixtures/7kzrmoajzzedxgdvbltgqihszu | 66 | ||||
-rw-r--r-- | tests/fixtures/README.md | 14 | ||||
-rw-r--r-- | tests/fixtures/bd4crw4p7ber7pzhpoyw2c77bi | 69 | ||||
-rwxr-xr-x | tests/fixtures/verify-entity-download.sh | 16 | ||||
-rw-r--r-- | tests/fixtures/verify.csv | 1 |
5 files changed, 166 insertions, 0 deletions
diff --git a/tests/fixtures/7kzrmoajzzedxgdvbltgqihszu b/tests/fixtures/7kzrmoajzzedxgdvbltgqihszu new file mode 100644 index 0000000..9b586da --- /dev/null +++ b/tests/fixtures/7kzrmoajzzedxgdvbltgqihszu @@ -0,0 +1,66 @@ +{ + "abstracts": [ + { + "content": "The fires Istanbul take an important place in the history of the city. The \"big fire\" that took place on July 6, 1756 is one of them. This fire started in Cibali district of the Golden Horn and spread to the Marmara coast. One third of Istanbul burned in the fire. The districts such as Zeyrek, Vefa, Şehzadebaşı, Fatih, Saraçhane, Aksaray, Laleli, Cerrahpaşa, Atik Ali, Yenikapı and Nişanca were influenced by this fire. Thousands of mansions and houses, hundreds of mils and kilns, mosques, mescids, tekkes, tombs and baths destroyed by burning in the fire. In this study, the information will be given based on sources about how the fire spread, where it effected, which structures it hurt and what the size of the fire was. Furthermore, it will be addressed the socio-economic consequences of the fire in Istanbul.", + "lang": "en", + "mimetype": "text/plain", + "sha1": "7ecae8cd5ecf4be9562d9c111790ead520d66ff8" + } + ], + "contribs": [ + { + "creator_id": "vabvzot2una3hofkorira6jo4e", + "given_name": "Fatih", + "index": 0, + "raw_affiliation": "Tekirdağ Namık Kemal Üniversitesi, İlahiyat Fakültesi, İslam Tarihi Anabilim Dalı", + "raw_name": "Fatih Köse", + "role": "author", + "surname": "Köse" + } + ], + "ext_ids": { + "doi": "10.5281/zenodo.3463853" + }, + "extra": { + "datacite": { + "license": [ + { + "rights": "Creative Commons Attribution 4.0 International", + "rightsUri": "http://creativecommons.org/licenses/by/4.0/legalcode" + }, + { + "rights": "Open Access", + "rightsUri": "info:eu-repo/semantics/openAccess" + } + ], + "relations": [ + { + "relatedIdentifier": "10.5281/zenodo.3463852", + "relatedIdentifierType": "DOI", + "relationType": "IsVersionOf" + } + ], + "resourceType": "Journal article", + "resourceTypeGeneral": "Text", + "subjects": [ + { + "subject": "İstanbul, Cibali, Yangın, 1756 yangını" + } + ] + }, + "release_month": 9 + }, + "ident": "7kzrmoajzzedxgdvbltgqihszu", + "language": "tr", + "license_slug": "CC-BY", + "publisher": "Zenodo", + "refs": [], + "release_date": "2019-09-28", + "release_stage": "published", + "release_type": "article-journal", + "release_year": 2019, + "revision": "9cef6e9b-b0ab-4b09-a219-4126acc91e4c", + "state": "active", + "title": "1756 İstanbul Yangını", + "work_id": "bdt5htqy6bazfkomz5ucirlagm" +} diff --git a/tests/fixtures/README.md b/tests/fixtures/README.md new file mode 100644 index 0000000..0418526 --- /dev/null +++ b/tests/fixtures/README.md @@ -0,0 +1,14 @@ +# Fixtures + +Put all data files used as inputs and output here. The wiring can happen in +code or in a TSV file (for general editing). + +## verify.csv + +This file contains four columns: match status, reason, and two identifiers. + +```tsv +Status.STRONG OK.SLUG_TITLE_AUTHOR_MATCH 7kzrmoajzzedxgdvbltgqihszu bd4crw4p7ber7pzhpoyw2c77bi +``` + + diff --git a/tests/fixtures/bd4crw4p7ber7pzhpoyw2c77bi b/tests/fixtures/bd4crw4p7ber7pzhpoyw2c77bi new file mode 100644 index 0000000..afee2d5 --- /dev/null +++ b/tests/fixtures/bd4crw4p7ber7pzhpoyw2c77bi @@ -0,0 +1,69 @@ +{ + "abstracts": [ + { + "sha1": "7ecae8cd5ecf4be9562d9c111790ead520d66ff8", + "content": "The fires Istanbul take an important place in the history of the city. The \"big fire\" that took place on July 6, 1756 is one of them. This fire started in Cibali district of the Golden Horn and spread to the Marmara coast. One third of Istanbul burned in the fire. The districts such as Zeyrek, Vefa, Şehzadebaşı, Fatih, Saraçhane, Aksaray, Laleli, Cerrahpaşa, Atik Ali, Yenikapı and Nişanca were influenced by this fire. Thousands of mansions and houses, hundreds of mils and kilns, mosques, mescids, tekkes, tombs and baths destroyed by burning in the fire. In this study, the information will be given based on sources about how the fire spread, where it effected, which structures it hurt and what the size of the fire was. Furthermore, it will be addressed the socio-economic consequences of the fire in Istanbul.", + "mimetype": "text/plain", + "lang": "en" + } + ], + "refs": [], + "contribs": [ + { + "index": 0, + "creator_id": "vabvzot2una3hofkorira6jo4e", + "raw_name": "Fatih Köse", + "given_name": "Fatih", + "surname": "Köse", + "role": "author", + "raw_affiliation": "Tekirdağ Namık Kemal Üniversitesi, İlahiyat Fakültesi, İslam Tarihi Anabilim Dalı" + } + ], + "license_slug": "CC-BY", + "language": "tr", + "publisher": "Zenodo", + "ext_ids": { + "doi": "10.5281/zenodo.3463852" + }, + "release_year": 2019, + "release_date": "2019-09-28", + "release_stage": "published", + "release_type": "article-journal", + "webcaptures": [], + "filesets": [], + "files": [], + "work_id": "b6y47d6kivcizjgnlca3vkcofq", + "title": "1756 İstanbul Yangını", + "state": "active", + "ident": "bd4crw4p7ber7pzhpoyw2c77bi", + "revision": "b40aed5f-7c65-4cf4-956a-53cd29e963dd", + "extra": { + "datacite": { + "license": [ + { + "rights": "Creative Commons Attribution 4.0 International", + "rightsUri": "http://creativecommons.org/licenses/by/4.0/legalcode" + }, + { + "rights": "Open Access", + "rightsUri": "info:eu-repo/semantics/openAccess" + } + ], + "relations": [ + { + "relatedIdentifier": "10.5281/zenodo.3463853", + "relatedIdentifierType": "DOI", + "relationType": "HasVersion" + } + ], + "resourceType": "Journal article", + "resourceTypeGeneral": "Text", + "subjects": [ + { + "subject": "İstanbul, Cibali, Yangın, 1756 yangını" + } + ] + }, + "release_month": 9 + } +} diff --git a/tests/fixtures/verify-entity-download.sh b/tests/fixtures/verify-entity-download.sh new file mode 100755 index 0000000..5f68ba2 --- /dev/null +++ b/tests/fixtures/verify-entity-download.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Fetches release entities references in VERIFY. + +set -e -u +set -o pipefail + +API="https://api.fatcat.wiki/v0" +CSV="verify.csv" + +for ident in $(awk '{print $3"\n"$4}' "$CSV"); do + if [ -f "$ident" ]; then + continue + fi + curl -sL --fail "$API/release/$ident" | jq --sort-keys . >"$ident" +done diff --git a/tests/fixtures/verify.csv b/tests/fixtures/verify.csv new file mode 100644 index 0000000..344ac02 --- /dev/null +++ b/tests/fixtures/verify.csv @@ -0,0 +1 @@ +Status.STRONG,OK.SLUG_TITLE_AUTHOR_MATCH,7kzrmoajzzedxgdvbltgqihszu,bd4crw4p7ber7pzhpoyw2c77bi |