diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-11-25 13:00:54 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-11-25 13:00:54 +0100 |
commit | 4a9633f0f989f4103a5c35721c5984e21a5d2192 (patch) | |
tree | 3f6c819fc951ca16844df06ba61cfab209e74466 /fuzzycat/common.py | |
parent | 368d2f75b5ef80bba822f38632787c2918317200 (diff) | |
download | fuzzycat-4a9633f0f989f4103a5c35721c5984e21a5d2192.tar.gz fuzzycat-4a9633f0f989f4103a5c35721c5984e21a5d2192.zip |
move enums into common
Diffstat (limited to 'fuzzycat/common.py')
-rw-r--r-- | fuzzycat/common.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/fuzzycat/common.py b/fuzzycat/common.py new file mode 100644 index 0000000..7daec7a --- /dev/null +++ b/fuzzycat/common.py @@ -0,0 +1,48 @@ +from enum import Enum + + +class Status(str, Enum): + """ + Match status. + """ + EXACT = 'exact' + DIFFERENT = 'different' + STRONG = 'strong' + WEAK = 'weak' + AMBIGUOUS = 'ambigiuous' + + +class OK(str, Enum): + """ + Reason for assuming we have a match. + """ + ARXIV_VERSION = 'ok.arxiv_version' + FIGSHARE_VERSION = 'ok.figshare_version' + DUMMY = 'ok.dummy' + TITLE_AUTHOR_MATCH = 'ok.title_author_match' + PREPRINT_PUBLISHED = 'ok.preprint_published' + SLUG_TITLE_AUTHOR_MATCH = 'ok.slug_title_author_match' + TOKENIZED_AUTHORS = 'ok.tokenized_authors' + DATACITE_RELATED_ID = 'ok.datacite_related_id' + + +class Miss(str, Enum): + """ + Reasons indicating mismatch. + """ + ARXIV_VERSION = 'miss.arxiv_version' + BLACKLISTED = 'miss.blacklisted' + BLACKLISTED_FRAGMENT = 'miss.blacklisted_fragment' + CONTRIB_INTERSECTION_EMPTY = 'miss.contrib_intersection_empty' + SHORT_TITLE = 'miss.short_title' + YEAR = 'miss.year' + CUSTOM_VHS = 'miss.vhs' # https://fatcat.wiki/release/44gk5ben5vghljq6twm7lwmxla + NUM_DIFF = 'miss.num_diff' + DATASET_DOI = 'miss.dataset_doi' + RELEASE_TYPE = 'miss.release_type' + CHEM_FORMULA = 'miss.chem_formula' + SUBTITLE = 'miss.subtitle' + BOOK_CHAPTER = 'miss.book_chapter' + TITLE_FILENAME = 'miss.title_filename' + COMPONENT = 'miss.component' + APPENDIX = 'miss.appendix' |