-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further updates based on discussion in PR #28
* Update logic and logging in archdesc and archdesc > did checks * Update contributors parsing * Update type hinting , docstrings, and logic in create_list_from_mixed_value, create_string_from_mixed_value, and parsed_mixed_value * Update logic in generate_name_identifier_url method * Reformat EAD fixtures * Update missing archdesc unit test names and criteria * Remove get_main_titles unit tests pending refactoring * Update unit test values based on new expected formatting for joined string values * Add unit test and fixture for attribute and subfield variations
- Loading branch information
Showing
8 changed files
with
412 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> <records> <record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <header> <identifier>oai:mit//repositories/2/resources/1</identifier> <datestamp>2021-11-06T14:35:55Z</datestamp> </header> <metadata> <ead xmlns="urn:isbn:1-931666-22-9" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:isbn:1-931666-22-9 http://www.loc.gov/ead/ead.xsd"> <eadheader countryencoding="iso3166-1" dateencoding="iso8601" findaidstatus="completed" langencoding="iso639-2b" repositoryencoding="iso15511"> <eadid countrycode="US" mainagencycode="US-mcm">VC-0002</eadid> </eadheader> <archdesc level="collection"> <did> <unittitle>Charles J. Connick Stained Glass <emph>Foundation <emph>Collection</emph></emph><num>VC.0002</num> </unittitle> <unittitle> Title 2 <num>VC.0002</num> </unittitle> <unittitle>Title 3</unittitle> <origination label="Creator"> <persname authfilenumber="nr99025157" rules="rda" source="naf">Connick, Charles J. <part>(<emph>Charles <emph>Jay</emph></emph>)</part></persname> <persname authfilenumber="nr9902" rules="rda">Author, Unknown</persname> <persname authfilenumber="nr97" source="viaf">Name 2</persname><famname authfilenumber="nr9957" source="snac">Name <part>3</part></famname> <famname>Name 4</famname> </origination> <origination> <persname authfilenumber="nr99025435" source="viaf">Name 5</persname> </origination> </did> </archdesc> </ead> </metadata> </record> </records> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<records> | ||
<record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<header> | ||
<identifier>oai:mit//repositories/2/resources/1</identifier> | ||
<datestamp>2021-11-06T14:35:55Z</datestamp> | ||
</header> | ||
<metadata> | ||
<ead xmlns="urn:isbn:1-931666-22-9" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:isbn:1-931666-22-9 http://www.loc.gov/ead/ead.xsd"> | ||
<eadheader countryencoding="iso3166-1" dateencoding="iso8601" findaidstatus="completed" langencoding="iso639-2b" repositoryencoding="iso15511"> | ||
<eadid countrycode="US" mainagencycode="US-mcm">VC-0002</eadid> | ||
</eadheader> | ||
<archdesc level="collection"> | ||
<did> | ||
<unittitle> | ||
Charles J. Connick Stained Glass | ||
<emph> | ||
Foundation | ||
<emph>Collection</emph> | ||
</emph> | ||
<num>VC.0002</num> | ||
</unittitle> | ||
<unittitle> | ||
Title 2 | ||
<num>VC.0002</num> | ||
</unittitle> | ||
<unittitle>Title 3</unittitle> | ||
<origination label="Creator"> | ||
<persname authfilenumber="nr99025157" rules="rda" source="naf"> | ||
Connick, Charles J. | ||
<part> | ||
( | ||
<emph> | ||
Charles | ||
<emph>Jay</emph> | ||
</emph> | ||
) | ||
</part> | ||
</persname> | ||
<persname authfilenumber="nr97" source="viaf">Name 2</persname> | ||
<famname authfilenumber="nr9957" source="snac"> | ||
Name | ||
<part>3</part> | ||
</famname> | ||
<famname>Name 4</famname> | ||
</origination> | ||
<origination> | ||
<persname authfilenumber="nr99025435" source="viaf">Name 5</persname> | ||
</origination> | ||
</did> | ||
</archdesc> | ||
</ead> | ||
</metadata> | ||
</record> | ||
</records> |
101 changes: 101 additions & 0 deletions
101
tests/fixtures/ead/ead_record_attribute_and_subfield_variations.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<records> | ||
<record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<header> | ||
<identifier>oai:mit//repositories/2/resources/6</identifier> | ||
<datestamp>2021-11-06T14:35:55Z</datestamp> | ||
</header> | ||
<metadata> | ||
<ead xmlns="urn:isbn:1-931666-22-9" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:isbn:1-931666-22-9 http://www.loc.gov/ead/ead.xsd"> | ||
<eadheader countryencoding="iso3166-1" dateencoding="iso8601" findaidstatus="completed" langencoding="iso639-2b" repositoryencoding="iso15511"> | ||
<eadid countrycode="US" mainagencycode="US-mcm">VC-0002</eadid> | ||
</eadheader> | ||
<archdesc level="collection"> | ||
<did> | ||
<unittitle></unittitle> | ||
<unittitle>Title string</unittitle> | ||
<unittitle> | ||
Title | ||
<emph> | ||
with | ||
<emph>XML</emph> | ||
</emph> | ||
<emph></emph> | ||
<num></num> | ||
</unittitle> | ||
<origination></origination> | ||
<origination> | ||
<persname></persname> | ||
<persname>Name with no attributes</persname> | ||
<persname authfilenumber="nr99025157">Name with authfilenumber</persname> | ||
<persname source="naf">Name with source</persname> | ||
<persname authfilenumber="">Name with blank authfilenumber</persname> | ||
<persname source="">Name with blank source</persname> | ||
<persname authfilenumber="nr99025157" source="naf">Name with authfile and source</persname> | ||
<persname authfilenumber="" source="naf">Name with blank authfile and source</persname> | ||
<persname authfilenumber="nr99025157" source="">Name with authfile and blank source</persname> | ||
<persname authfilenumber="" source="">Name with blank authfile and blank source</persname> | ||
<persname authfilenumber="nr99025157" source="naf"> | ||
Contributor | ||
<part> | ||
with | ||
<emph> | ||
X | ||
<emph>M</emph> | ||
</emph> | ||
L | ||
</part> | ||
</persname> | ||
</origination> | ||
<origination label=""> | ||
<persname></persname> | ||
<persname>Name with no attributes</persname> | ||
<persname authfilenumber="nr99025157">Name with authfilenumber</persname> | ||
<persname source="naf">Name with source</persname> | ||
<persname authfilenumber="">Name with blank authfilenumber</persname> | ||
<persname source="">Name with blank source</persname> | ||
<persname authfilenumber="nr99025157" source="naf">Name with authfile and source</persname> | ||
<persname authfilenumber="" source="naf">Name with blank authfile and source</persname> | ||
<persname authfilenumber="nr99025157" source="">Name with authfile and blank source</persname> | ||
<persname authfilenumber="" source="">Name with blank authfile and blank source</persname> | ||
<persname authfilenumber="nr99025157" source="naf"> | ||
Contributor | ||
<part> | ||
with | ||
<emph> | ||
X | ||
<emph>M</emph> | ||
</emph> | ||
L | ||
</part> | ||
</persname> | ||
</origination> | ||
<origination label="Creator"> | ||
<persname></persname> | ||
<persname>Name with no attributes</persname> | ||
<persname authfilenumber="nr99025157">Name with authfilenumber</persname> | ||
<persname source="naf">Name with source</persname> | ||
<persname authfilenumber="">Name with blank authfilenumber</persname> | ||
<persname source="">Name with blank source</persname> | ||
<persname authfilenumber="nr99025157" source="naf">Name with authfile and source</persname> | ||
<persname authfilenumber="" source="naf">Name with blank authfile and source</persname> | ||
<persname authfilenumber="nr99025157" source="">Name with authfile and blank source</persname> | ||
<persname authfilenumber="" source="">Name with blank authfile and blank source</persname> | ||
<persname authfilenumber="nr99025157" source="naf"> | ||
Contributor | ||
<part> | ||
with | ||
<emph> | ||
X | ||
<emph>M</emph> | ||
</emph> | ||
L | ||
</part> | ||
</persname> | ||
</origination> | ||
</did> | ||
</archdesc> | ||
</ead> | ||
</metadata> | ||
</record> | ||
</records> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> <records> <record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <header> <identifier>oai:mit//repositories/2/resources/3</identifier> <datestamp>2021-11-06T14:35:55Z</datestamp> </header> <metadata> <ead> <eadheader></eadheader> <archdesc level="collection"> <did> <unittitle></unittitle> <origination> <persname></persname> </origination> </did> </archdesc> </ead> </metadata> </record> </records> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<records> | ||
<record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<header> | ||
<identifier>oai:mit//repositories/2/resources/2</identifier> | ||
<datestamp>2021-11-06T14:35:55Z</datestamp> | ||
</header> | ||
<metadata> | ||
<ead> | ||
<eadheader></eadheader> | ||
<archdesc level="collection"> | ||
<did> | ||
<unittitle></unittitle> | ||
<origination> | ||
<persname></persname> | ||
</origination> | ||
</did> | ||
</archdesc> | ||
</ead> | ||
</metadata> | ||
</record> | ||
</records> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> <records> <record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <header> <identifier>oai:mit//repositories/2/resources/2</identifier> <datestamp>2021-11-06T14:35:55Z</datestamp> </header> <metadata></metadata> </record> </records> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<records> | ||
<record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<header> | ||
<identifier>oai:mit//repositories/2/resources/4</identifier> | ||
<datestamp>2021-11-06T14:35:55Z</datestamp> | ||
</header> | ||
<metadata></metadata> | ||
</record> | ||
</records> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> <records> <record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <header> <identifier>oai:mit//repositories/2/resources/2</identifier> <datestamp>2021-11-06T14:35:55Z</datestamp> </header> <metadata> <archdesc level="collection"></archdesc> </metadata> </record> </records> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<records> | ||
<record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<header> | ||
<identifier>oai:mit//repositories/2/resources/3</identifier> | ||
<datestamp>2021-11-06T14:35:55Z</datestamp> | ||
</header> | ||
<metadata> | ||
<archdesc level="collection"></archdesc> | ||
</metadata> | ||
</record> | ||
</records> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> <records> <record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <header> <identifier>oai:mit//repositories/2/resources/2</identifier> <datestamp>2021-11-06T14:35:55Z</datestamp> </header> <metadata> <archdesc level="collection"><did></did></archdesc> </metadata> </record> </records> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<records> | ||
<record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<header> | ||
<identifier>oai:mit//repositories/2/resources/5</identifier> | ||
<datestamp>2021-11-06T14:35:55Z</datestamp> | ||
</header> | ||
<metadata> | ||
<archdesc level="collection"> | ||
<did></did> | ||
</archdesc> | ||
</metadata> | ||
</record> | ||
</records> |
Oops, something went wrong.