Uploaded image for project: 'SimplyE 2.0'
  1. SimplyE 2.0
  2. SIMPLY-1114

Put each subject classifier in its own module

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Done
    • Icon: Medium Medium
    • 2.2.9cm
    • Server - Core
    • None
    • Tech Debt: Refactor classifiers

      The classifier package in core contains a _init_.py file which defines basic methods for converting subject classifications into Simplified genres: Classifier, GenreData, and so on. That package also contains modules for specific classifiers: bisac.py for BISAC, overdrive.py for Overdrive genres, and so on. Each module defines a classifier, and then at the end adds the classifier to the global registry in Classifier.classifiers.

      However, a lot of the specific classifiers are in _init_.py rather than in their own modules: Axis360AudienceClassifier, AgeOrGradeClassifier, DeweyDecimalClassifier, LCCClassifier, KeywordBasedClassifier and its subclasses, GutenbergBookshelfClassifier, FreeformAudienceClassifier, BICClassifier, and so on.

      These specific classifiers should be moved into specific modules. The code and the tests will be easier to read. _init_.py will still need to import each module at the end, to make sure the Classifier.classifiers object is populated correctly.

            adrianaalter Adriana Alter [X] (Inactive)
            leonardrichardson Leonard Richardson [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: