From 5ca7c5b28300b62e8c18431ded05bc7400be2e62 Mon Sep 17 00:00:00 2001 From: Kaisa Kuivalahti Date: Thu, 9 Jan 2025 17:00:48 +0200 Subject: [PATCH 1/3] EKIR-206 Add rules for missing fiction genres --- core/classifier/bisac.py | 53 +++++++++ tests/core/classifiers/test_bisac.py | 157 +++++++++++++++++++++++++++ 2 files changed, 210 insertions(+) diff --git a/core/classifier/bisac.py b/core/classifier/bisac.py index e3b2ceb0f..030f59442 100644 --- a/core/classifier/bisac.py +++ b/core/classifier/bisac.py @@ -564,6 +564,7 @@ class BISACClassifier(Classifier): m(Horror, fiction, "Vampires"), m(Horror, fiction, "Werewolves & Shifters"), m(Horror, fiction, "Zombies"), + m(Humorous_Fiction, fiction, "Absurdist"), m(Humorous_Fiction, fiction, "Humorous Stories"), m(Humorous_Nonfiction, "Young Adult Nonfiction", "Humor"), m(Law, nonfiction, "Law & Crime"), @@ -597,6 +598,58 @@ class BISACClassifier(Classifier): # well for now. # For nonfiction, "Social Topics" covers both Juvenile and YA. m(Life_Strategies, nonfiction, social_topics), + m(General_Fiction, fiction, "Adaptations & Pastiche"), + m(General_Fiction, fiction, "African American & Black"), + m(General_Fiction, fiction, "Amish & Mennonite"), + m(General_Fiction, fiction, "Animals"), + m(General_Fiction, fiction, "Asian American & Pacific Islander"), + m(General_Fiction, fiction, "Biographical"), + m(General_Fiction, fiction, "Buddhist"), + m(Urban_Fiction, fiction, "City Life"), + m(General_Fiction, fiction, "Coming of Age"), + m(Folklore, fiction, "Cultural Heritage"), + m(General_Fiction, fiction, "Disabilities"), + m(General_Fiction, fiction, "Disaster"), + m(General_Fiction, fiction, "Diversity & Multicultural"), + m(General_Fiction, fiction, "Epistolary"), + m(General_Fiction, fiction, "Family Life"), + m(General_Fiction, fiction, "Feminist"), + m(General_Fiction, fiction, "Friendship"), + m(Urban_Fiction, fiction, "Hispanic & Latino", "Urban & Street Lit"), + m(General_Fiction, fiction, "Hispanic & Latino"), + m(General_Fiction, fiction, "Holidays"), + m(General_Fiction, fiction, "Immigration"), + m(Urban_Fiction, fiction, "Indigenous", "City Life"), + m(Science_Fiction, fiction, "Indigenous", "Indigenous Futurism"), + m(Folklore, fiction, "Indigenous", "Oral Storytelling & Teachings"), + m(General_Fiction, fiction, "Indigenous"), + m(General_Fiction, fiction, "Indigenous Peoples of Turtle Island"), + m(General_Fiction, fiction, "Legal"), + m(General_Fiction, fiction, "Mashups"), + m(General_Fiction, fiction, "Media Tie-In"), + m(General_Fiction, fiction, "Medical"), + m(General_Fiction, fiction, "Middle Eastern & Arab American"), + m(General_Fiction, fiction, "Multiple Timelines"), + m(General_Fiction, fiction, "Muslim"), + m(General_Fiction, fiction, "Native American"), + m(General_Fiction, fiction, "Nature & the Environment"), + m(General_Fiction, fiction, "Neurodiversity"), + m(General_Fiction, fiction, "Own Voices"), + m(General_Fiction, fiction, "Performing Arts"), + m(General_Fiction, fiction, "Political"), + m(General_Fiction, fiction, "Psychological"), + m(General_Fiction, fiction, "Small Town & Rural"), + m(General_Fiction, fiction, "Southern"), + m(General_Fiction, fiction, "Sports"), + m(General_Fiction, fiction, "Suburban"), + m(Urban_Fiction, fiction, "Urban & Street Lit"), + m(General_Fiction, fiction, "Women"), + m(Historical_Fiction, fiction, "World Literature", something, "Colonial & Revolutionary Periods"), + m(Historical_Fiction, fiction, "World Literature", something, "Colonial & 19th Century"), + m(Historical_Fiction, fiction, "World Literature", something, "16th & 17th Century"), + m(Historical_Fiction, fiction, "World Literature", something, "18th Century"), + m(Historical_Fiction, fiction, "World Literature", something, "19th Century"), + m(General_Fiction, fiction, "World Literature"), ] @classmethod diff --git a/tests/core/classifiers/test_bisac.py b/tests/core/classifiers/test_bisac.py index 7ea903fc8..f71738718 100644 --- a/tests/core/classifiers/test_bisac.py +++ b/tests/core/classifiers/test_bisac.py @@ -250,6 +250,161 @@ def test_genre_spot_checks(self): genre_is("JUVENILE FICTION / Dystopian", "Dystopian SF") genre_is("JUVENILE FICTION / Stories in Verse (see also Poetry)", "Poetry") + # These tests cover the missing rules for new BISAC codes + genre_is("FICTION / Absurdist", "Humorous Fiction") + genre_is("FICTION / Adaptations & Pastiche", "General Fiction") + genre_is("FICTION / African American & Black / General", "General Fiction") + genre_is("FICTION / African American & Black / Women", "General Fiction") + genre_is("FICTION / Amish & Mennonite", "General Fiction") + genre_is("FICTION / Animals", "General Fiction") + genre_is("FICTION / Asian American & Pacific Islander", "General Fiction") + genre_is("FICTION / Biographical", "General Fiction") + genre_is("FICTION / Buddhist", "General Fiction") + genre_is("FICTION / City Life", "Urban Fiction") + genre_is("FICTION / Coming of Age", "General Fiction") + genre_is("FICTION / Cultural Heritage", "Folklore") + genre_is("FICTION / Disabilities", "General Fiction") + genre_is("FICTION / Disaster", "General Fiction") + genre_is("FICTION / Diversity & Multicultural", "General Fiction") + genre_is("FICTION / Epistolary", "General Fiction") + genre_is("FICTION / Family Life / General", "General Fiction") + genre_is("FICTION / Family Life / Marriage & Divorce", "General Fiction") + genre_is("FICTION / Family Life / Siblings", "General Fiction") + genre_is("FICTION / Feminist", "General Fiction") + genre_is("FICTION / Friendship", "General Fiction") + genre_is("FICTION / Hispanic & Latino / Family Life", "General Fiction") + genre_is("FICTION / Hispanic & Latino / General", "General Fiction") + genre_is("FICTION / Hispanic & Latino / Inspirational", "General Fiction") + genre_is("FICTION / Hispanic & Latino / Urban & Street Lit", "Urban Fiction") + genre_is("FICTION / Hispanic & Latino / Women", "General Fiction") + genre_is("FICTION / Holidays", "General Fiction") + genre_is("FICTION / Immigration", "General Fiction") + genre_is("FICTION / Indigenous / General (see also Indigenous Peoples of Turtle Island or Native American)", "General Fiction") + genre_is("FICTION / Indigenous / City Life", "Urban Fiction") + genre_is("FICTION / Indigenous / Elders", "General Fiction") + genre_is("FICTION / Indigenous / Family Life", "General Fiction") + genre_is("FICTION / Indigenous / Indigenous Futurism", "Science Fiction") + genre_is("FICTION / Indigenous / Life Stories", "General Fiction") + genre_is("FICTION / Indigenous / Oral Storytelling & Teachings", "Folklore") + genre_is("FICTION / Indigenous / Women", "General Fiction") + genre_is("FICTION / Indigenous / Indigenous Peoples of Turtle Island", "General Fiction") + genre_is("FICTION / Legal", "General Fiction") + genre_is("FICTION / Mashups", "General Fiction") + genre_is("FICTION / Media Tie-In", "General Fiction") + genre_is("FICTION / Medical", "General Fiction") + genre_is("FICTION / Middle Eastern & Arab American", "General Fiction") + genre_is("FICTION / Multiple Timelines", "General Fiction") + genre_is("FICTION / Muslim", "General Fiction") + genre_is("FICTION / Native American", "General Fiction") + genre_is("FICTION / Nature & the Environment", "General Fiction") + genre_is("FICTION / Neurodiversity", "General Fiction") + genre_is("FICTION / Own Voices", "General Fiction") + genre_is("FICTION / Performing Arts / General", "General Fiction") + genre_is("FICTION / Performing Arts / Dance, Theater & Musicals", "General Fiction") + genre_is("FICTION / Performing Arts / Film, Television & Radio", "General Fiction") + genre_is("FICTION / Performing Arts / Music", "General Fiction") + genre_is("FICTION / Political", "General Fiction") + genre_is("FICTION / Psychological", "General Fiction") + genre_is("FICTION / Small Town & Rural", "General Fiction") + genre_is("FICTION / Southern", "General Fiction") + genre_is("FICTION / Sports", "General Fiction") + genre_is("FICTION / Suburban", "General Fiction") + genre_is("FICTION / Urban & Street Lit", "Urban Fiction") + genre_is("FICTION / Women", "General Fiction") + genre_is("FICTION / World Literature / Africa / East Africa", "General Fiction") + genre_is("FICTION / World Literature / Africa / General", "General Fiction") + genre_is("FICTION / World Literature / Africa / Nigeria", "General Fiction") + genre_is("FICTION / World Literature / Africa / Southern Africa", "General Fiction") + genre_is("FICTION / World Literature / Africa / West Africa", "General Fiction") + genre_is("FICTION / World Literature / American / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / American / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / American / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / American / Colonial & Revolutionary Periods", "Historical Fiction") + genre_is("FICTION / World Literature / American / General", "General Fiction") + genre_is("FICTION / World Literature / Argentina", "General Fiction") + genre_is("FICTION / World Literature / Asia (General)", "General Fiction") + genre_is("FICTION / World Literature / Australia", "General Fiction") + genre_is("FICTION / World Literature / Austria", "General Fiction") + genre_is("FICTION / World Literature / Brazil", "General Fiction") + genre_is("FICTION / World Literature / Canada / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / Canada / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / Canada / Colonial & 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / Canada / General", "General Fiction") + genre_is("FICTION / World Literature / Caribbean & West Indies", "General Fiction") + genre_is("FICTION / World Literature / Central America", "General Fiction") + genre_is("FICTION / World Literature / Central Asia", "General Fiction") + genre_is("FICTION / World Literature / Chile", "General Fiction") + genre_is("FICTION / World Literature / China / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / China / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / China / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / China / General", "General Fiction") + genre_is("FICTION / World Literature / Colombia", "General Fiction") + genre_is("FICTION / World Literature / Czech Republic", "General Fiction") + genre_is("FICTION / World Literature / Denmark", "General Fiction") + genre_is("FICTION / World Literature / England / 16th & 17th Century", "Historical Fiction") + genre_is("FICTION / World Literature / England / 18th Century", "Historical Fiction") + genre_is("FICTION / World Literature / England / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / England / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / England / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / England / Early & Medieval Periods", "General Fiction") + genre_is("FICTION / World Literature / England / General", "General Fiction") + genre_is("FICTION / World Literature / Europe (General)", "General Fiction") + genre_is("FICTION / World Literature / Finland", "General Fiction") + genre_is("FICTION / World Literature / France / 18th Century", "Historical Fiction") + genre_is("FICTION / World Literature / France / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / France / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / France / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / France / General", "General Fiction") + genre_is("FICTION / World Literature / Germany / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / Germany / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / Germany / General", "General Fiction") + genre_is("FICTION / World Literature / Greece", "General Fiction") + genre_is("FICTION / World Literature / Hungary", "General Fiction") + genre_is("FICTION / World Literature / India / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / India / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / India / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / India / General", "General Fiction") + genre_is("FICTION / World Literature / Ireland / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / Ireland / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / Ireland / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / Ireland / General", "General Fiction") + genre_is("FICTION / World Literature / Italy", "General Fiction") + genre_is("FICTION / World Literature / Japan", "General Fiction") + genre_is("FICTION / World Literature / Korea", "General Fiction") + genre_is("FICTION / World Literature / Mexico", "General Fiction") + genre_is("FICTION / World Literature / Middle East / Arabian Peninsula", "General Fiction") + genre_is("FICTION / World Literature / Middle East / Egypt & North Africa", "General Fiction") + genre_is("FICTION / World Literature / Middle East / General", "General Fiction") + genre_is("FICTION / World Literature / Middle East / Israel", "General Fiction") + genre_is("FICTION / World Literature / Netherlands", "General Fiction") + genre_is("FICTION / World Literature / New Zealand", "General Fiction") + genre_is("FICTION / World Literature / Norway", "General Fiction") + genre_is("FICTION / World Literature / Oceania", "General Fiction") + genre_is("FICTION / World Literature / Pakistan", "General Fiction") + genre_is("FICTION / World Literature / Peru", "General Fiction") + genre_is("FICTION / World Literature / Poland", "General Fiction") + genre_is("FICTION / World Literature / Portugal", "General Fiction") + genre_is("FICTION / World Literature / Russia / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / Russia / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / Russia / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / Russia / General", "General Fiction") + genre_is("FICTION / World Literature / Scotland / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / Scotland / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / Scotland / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / Scotland / General", "General Fiction") + genre_is("FICTION / World Literature / South America (General)", "General Fiction") + genre_is("FICTION / World Literature / Southeast Asia", "General Fiction") + genre_is("FICTION / World Literature / Spain / 19th Century", "Historical Fiction") + genre_is("FICTION / World Literature / Spain / 20th Century", "General Fiction") + genre_is("FICTION / World Literature / Spain / 21st Century", "General Fiction") + genre_is("FICTION / World Literature / Spain / General", "General Fiction") + genre_is("FICTION / World Literature / Sweden", "General Fiction") + genre_is("FICTION / World Literature / Switzerland", "General Fiction") + genre_is("FICTION / World Literature / Turkey", "General Fiction") + genre_is("FICTION / World Literature / Uruguay", "General Fiction") + genre_is("FICTION / World Literature / Wales", "General Fiction") + + def test_deprecated_bisac_terms(self): """These BISAC terms have been deprecated. We classify them the same as the new terms. @@ -308,6 +463,8 @@ def fiction_is(name, expect): fiction_is("YOUNG ADULT FICTION / Lifestyles / Country Life", True) fiction_is("HISTORY / General", False) + fiction_is("JUVENILE FICTION / General", True) + def test_audience_spot_checks(self): def audience_is(name, expect): subject = self._subject("", name) From 1ee45db30f07a304c1318272d7e7ea8273cae2b9 Mon Sep 17 00:00:00 2001 From: Kaisa Kuivalahti Date: Thu, 16 Jan 2025 15:30:39 +0200 Subject: [PATCH 2/3] EKIR-206 Update tests --- tests/core/classifiers/test_bisac.py | 814 +++++++++++++++++++++++++-- 1 file changed, 772 insertions(+), 42 deletions(-) diff --git a/tests/core/classifiers/test_bisac.py b/tests/core/classifiers/test_bisac.py index f71738718..edca41f09 100644 --- a/tests/core/classifiers/test_bisac.py +++ b/tests/core/classifiers/test_bisac.py @@ -279,7 +279,10 @@ def test_genre_spot_checks(self): genre_is("FICTION / Hispanic & Latino / Women", "General Fiction") genre_is("FICTION / Holidays", "General Fiction") genre_is("FICTION / Immigration", "General Fiction") - genre_is("FICTION / Indigenous / General (see also Indigenous Peoples of Turtle Island or Native American)", "General Fiction") + genre_is( + "FICTION / Indigenous / General (see also Indigenous Peoples of Turtle Island or Native American)", + "General Fiction", + ) genre_is("FICTION / Indigenous / City Life", "Urban Fiction") genre_is("FICTION / Indigenous / Elders", "General Fiction") genre_is("FICTION / Indigenous / Family Life", "General Fiction") @@ -287,7 +290,10 @@ def test_genre_spot_checks(self): genre_is("FICTION / Indigenous / Life Stories", "General Fiction") genre_is("FICTION / Indigenous / Oral Storytelling & Teachings", "Folklore") genre_is("FICTION / Indigenous / Women", "General Fiction") - genre_is("FICTION / Indigenous / Indigenous Peoples of Turtle Island", "General Fiction") + genre_is( + "FICTION / Indigenous / Indigenous Peoples of Turtle Island", + "General Fiction", + ) genre_is("FICTION / Legal", "General Fiction") genre_is("FICTION / Mashups", "General Fiction") genre_is("FICTION / Media Tie-In", "General Fiction") @@ -300,8 +306,12 @@ def test_genre_spot_checks(self): genre_is("FICTION / Neurodiversity", "General Fiction") genre_is("FICTION / Own Voices", "General Fiction") genre_is("FICTION / Performing Arts / General", "General Fiction") - genre_is("FICTION / Performing Arts / Dance, Theater & Musicals", "General Fiction") - genre_is("FICTION / Performing Arts / Film, Television & Radio", "General Fiction") + genre_is( + "FICTION / Performing Arts / Dance, Theater & Musicals", "General Fiction" + ) + genre_is( + "FICTION / Performing Arts / Film, Television & Radio", "General Fiction" + ) genre_is("FICTION / Performing Arts / Music", "General Fiction") genre_is("FICTION / Political", "General Fiction") genre_is("FICTION / Psychological", "General Fiction") @@ -314,67 +324,131 @@ def test_genre_spot_checks(self): genre_is("FICTION / World Literature / Africa / East Africa", "General Fiction") genre_is("FICTION / World Literature / Africa / General", "General Fiction") genre_is("FICTION / World Literature / Africa / Nigeria", "General Fiction") - genre_is("FICTION / World Literature / Africa / Southern Africa", "General Fiction") + genre_is( + "FICTION / World Literature / Africa / Southern Africa", "General Fiction" + ) genre_is("FICTION / World Literature / Africa / West Africa", "General Fiction") - genre_is("FICTION / World Literature / American / 19th Century", "Historical Fiction") - genre_is("FICTION / World Literature / American / 20th Century", "General Fiction") - genre_is("FICTION / World Literature / American / 21st Century", "General Fiction") - genre_is("FICTION / World Literature / American / Colonial & Revolutionary Periods", "Historical Fiction") + genre_is( + "FICTION / World Literature / American / 19th Century", "Historical Fiction" + ) + genre_is( + "FICTION / World Literature / American / 20th Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / American / 21st Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / American / Colonial & Revolutionary Periods", + "Historical Fiction", + ) genre_is("FICTION / World Literature / American / General", "General Fiction") genre_is("FICTION / World Literature / Argentina", "General Fiction") genre_is("FICTION / World Literature / Asia (General)", "General Fiction") genre_is("FICTION / World Literature / Australia", "General Fiction") genre_is("FICTION / World Literature / Austria", "General Fiction") genre_is("FICTION / World Literature / Brazil", "General Fiction") - genre_is("FICTION / World Literature / Canada / 20th Century", "General Fiction") - genre_is("FICTION / World Literature / Canada / 21st Century", "General Fiction") - genre_is("FICTION / World Literature / Canada / Colonial & 19th Century", "Historical Fiction") + genre_is( + "FICTION / World Literature / Canada / 20th Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / Canada / 21st Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / Canada / Colonial & 19th Century", + "Historical Fiction", + ) genre_is("FICTION / World Literature / Canada / General", "General Fiction") - genre_is("FICTION / World Literature / Caribbean & West Indies", "General Fiction") + genre_is( + "FICTION / World Literature / Caribbean & West Indies", "General Fiction" + ) genre_is("FICTION / World Literature / Central America", "General Fiction") genre_is("FICTION / World Literature / Central Asia", "General Fiction") genre_is("FICTION / World Literature / Chile", "General Fiction") - genre_is("FICTION / World Literature / China / 19th Century", "Historical Fiction") + genre_is( + "FICTION / World Literature / China / 19th Century", "Historical Fiction" + ) genre_is("FICTION / World Literature / China / 20th Century", "General Fiction") genre_is("FICTION / World Literature / China / 21st Century", "General Fiction") genre_is("FICTION / World Literature / China / General", "General Fiction") genre_is("FICTION / World Literature / Colombia", "General Fiction") genre_is("FICTION / World Literature / Czech Republic", "General Fiction") genre_is("FICTION / World Literature / Denmark", "General Fiction") - genre_is("FICTION / World Literature / England / 16th & 17th Century", "Historical Fiction") - genre_is("FICTION / World Literature / England / 18th Century", "Historical Fiction") - genre_is("FICTION / World Literature / England / 19th Century", "Historical Fiction") - genre_is("FICTION / World Literature / England / 20th Century", "General Fiction") - genre_is("FICTION / World Literature / England / 21st Century", "General Fiction") - genre_is("FICTION / World Literature / England / Early & Medieval Periods", "General Fiction") + genre_is( + "FICTION / World Literature / England / 16th & 17th Century", + "Historical Fiction", + ) + genre_is( + "FICTION / World Literature / England / 18th Century", "Historical Fiction" + ) + genre_is( + "FICTION / World Literature / England / 19th Century", "Historical Fiction" + ) + genre_is( + "FICTION / World Literature / England / 20th Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / England / 21st Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / England / Early & Medieval Periods", + "General Fiction", + ) genre_is("FICTION / World Literature / England / General", "General Fiction") genre_is("FICTION / World Literature / Europe (General)", "General Fiction") genre_is("FICTION / World Literature / Finland", "General Fiction") - genre_is("FICTION / World Literature / France / 18th Century", "Historical Fiction") - genre_is("FICTION / World Literature / France / 19th Century", "Historical Fiction") - genre_is("FICTION / World Literature / France / 20th Century", "General Fiction") - genre_is("FICTION / World Literature / France / 21st Century", "General Fiction") + genre_is( + "FICTION / World Literature / France / 18th Century", "Historical Fiction" + ) + genre_is( + "FICTION / World Literature / France / 19th Century", "Historical Fiction" + ) + genre_is( + "FICTION / World Literature / France / 20th Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / France / 21st Century", "General Fiction" + ) genre_is("FICTION / World Literature / France / General", "General Fiction") - genre_is("FICTION / World Literature / Germany / 20th Century", "General Fiction") - genre_is("FICTION / World Literature / Germany / 21st Century", "General Fiction") + genre_is( + "FICTION / World Literature / Germany / 20th Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / Germany / 21st Century", "General Fiction" + ) genre_is("FICTION / World Literature / Germany / General", "General Fiction") genre_is("FICTION / World Literature / Greece", "General Fiction") genre_is("FICTION / World Literature / Hungary", "General Fiction") - genre_is("FICTION / World Literature / India / 19th Century", "Historical Fiction") + genre_is( + "FICTION / World Literature / India / 19th Century", "Historical Fiction" + ) genre_is("FICTION / World Literature / India / 20th Century", "General Fiction") genre_is("FICTION / World Literature / India / 21st Century", "General Fiction") genre_is("FICTION / World Literature / India / General", "General Fiction") - genre_is("FICTION / World Literature / Ireland / 19th Century", "Historical Fiction") - genre_is("FICTION / World Literature / Ireland / 20th Century", "General Fiction") - genre_is("FICTION / World Literature / Ireland / 21st Century", "General Fiction") + genre_is( + "FICTION / World Literature / Ireland / 19th Century", "Historical Fiction" + ) + genre_is( + "FICTION / World Literature / Ireland / 20th Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / Ireland / 21st Century", "General Fiction" + ) genre_is("FICTION / World Literature / Ireland / General", "General Fiction") genre_is("FICTION / World Literature / Italy", "General Fiction") genre_is("FICTION / World Literature / Japan", "General Fiction") genre_is("FICTION / World Literature / Korea", "General Fiction") genre_is("FICTION / World Literature / Mexico", "General Fiction") - genre_is("FICTION / World Literature / Middle East / Arabian Peninsula", "General Fiction") - genre_is("FICTION / World Literature / Middle East / Egypt & North Africa", "General Fiction") - genre_is("FICTION / World Literature / Middle East / General", "General Fiction") + genre_is( + "FICTION / World Literature / Middle East / Arabian Peninsula", + "General Fiction", + ) + genre_is( + "FICTION / World Literature / Middle East / Egypt & North Africa", + "General Fiction", + ) + genre_is( + "FICTION / World Literature / Middle East / General", "General Fiction" + ) genre_is("FICTION / World Literature / Middle East / Israel", "General Fiction") genre_is("FICTION / World Literature / Netherlands", "General Fiction") genre_is("FICTION / World Literature / New Zealand", "General Fiction") @@ -384,17 +458,33 @@ def test_genre_spot_checks(self): genre_is("FICTION / World Literature / Peru", "General Fiction") genre_is("FICTION / World Literature / Poland", "General Fiction") genre_is("FICTION / World Literature / Portugal", "General Fiction") - genre_is("FICTION / World Literature / Russia / 19th Century", "Historical Fiction") - genre_is("FICTION / World Literature / Russia / 20th Century", "General Fiction") - genre_is("FICTION / World Literature / Russia / 21st Century", "General Fiction") + genre_is( + "FICTION / World Literature / Russia / 19th Century", "Historical Fiction" + ) + genre_is( + "FICTION / World Literature / Russia / 20th Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / Russia / 21st Century", "General Fiction" + ) genre_is("FICTION / World Literature / Russia / General", "General Fiction") - genre_is("FICTION / World Literature / Scotland / 19th Century", "Historical Fiction") - genre_is("FICTION / World Literature / Scotland / 20th Century", "General Fiction") - genre_is("FICTION / World Literature / Scotland / 21st Century", "General Fiction") + genre_is( + "FICTION / World Literature / Scotland / 19th Century", "Historical Fiction" + ) + genre_is( + "FICTION / World Literature / Scotland / 20th Century", "General Fiction" + ) + genre_is( + "FICTION / World Literature / Scotland / 21st Century", "General Fiction" + ) genre_is("FICTION / World Literature / Scotland / General", "General Fiction") - genre_is("FICTION / World Literature / South America (General)", "General Fiction") + genre_is( + "FICTION / World Literature / South America (General)", "General Fiction" + ) genre_is("FICTION / World Literature / Southeast Asia", "General Fiction") - genre_is("FICTION / World Literature / Spain / 19th Century", "Historical Fiction") + genre_is( + "FICTION / World Literature / Spain / 19th Century", "Historical Fiction" + ) genre_is("FICTION / World Literature / Spain / 20th Century", "General Fiction") genre_is("FICTION / World Literature / Spain / 21st Century", "General Fiction") genre_is("FICTION / World Literature / Spain / General", "General Fiction") @@ -403,7 +493,647 @@ def test_genre_spot_checks(self): genre_is("FICTION / World Literature / Turkey", "General Fiction") genre_is("FICTION / World Literature / Uruguay", "General Fiction") genre_is("FICTION / World Literature / Wales", "General Fiction") - + # Juvenile and YA subjects do not yet all have genres. + # Tests added to track them anyway. + genre_is("JUVENILE FICTION / Activity Books / Coloring", None) + genre_is("JUVENILE FICTION / Activity Books / General", None) + genre_is("JUVENILE FICTION / Activity Books / Sticker", None) + genre_is("JUVENILE FICTION / African American & Black", "General Fiction") + genre_is( + "JUVENILE FICTION / Animals / Alligators & Crocodiles", "General Fiction" + ) + genre_is("JUVENILE FICTION / Animals / Apes, Monkeys, etc.", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Baby Animals", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Bears", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Birds", "General Fiction") + genre_is( + "JUVENILE FICTION / Animals / Butterflies, Moths & Caterpillars", + "General Fiction", + ) + genre_is("JUVENILE FICTION / Animals / Cats", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Cows", "General Fiction") + genre_is( + "JUVENILE FICTION / Animals / Deer, Moose & Caribou", "General Fiction" + ) + genre_is( + "JUVENILE FICTION / Animals / Dinosaurs & Prehistoric Creatures", + "General Fiction", + ) + genre_is("JUVENILE FICTION / Animals / Dogs", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Ducks, Geese, etc.", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Elephants", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Farm Animals", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Fish", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Foxes", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Frogs & Toads", "General Fiction") + genre_is("JUVENILE FICTION / Animals / General", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Giraffes", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Hippos & Rhinos", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Horses", "General Fiction") + genre_is( + "JUVENILE FICTION / Animals / Insects, Spiders, etc.", "General Fiction" + ) + genre_is("JUVENILE FICTION / Animals / Jungle Animals", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Kangaroos", "General Fiction") + genre_is( + "JUVENILE FICTION / Animals / Lions, Tigers, Leopards, etc.", + "General Fiction", + ) + genre_is("JUVENILE FICTION / Animals / Mammals", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Marine Life", "General Fiction") + genre_is( + "JUVENILE FICTION / Animals / Mice, Hamsters, Guinea Pigs, etc.", + "General Fiction", + ) + genre_is("JUVENILE FICTION / Animals / Nocturnal", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Penguins", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Pets", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Pigs", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Rabbits", "General Fiction") + genre_is( + "JUVENILE FICTION / Animals / Reptiles & Amphibians", "General Fiction" + ) + genre_is("JUVENILE FICTION / Animals / Squirrels", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Turtles & Tortoises", "General Fiction") + genre_is( + "JUVENILE FICTION / Animals / Wolves, Coyotes & Wild Dogs", + "General Fiction", + ) + genre_is("JUVENILE FICTION / Animals / Worms", "General Fiction") + genre_is("JUVENILE FICTION / Animals / Zoos", "General Fiction") + genre_is("JUVENILE FICTION / Architecture", None) + genre_is("JUVENILE FICTION / Art", None) + genre_is( + "JUVENILE FICTION / Asian American & Pacific Islander", "General Fiction" + ) + genre_is("JUVENILE FICTION / Bedtime & Dreams", None) + genre_is("JUVENILE FICTION / Biographical / Africa", "General Fiction") + genre_is("JUVENILE FICTION / Biographical / Asia", "General Fiction") + genre_is( + "JUVENILE FICTION / Biographical / Australia & Oceania", "General Fiction" + ) + genre_is("JUVENILE FICTION / Biographical / Canada", "General Fiction") + genre_is("JUVENILE FICTION / Biographical / Europe", "General Fiction") + genre_is("JUVENILE FICTION / Biographical / General", "General Fiction") + genre_is("JUVENILE FICTION / Biographical / Latin America", "General Fiction") + genre_is("JUVENILE FICTION / Biographical / United States", "General Fiction") + genre_is("JUVENILE FICTION / Biracial & Multiracial", None) + genre_is("JUVENILE FICTION / Books & Libraries", None) + genre_is("JUVENILE FICTION / Boys & Men", None) + genre_is("JUVENILE FICTION / Business, Careers, Occupations", None) + genre_is("JUVENILE FICTION / Clothing & Dress", None) + genre_is("JUVENILE FICTION / Computers & Digital Media", None) + genre_is("JUVENILE FICTION / Concepts / Alphabet", None) + genre_is("JUVENILE FICTION / Concepts / Body", None) + genre_is("JUVENILE FICTION / Concepts / Colors", None) + genre_is("JUVENILE FICTION / Concepts / Counting & Numbers", None) + genre_is("JUVENILE FICTION / Concepts / Date & Time", None) + genre_is("JUVENILE FICTION / Concepts / General", None) + genre_is("JUVENILE FICTION / Concepts / Language", None) + genre_is("JUVENILE FICTION / Concepts / Money", None) + genre_is("JUVENILE FICTION / Concepts / Opposites", None) + genre_is("JUVENILE FICTION / Concepts / Seasons", None) + genre_is("JUVENILE FICTION / Concepts / Senses & Sensation", None) + genre_is("JUVENILE FICTION / Concepts / Size & Shape", None) + genre_is("JUVENILE FICTION / Concepts / Sounds", None) + genre_is("JUVENILE FICTION / Concepts / Words", None) + genre_is("JUVENILE FICTION / Cooking & Food", None) + genre_is("JUVENILE FICTION / Disabilities", "General Fiction") + genre_is("JUVENILE FICTION / Diversity & Multicultural", "General Fiction") + genre_is("JUVENILE FICTION / Family / Adoption", None) + genre_is("JUVENILE FICTION / Family / Alternative Family", None) + genre_is("JUVENILE FICTION / Family / Blended Families", None) + genre_is( + "JUVENILE FICTION / Family / General (see also headings under Social Themes)", + None, + ) + genre_is("JUVENILE FICTION / Family / Grandparents", None) + genre_is("JUVENILE FICTION / Family / Marriage & Divorce", None) + genre_is("JUVENILE FICTION / Family / Multigenerational", None) + genre_is("JUVENILE FICTION / Family / New Baby", None) + genre_is("JUVENILE FICTION / Family / Orphans & Foster Homes", None) + genre_is("JUVENILE FICTION / Family / Parents", None) + genre_is("JUVENILE FICTION / Family / Siblings", None) + genre_is("JUVENILE FICTION / First Nations", None) + genre_is("JUVENILE FICTION / Girls & Women", None) + genre_is("JUVENILE FICTION / Health & Daily Living / Daily Activities", None) + genre_is( + "JUVENILE FICTION / Health & Daily Living / Diseases, Illnesses & Injuries", + None, + ) + genre_is("JUVENILE FICTION / Health & Daily Living / General", None) + genre_is("JUVENILE FICTION / Health & Daily Living / Mental Health", None) + genre_is( + "JUVENILE FICTION / Health & Daily Living / Mindfulness & Meditation", None + ) + genre_is("JUVENILE FICTION / Health & Daily Living / Toilet Training", None) + genre_is("JUVENILE FICTION / Hispanic & Latino", "General Fiction") + genre_is("JUVENILE FICTION / Holidays & Celebrations / Birthdays", None) + genre_is( + "JUVENILE FICTION / Holidays & Celebrations / Christmas & Advent", None + ) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Day of the Dead", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Diwali", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Easter & Lent", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Father's Day", None) + genre_is( + "JUVENILE FICTION / Holidays & Celebrations / General (see also Religious / Christian / Holidays & Celebrations)", + None, + ) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Halloween", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Hanukkah", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Juneteenth", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Kwanzaa", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Lunar New Year", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Mother's Day", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Passover", None) + genre_is( + "JUVENILE FICTION / Holidays & Celebrations / Patriotic Holidays", None + ) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Ramadan", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Thanksgiving", None) + genre_is("JUVENILE FICTION / Holidays & Celebrations / Valentine's Day", None) + genre_is("JUVENILE FICTION / Imagination & Play", None) + genre_is("JUVENILE FICTION / Indigenous / Animal Stories", "General Fiction") + genre_is("JUVENILE FICTION / Indigenous / Cautionary Tales", "General Fiction") + genre_is("JUVENILE FICTION / Indigenous / Elders", "General Fiction") + genre_is("JUVENILE FICTION / Indigenous / Family Life", "General Fiction") + genre_is("JUVENILE FICTION / Indigenous / General", "General Fiction") + genre_is( + "JUVENILE FICTION / Indigenous / Life Stories (see also headings under Biographical)", + "General Fiction", + ) + genre_is("JUVENILE FICTION / Indigenous / Oral Stories", "General Fiction") + genre_is("JUVENILE FICTION / Indigenous / Retellings", "General Fiction") + genre_is("JUVENILE FICTION / Indigenous / Teachings", "General Fiction") + genre_is( + "JUVENILE FICTION / Indigenous Peoples of Turtle Island", "General Fiction" + ) + genre_is("JUVENILE FICTION / Interactive Adventures", None) + genre_is("JUVENILE FICTION / Inuit", None) + genre_is("JUVENILE FICTION / Lifestyles / City & Town Life", None) + genre_is("JUVENILE FICTION / Lifestyles / Country Life", None) + genre_is("JUVENILE FICTION / Lifestyles / Farm & Ranch Life", None) + genre_is("JUVENILE FICTION / Mathematics", None) + genre_is("JUVENILE FICTION / Media Tie-In", "General Fiction") + genre_is("JUVENILE FICTION / Mermaids & Mermen", "Fantasy") + genre_is("JUVENILE FICTION / Middle Eastern & Arab American", "General Fiction") + genre_is("JUVENILE FICTION / M�tis", None) + genre_is("JUVENILE FICTION / Native American", "General Fiction") + genre_is("JUVENILE FICTION / Neurodiversity", "General Fiction") + genre_is("JUVENILE FICTION / Performing Arts / Circus", "General Fiction") + genre_is("JUVENILE FICTION / Performing Arts / Dance", "General Fiction") + genre_is("JUVENILE FICTION / Performing Arts / Film", "General Fiction") + genre_is("JUVENILE FICTION / Performing Arts / General", "General Fiction") + genre_is("JUVENILE FICTION / Performing Arts / Music", "General Fiction") + genre_is( + "JUVENILE FICTION / Performing Arts / Television & Radio", "General Fiction" + ) + genre_is( + "JUVENILE FICTION / Performing Arts / Theater & Musicals", "General Fiction" + ) + genre_is("JUVENILE FICTION / Places / Africa", None) + genre_is("JUVENILE FICTION / Places / Asia", None) + genre_is("JUVENILE FICTION / Places / Australia & Oceania", None) + genre_is("JUVENILE FICTION / Places / Canada", None) + genre_is("JUVENILE FICTION / Places / Caribbean & Latin America", None) + genre_is("JUVENILE FICTION / Places / Europe", None) + genre_is("JUVENILE FICTION / Places / General", None) + genre_is("JUVENILE FICTION / Places / Mexico", None) + genre_is("JUVENILE FICTION / Places / Middle East", None) + genre_is("JUVENILE FICTION / Places / Polar Regions", None) + genre_is("JUVENILE FICTION / Places / United States", None) + genre_is("JUVENILE FICTION / Politics & Government", None) + genre_is("JUVENILE FICTION / Readers / Beginner", None) + genre_is("JUVENILE FICTION / Readers / Chapter Books", None) + genre_is("JUVENILE FICTION / Readers / Hi-Lo", None) + genre_is("JUVENILE FICTION / Readers / Intermediate", None) + genre_is("JUVENILE FICTION / Recycling & Green Living", None) + genre_is("JUVENILE FICTION / Royalty", None) + genre_is("JUVENILE FICTION / School & Education", None) + genre_is("JUVENILE FICTION / Science & Nature / Disasters", None) + genre_is("JUVENILE FICTION / Science & Nature / Environment", None) + genre_is("JUVENILE FICTION / Science & Nature / Flowers & Plants", None) + genre_is("JUVENILE FICTION / Science & Nature / General", None) + genre_is("JUVENILE FICTION / Science & Nature / Trees & Forests", None) + genre_is("JUVENILE FICTION / Science & Nature / Weather", None) + genre_is("JUVENILE FICTION / Social Themes / Activism & Social Justice", None) + genre_is("JUVENILE FICTION / Social Themes / Adolescence & Coming of Age", None) + genre_is("JUVENILE FICTION / Social Themes / Bullying", None) + genre_is("JUVENILE FICTION / Social Themes / Dating & Relationships", None) + genre_is("JUVENILE FICTION / Social Themes / Death, Grief, Bereavement", None) + genre_is("JUVENILE FICTION / Social Themes / Depression & Mental Illness", None) + genre_is( + "JUVENILE FICTION / Social Themes / Drugs, Alcohol, Substance Abuse", None + ) + genre_is("JUVENILE FICTION / Social Themes / Emigration & Immigration", None) + genre_is("JUVENILE FICTION / Social Themes / Emotions & Feelings", None) + genre_is("JUVENILE FICTION / Social Themes / Friendship", None) + genre_is( + "JUVENILE FICTION / Social Themes / General (see also headings under Family)", + None, + ) + genre_is("JUVENILE FICTION / Social Themes / Manners & Etiquette", None) + genre_is("JUVENILE FICTION / Social Themes / New Experience", None) + genre_is("JUVENILE FICTION / Social Themes / Peer Pressure", None) + genre_is( + "JUVENILE FICTION / Social Themes / Physical & Emotional Abuse (see also Social Themes / Sexual Abuse)", + None, + ) + genre_is("JUVENILE FICTION / Social Themes / Poverty & Homelessness", None) + genre_is("JUVENILE FICTION / Social Themes / Prejudice & Racism", None) + genre_is("JUVENILE FICTION / Social Themes / Religion & Faith", None) + genre_is("JUVENILE FICTION / Social Themes / Runaways", None) + genre_is("JUVENILE FICTION / Social Themes / Self-Esteem & Self-Reliance", None) + genre_is("JUVENILE FICTION / Social Themes / Sexual Abuse", None) + genre_is("JUVENILE FICTION / Social Themes / Strangers", None) + genre_is("JUVENILE FICTION / Social Themes / Values & Virtues", None) + genre_is("JUVENILE FICTION / Social Themes / Violence", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Baseball & Softball", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Basketball", None) + genre_is( + "JUVENILE FICTION / Sports & Recreation / Camping & Outdoor Activities", + None, + ) + genre_is("JUVENILE FICTION / Sports & Recreation / Cheerleading", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Cycling", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Equestrian", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Extreme Sports", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Football", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Games", None) + genre_is("JUVENILE FICTION / Sports & Recreation / General", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Golf", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Gymnastics", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Hockey", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Ice Skating", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Martial Arts", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Motor Sports", None) + genre_is( + "JUVENILE FICTION / Sports & Recreation / Olympics & Paralympics", None + ) + genre_is("JUVENILE FICTION / Sports & Recreation / Skateboarding", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Soccer", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Track & Field", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Water Sports", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Winter Sports", None) + genre_is("JUVENILE FICTION / Sports & Recreation / Wrestling", None) + genre_is("JUVENILE FICTION / Technology / Astronauts & Space", None) + genre_is("JUVENILE FICTION / Technology / General", None) + genre_is("JUVENILE FICTION / Technology / Inventions", None) + genre_is("JUVENILE FICTION / Toys, Dolls & Puppets", None) + genre_is("JUVENILE FICTION / Transportation / Aviation", None) + genre_is( + "JUVENILE FICTION / Transportation / Boats, Ships & Underwater Craft", None + ) + genre_is("JUVENILE FICTION / Transportation / Cars & Trucks", None) + genre_is("JUVENILE FICTION / Transportation / General", None) + genre_is("JUVENILE FICTION / Transportation / Railroads & Trains", None) + genre_is("JUVENILE FICTION / Travel", None) + genre_is("JUVENILE FICTION / Trickster Tales", None) + genre_is("JUVENILE NONFICTION / Activism & Social Justice", None) + genre_is("JUVENILE NONFICTION / Activity Books / Coloring", None) + genre_is("JUVENILE NONFICTION / Activity Books / General", None) + genre_is("JUVENILE NONFICTION / Activity Books / Sticker", None) + genre_is("JUVENILE NONFICTION / Adventure & Adventurers", None) + genre_is("JUVENILE NONFICTION / African American & Black", None) + genre_is("JUVENILE NONFICTION / Asian American & Pacific Islander", None) + genre_is("JUVENILE NONFICTION / Bedtime & Dreams", None) + genre_is("JUVENILE NONFICTION / Biracial & Multiracial", None) + genre_is("JUVENILE NONFICTION / Books & Libraries", None) + genre_is("JUVENILE NONFICTION / Boys & Men", None) + genre_is("JUVENILE NONFICTION / Clothing & Dress", None) + genre_is("JUVENILE NONFICTION / Concepts / Alphabet", None) + genre_is("JUVENILE NONFICTION / Concepts / Body", None) + genre_is("JUVENILE NONFICTION / Concepts / Colors", None) + genre_is("JUVENILE NONFICTION / Concepts / Counting & Numbers", None) + genre_is("JUVENILE NONFICTION / Concepts / Date & Time", None) + genre_is("JUVENILE NONFICTION / Concepts / General", None) + genre_is("JUVENILE NONFICTION / Concepts / Money", None) + genre_is("JUVENILE NONFICTION / Concepts / Opposites", None) + genre_is("JUVENILE NONFICTION / Concepts / Seasons", None) + genre_is("JUVENILE NONFICTION / Concepts / Senses & Sensation", None) + genre_is("JUVENILE NONFICTION / Concepts / Size & Shape", None) + genre_is("JUVENILE NONFICTION / Concepts / Sounds", None) + genre_is( + "JUVENILE NONFICTION / Concepts / Words (see also headings under Language Arts)", + None, + ) + genre_is("JUVENILE NONFICTION / Curiosities & Wonders", None) + genre_is("JUVENILE NONFICTION / Disabilities", None) + genre_is("JUVENILE NONFICTION / Diversity & Multicultural", None) + genre_is("JUVENILE NONFICTION / First Nations", None) + genre_is("JUVENILE NONFICTION / General", None) + genre_is("JUVENILE NONFICTION / Girls & Women", None) + genre_is("JUVENILE NONFICTION / Hispanic & Latino", None) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Birthdays", None) + genre_is( + "JUVENILE NONFICTION / Holidays & Celebrations / Day of the Dead", None + ) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Diwali", None) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Easter & Lent", None) + genre_is( + "JUVENILE NONFICTION / Holidays & Celebrations / General (see also Religious / Christian / Holidays & Celebrations)", + None, + ) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Halloween", None) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Hanukkah", None) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Juneteenth", None) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Kwanzaa", None) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Lunar New Year", None) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Passover", None) + genre_is( + "JUVENILE NONFICTION / Holidays & Celebrations / Patriotic Holidays", None + ) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Ramadan", None) + genre_is("JUVENILE NONFICTION / Holidays & Celebrations / Thanksgiving", None) + genre_is( + "JUVENILE NONFICTION / Holidays & Celebrations / Valentine's Day", None + ) + genre_is("JUVENILE NONFICTION / Indigenous / Animal Stories", None) + genre_is("JUVENILE NONFICTION / Indigenous / Elders", None) + genre_is("JUVENILE NONFICTION / Indigenous / Family Life", None) + genre_is("JUVENILE NONFICTION / Indigenous / General", None) + genre_is("JUVENILE NONFICTION / Indigenous / Land-Based Knowledge", None) + genre_is("JUVENILE NONFICTION / Indigenous / Reconciliation", None) + genre_is("JUVENILE NONFICTION / Indigenous Peoples of Turtle Island", None) + genre_is("JUVENILE NONFICTION / Inspirational & Personal Growth", None) + genre_is("JUVENILE NONFICTION / Inuit", None) + genre_is("JUVENILE NONFICTION / LGBTQ+", None) + genre_is("JUVENILE NONFICTION / Language Study / French", None) + genre_is("JUVENILE NONFICTION / Language Study / General", None) + genre_is( + "JUVENILE NONFICTION / Language Study / Indigenous Languages in the Americas", + None, + ) + genre_is("JUVENILE NONFICTION / Language Study / Spanish", None) + genre_is("JUVENILE NONFICTION / Lifestyles / City & Town Life", None) + genre_is("JUVENILE NONFICTION / Lifestyles / Country Life", None) + genre_is("JUVENILE NONFICTION / Lifestyles / Farm & Ranch Life", None) + genre_is("JUVENILE NONFICTION / Media Tie-In", None) + genre_is("JUVENILE NONFICTION / Middle Eastern & Arab American", None) + genre_is("JUVENILE NONFICTION / M�tis", None) + genre_is("JUVENILE NONFICTION / Native American", None) + genre_is("JUVENILE NONFICTION / Neurodiversity", None) + genre_is("JUVENILE NONFICTION / Paranormal & Supernatural", None) + genre_is("JUVENILE NONFICTION / Pirates", None) + genre_is("JUVENILE NONFICTION / Places / Africa", None) + genre_is("JUVENILE NONFICTION / Places / Asia", None) + genre_is("JUVENILE NONFICTION / Places / Australia & Oceania", None) + genre_is("JUVENILE NONFICTION / Places / Canada", None) + genre_is("JUVENILE NONFICTION / Places / Caribbean & Latin America", None) + genre_is("JUVENILE NONFICTION / Places / Europe", None) + genre_is("JUVENILE NONFICTION / Places / General", None) + genre_is("JUVENILE NONFICTION / Places / Mexico", None) + genre_is("JUVENILE NONFICTION / Places / Middle East", None) + genre_is("JUVENILE NONFICTION / Places / Polar Regions", None) + genre_is("JUVENILE NONFICTION / Places / United States", None) + genre_is("JUVENILE NONFICTION / Readers / Beginner", None) + genre_is("JUVENILE NONFICTION / Readers / Chapter Books", None) + genre_is("JUVENILE NONFICTION / Readers / Hi-Lo", None) + genre_is("JUVENILE NONFICTION / Readers / Intermediate", None) + genre_is("JUVENILE NONFICTION / Recycling & Green Living", None) + genre_is("JUVENILE NONFICTION / Spies & Spying", None) + genre_is("JUVENILE NONFICTION / Toys, Dolls & Puppets", None) + genre_is("JUVENILE NONFICTION / Volunteering", None) + genre_is("NON-CLASSIFIABLE", None) + genre_is("YOUNG ADULT FICTION / African American & Black", "General Fiction") + genre_is("YOUNG ADULT FICTION / Animals / General", "General Fiction") + genre_is("YOUNG ADULT FICTION / Animals / Horses", "General Fiction") + genre_is("YOUNG ADULT FICTION / Animals / Marine Life", "General Fiction") + genre_is( + "YOUNG ADULT FICTION / Animals / Mythical Creatures", "General Fiction" + ) + genre_is("YOUNG ADULT FICTION / Animals / Pets", "General Fiction") + genre_is("YOUNG ADULT FICTION / Art", None) + genre_is( + "YOUNG ADULT FICTION / Asian American & Pacific Islander", "General Fiction" + ) + genre_is("YOUNG ADULT FICTION / Biographical", "General Fiction") + genre_is("YOUNG ADULT FICTION / Biracial & Multiracial", None) + genre_is("YOUNG ADULT FICTION / Books & Libraries", None) + genre_is("YOUNG ADULT FICTION / Boys & Men", None) + genre_is("YOUNG ADULT FICTION / Careers, Occupations, Internships", None) + genre_is("YOUNG ADULT FICTION / Clean & Nonviolent", None) + genre_is("YOUNG ADULT FICTION / Coming of Age", "General Fiction") + genre_is("YOUNG ADULT FICTION / Computers & Digital Media", None) + genre_is("YOUNG ADULT FICTION / Cooking & Food", None) + genre_is("YOUNG ADULT FICTION / Disabilities", "General Fiction") + genre_is("YOUNG ADULT FICTION / Diversity & Multicultural", "General Fiction") + genre_is("YOUNG ADULT FICTION / Epistolary (Letters & Diaries)", None) + genre_is("YOUNG ADULT FICTION / Family / Adoption", None) + genre_is("YOUNG ADULT FICTION / Family / Alternative Family", None) + genre_is("YOUNG ADULT FICTION / Family / Blended Families", None) + genre_is( + "YOUNG ADULT FICTION / Family / General (see also headings under Social Themes)", + None, + ) + genre_is("YOUNG ADULT FICTION / Family / Marriage & Divorce", None) + genre_is("YOUNG ADULT FICTION / Family / Multigenerational", None) + genre_is("YOUNG ADULT FICTION / Family / Orphans & Foster Homes", None) + genre_is("YOUNG ADULT FICTION / Family / Parents", None) + genre_is("YOUNG ADULT FICTION / Family / Siblings", None) + genre_is("YOUNG ADULT FICTION / Fashion & Beauty", None) + genre_is("YOUNG ADULT FICTION / First Nations", None) + genre_is("YOUNG ADULT FICTION / Girls & Women", None) + genre_is( + "YOUNG ADULT FICTION / Health & Daily Living / Diseases, Illnesses & Injuries", + None, + ) + genre_is("YOUNG ADULT FICTION / Health & Daily Living / General", None) + genre_is("YOUNG ADULT FICTION / Hispanic & Latino", "General Fiction") + genre_is("YOUNG ADULT FICTION / Holidays & Celebrations", None) + genre_is( + "YOUNG ADULT FICTION / Indigenous / Cautionary Tales", "General Fiction" + ) + genre_is("YOUNG ADULT FICTION / Indigenous / City Life", "Urban Fiction") + genre_is("YOUNG ADULT FICTION / Indigenous / Family Life", "General Fiction") + genre_is("YOUNG ADULT FICTION / Indigenous / General", "General Fiction") + genre_is( + "YOUNG ADULT FICTION / Indigenous / Life Stories (see also Biographical)", + "General Fiction", + ) + genre_is("YOUNG ADULT FICTION / Indigenous / Oral Stories", "General Fiction") + genre_is("YOUNG ADULT FICTION / Indigenous / Retellings", "General Fiction") + genre_is("YOUNG ADULT FICTION / Indigenous / Teachings", "General Fiction") + genre_is( + "YOUNG ADULT FICTION / Indigenous Peoples of Turtle Island", + "General Fiction", + ) + genre_is("YOUNG ADULT FICTION / Interactive Adventures", None) + genre_is("YOUNG ADULT FICTION / Inuit", None) + genre_is("YOUNG ADULT FICTION / Lifestyles / City & Town Life", None) + genre_is("YOUNG ADULT FICTION / Lifestyles / Country Life", None) + genre_is("YOUNG ADULT FICTION / Lifestyles / Farm & Ranch Life", None) + genre_is("YOUNG ADULT FICTION / Loners & Outcasts", None) + genre_is("YOUNG ADULT FICTION / Media Tie-In", "General Fiction") + genre_is("YOUNG ADULT FICTION / Mermaids & Mermen", "Fantasy") + genre_is( + "YOUNG ADULT FICTION / Middle Eastern & Arab American", "General Fiction" + ) + genre_is("YOUNG ADULT FICTION / M�tis", None) + genre_is("YOUNG ADULT FICTION / Native American", "General Fiction") + genre_is("YOUNG ADULT FICTION / Neurodiversity", "General Fiction") + genre_is("YOUNG ADULT FICTION / Own Voices", "General Fiction") + genre_is("YOUNG ADULT FICTION / Performing Arts / Dance", "General Fiction") + genre_is("YOUNG ADULT FICTION / Performing Arts / Film", "General Fiction") + genre_is("YOUNG ADULT FICTION / Performing Arts / General", "General Fiction") + genre_is("YOUNG ADULT FICTION / Performing Arts / Music", "General Fiction") + genre_is( + "YOUNG ADULT FICTION / Performing Arts / Television & Radio", + "General Fiction", + ) + genre_is( + "YOUNG ADULT FICTION / Performing Arts / Theater & Musicals", + "General Fiction", + ) + genre_is("YOUNG ADULT FICTION / Places / Africa", None) + genre_is("YOUNG ADULT FICTION / Places / Asia", None) + genre_is("YOUNG ADULT FICTION / Places / Australia & Oceania", None) + genre_is("YOUNG ADULT FICTION / Places / Canada", None) + genre_is("YOUNG ADULT FICTION / Places / Caribbean & Latin America", None) + genre_is("YOUNG ADULT FICTION / Places / Europe", None) + genre_is("YOUNG ADULT FICTION / Places / General", None) + genre_is("YOUNG ADULT FICTION / Places / Mexico", None) + genre_is("YOUNG ADULT FICTION / Places / Middle East", None) + genre_is("YOUNG ADULT FICTION / Places / Polar Regions", None) + genre_is("YOUNG ADULT FICTION / Places / United States", None) + genre_is("YOUNG ADULT FICTION / Politics & Government", None) + genre_is("YOUNG ADULT FICTION / Recycling & Green Living", None) + genre_is("YOUNG ADULT FICTION / Royalty", None) + genre_is( + "YOUNG ADULT FICTION / School & Education / Boarding School & Prep School", + None, + ) + genre_is( + "YOUNG ADULT FICTION / School & Education / College & University", None + ) + genre_is("YOUNG ADULT FICTION / School & Education / General", None) + genre_is("YOUNG ADULT FICTION / Science & Nature / Environment", None) + genre_is( + "YOUNG ADULT FICTION / Science & Nature / General (see also headings under Animals)", + None, + ) + genre_is( + "YOUNG ADULT FICTION / Social Themes / Activism & Social Justice", None + ) + genre_is("YOUNG ADULT FICTION / Social Themes / Assimilation", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Bullying", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Class Differences", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Cutting & Self-Harm", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Dating & Sex", None) + genre_is( + "YOUNG ADULT FICTION / Social Themes / Death, Grief, Bereavement", None + ) + genre_is("YOUNG ADULT FICTION / Social Themes / Depression", None) + genre_is( + "YOUNG ADULT FICTION / Social Themes / Drugs, Alcohol, Substance Abuse", + None, + ) + genre_is( + "YOUNG ADULT FICTION / Social Themes / Eating Disorders & Body Image", None + ) + genre_is("YOUNG ADULT FICTION / Social Themes / Emigration & Immigration", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Emotions & Feelings", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Friendship", None) + genre_is( + "YOUNG ADULT FICTION / Social Themes / General (see also headings under Family)", + None, + ) + genre_is("YOUNG ADULT FICTION / Social Themes / Mental Illness", None) + genre_is("YOUNG ADULT FICTION / Social Themes / New Experience", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Peer Pressure", None) + genre_is( + "YOUNG ADULT FICTION / Social Themes / Physical & Emotional Abuse (see also Social Themes / Sexual Abuse)", + None, + ) + genre_is("YOUNG ADULT FICTION / Social Themes / Poverty & Homelessness", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Pregnancy", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Prejudice & Racism", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Religion & Faith", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Runaways", None) + genre_is( + "YOUNG ADULT FICTION / Social Themes / Self-Esteem & Self-Reliance", None + ) + genre_is("YOUNG ADULT FICTION / Social Themes / Sexual Abuse", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Suicide", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Values & Virtues", None) + genre_is("YOUNG ADULT FICTION / Social Themes / Violence", None) + genre_is( + "YOUNG ADULT FICTION / Sports & Recreation / Baseball & Softball", None + ) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Basketball", None) + genre_is( + "YOUNG ADULT FICTION / Sports & Recreation / Camping & Outdoor Activities", + None, + ) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Equestrian", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Extreme Sports", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Football", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / General", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Gymnastics", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Hockey", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Martial Arts", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Skateboarding", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Soccer", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Track & Field", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Water Sports", None) + genre_is("YOUNG ADULT FICTION / Sports & Recreation / Winter Sports", None) + genre_is("YOUNG ADULT FICTION / Technology", None) + genre_is( + "YOUNG ADULT FICTION / Travel & Transportation / Car & Road Trips", None + ) + genre_is("YOUNG ADULT FICTION / Travel & Transportation / General", None) + genre_is("YOUNG ADULT FICTION / Urban & Street Lit", "Urban Fiction") + genre_is("YOUNG ADULT NONFICTION / Activism & Social Justice", None) + genre_is("YOUNG ADULT NONFICTION / Activity Books", None) + genre_is("YOUNG ADULT NONFICTION / Adventure & Adventurers", None) + genre_is("YOUNG ADULT NONFICTION / African American & Black", None) + genre_is("YOUNG ADULT NONFICTION / Asian American & Pacific Islander", None) + genre_is("YOUNG ADULT NONFICTION / Biracial & Multiracial", None) + genre_is("YOUNG ADULT NONFICTION / Books & Libraries", None) + genre_is("YOUNG ADULT NONFICTION / Boys & Men", None) + genre_is("YOUNG ADULT NONFICTION / Curiosities & Wonders", None) + genre_is("YOUNG ADULT NONFICTION / Disabilities", None) + genre_is("YOUNG ADULT NONFICTION / Diversity & Multicultural", None) + genre_is("YOUNG ADULT NONFICTION / First Nations", None) + genre_is("YOUNG ADULT NONFICTION / General", None) + genre_is("YOUNG ADULT NONFICTION / Girls & Women", None) + genre_is("YOUNG ADULT NONFICTION / Hispanic & Latino", None) + genre_is("YOUNG ADULT NONFICTION / Holidays & Celebrations", None) + genre_is("YOUNG ADULT NONFICTION / Indigenous / Elders", None) + genre_is("YOUNG ADULT NONFICTION / Indigenous / Family Life", None) + genre_is("YOUNG ADULT NONFICTION / Indigenous / General", None) + genre_is("YOUNG ADULT NONFICTION / Indigenous / Land-Based Knowledge", None) + genre_is("YOUNG ADULT NONFICTION / Indigenous / Reconciliation", None) + genre_is("YOUNG ADULT NONFICTION / Indigenous Peoples of Turtle Island", None) + genre_is("YOUNG ADULT NONFICTION / Inspirational & Personal Growth", None) + genre_is("YOUNG ADULT NONFICTION / Inuit", None) + genre_is("YOUNG ADULT NONFICTION / LGBTQ+", None) + genre_is("YOUNG ADULT NONFICTION / Language Study / French", None) + genre_is("YOUNG ADULT NONFICTION / Language Study / General", None) + genre_is( + "YOUNG ADULT NONFICTION / Language Study / Indigenous Languages in the Americas", + None, + ) + genre_is("YOUNG ADULT NONFICTION / Language Study / Spanish", None) + genre_is("YOUNG ADULT NONFICTION / Media Tie-In", None) + genre_is("YOUNG ADULT NONFICTION / Middle Eastern & Arab American", None) + genre_is("YOUNG ADULT NONFICTION / M�tis", None) + genre_is("YOUNG ADULT NONFICTION / Native American", None) + genre_is("YOUNG ADULT NONFICTION / Neurodiversity", None) + genre_is("YOUNG ADULT NONFICTION / Paranormal & Supernatural", None) + genre_is("YOUNG ADULT NONFICTION / Places / Africa", None) + genre_is("YOUNG ADULT NONFICTION / Places / Asia", None) + genre_is("YOUNG ADULT NONFICTION / Places / Australia & Oceania", None) + genre_is("YOUNG ADULT NONFICTION / Places / Canada", None) + genre_is("YOUNG ADULT NONFICTION / Places / Caribbean & Latin America", None) + genre_is("YOUNG ADULT NONFICTION / Places / Europe", None) + genre_is("YOUNG ADULT NONFICTION / Places / General", None) + genre_is("YOUNG ADULT NONFICTION / Places / Mexico", None) + genre_is("YOUNG ADULT NONFICTION / Places / Middle East", None) + genre_is("YOUNG ADULT NONFICTION / Places / United States", None) + genre_is("YOUNG ADULT NONFICTION / Recycling & Green Living", None) + genre_is("YOUNG ADULT NONFICTION / Volunteering", None) def test_deprecated_bisac_terms(self): """These BISAC terms have been deprecated. We classify them From aef09f23d39b7a0561924300eb7992f5ab3f0d08 Mon Sep 17 00:00:00 2001 From: Kaisa Kuivalahti Date: Thu, 16 Jan 2025 15:36:36 +0200 Subject: [PATCH 3/3] Fix linting --- core/classifier/bisac.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/core/classifier/bisac.py b/core/classifier/bisac.py index 030f59442..39918e3dc 100644 --- a/core/classifier/bisac.py +++ b/core/classifier/bisac.py @@ -644,9 +644,27 @@ class BISACClassifier(Classifier): m(General_Fiction, fiction, "Suburban"), m(Urban_Fiction, fiction, "Urban & Street Lit"), m(General_Fiction, fiction, "Women"), - m(Historical_Fiction, fiction, "World Literature", something, "Colonial & Revolutionary Periods"), - m(Historical_Fiction, fiction, "World Literature", something, "Colonial & 19th Century"), - m(Historical_Fiction, fiction, "World Literature", something, "16th & 17th Century"), + m( + Historical_Fiction, + fiction, + "World Literature", + something, + "Colonial & Revolutionary Periods", + ), + m( + Historical_Fiction, + fiction, + "World Literature", + something, + "Colonial & 19th Century", + ), + m( + Historical_Fiction, + fiction, + "World Literature", + something, + "16th & 17th Century", + ), m(Historical_Fiction, fiction, "World Literature", something, "18th Century"), m(Historical_Fiction, fiction, "World Literature", something, "19th Century"), m(General_Fiction, fiction, "World Literature"),