rara-tools 0.6.6__tar.gz → 0.6.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rara-tools might be problematic. Click here for more details.

Files changed (61) hide show
  1. {rara_tools-0.6.6/rara_tools.egg-info → rara_tools-0.6.8}/PKG-INFO +1 -1
  2. rara_tools-0.6.8/VERSION +1 -0
  3. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/general.py +1 -0
  4. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_parsers/base_parser.py +1 -1
  5. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_records/person_record.py +2 -2
  6. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_records/title_record.py +2 -2
  7. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/tools/entity_normalizers.py +8 -4
  8. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/tools/marc_converter.py +1 -1
  9. {rara_tools-0.6.6 → rara_tools-0.6.8/rara_tools.egg-info}/PKG-INFO +1 -1
  10. rara_tools-0.6.6/VERSION +0 -1
  11. {rara_tools-0.6.6 → rara_tools-0.6.8}/LICENSE.md +0 -0
  12. {rara_tools-0.6.6 → rara_tools-0.6.8}/README.md +0 -0
  13. {rara_tools-0.6.6 → rara_tools-0.6.8}/pyproject.toml +0 -0
  14. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/__init__.py +0 -0
  15. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/digitizer.py +0 -0
  16. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/language_evaluator.py +0 -0
  17. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/linker.py +0 -0
  18. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/meta_extractor.py +0 -0
  19. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/normalizers.py +0 -0
  20. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/parsers.py +0 -0
  21. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/constants/subject_indexer.py +0 -0
  22. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/converters.py +0 -0
  23. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/decorators.py +0 -0
  24. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/digar_schema_converter.py +0 -0
  25. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/elastic.py +0 -0
  26. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/exceptions.py +0 -0
  27. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/normalizers/__init__.py +0 -0
  28. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/normalizers/authorities.py +0 -0
  29. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/normalizers/base.py +0 -0
  30. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/normalizers/bibs.py +0 -0
  31. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/normalizers/viaf.py +0 -0
  32. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_parsers/ems_parser.py +0 -0
  33. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_parsers/location_parser.py +0 -0
  34. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_parsers/organization_parser.py +0 -0
  35. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_parsers/person_parser.py +0 -0
  36. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_parsers/title_parser.py +0 -0
  37. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_records/base_record.py +0 -0
  38. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_records/ems_record.py +0 -0
  39. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/marc_records/organization_record.py +0 -0
  40. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/parsers/tools/russian_transliterator.py +0 -0
  41. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/s3.py +0 -0
  42. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/task_reporter.py +0 -0
  43. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools/utils.py +0 -0
  44. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools.egg-info/SOURCES.txt +0 -0
  45. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools.egg-info/dependency_links.txt +0 -0
  46. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools.egg-info/requires.txt +0 -0
  47. {rara_tools-0.6.6 → rara_tools-0.6.8}/rara_tools.egg-info/top_level.txt +0 -0
  48. {rara_tools-0.6.6 → rara_tools-0.6.8}/requirements.txt +0 -0
  49. {rara_tools-0.6.6 → rara_tools-0.6.8}/setup.cfg +0 -0
  50. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_digar_schema_converter.py +0 -0
  51. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_elastic.py +0 -0
  52. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_elastic_vector_and_search_operations.py +0 -0
  53. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_entity_normalizers.py +0 -0
  54. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_marc_parsers.py +0 -0
  55. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_normalization.py +0 -0
  56. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_s3_exceptions.py +0 -0
  57. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_s3_file_operations.py +0 -0
  58. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_sierra_converters.py +0 -0
  59. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_task_reporter.py +0 -0
  60. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_utils.py +0 -0
  61. {rara_tools-0.6.6 → rara_tools-0.6.8}/tests/test_viaf_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rara-tools
3
- Version: 0.6.6
3
+ Version: 0.6.8
4
4
  Summary: Tools to support Kata's work.
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -0,0 +1 @@
1
+ 0.6.8
@@ -18,6 +18,7 @@ class Tasks:
18
18
  UPDATE_TASK_STATUS = "update_task_status"
19
19
  UPDATE_TASK_VALUES = "update_task_values"
20
20
  MODEL_UPDATE = "component_model_update"
21
+ RUN_POST_TASK_COMPLETION_TASKS = "run_post_task_completion_tasks"
21
22
 
22
23
 
23
24
  class Models:
@@ -47,4 +47,4 @@ class BaseMARCParser:
47
47
 
48
48
  def save_as_jl(self, jl_file_path: str) -> NoReturn:
49
49
  for record in self.record_generator():
50
- self._write_line(record.full_record, jl_file_path)
50
+ self._write_line(record, jl_file_path)
@@ -110,7 +110,7 @@ class PersonRecord(BaseRecord):
110
110
  self.__birth_year = self._parse_year(birth_year)
111
111
  self.__death_year = self._parse_year(death_year)
112
112
  except Exception as e:
113
- LOGGER.error(
113
+ LOGGER.warning(
114
114
  f"Failed extracting birth and/or death year " \
115
115
  f"from '{self.life_years}' with the following " \
116
116
  f"exception: '{e}'."
@@ -126,7 +126,7 @@ class PersonRecord(BaseRecord):
126
126
  self.__birth_year = self._parse_year(birth_year)
127
127
  self.__death_year = self._parse_year(death_year)
128
128
  except Exception as e:
129
- LOGGER.error(
129
+ LOGGER.warning(
130
130
  f"Failed extracting birth and/or death year " \
131
131
  f"from '{self.life_years}' with the following " \
132
132
  f"exception: '{e}'."
@@ -131,7 +131,7 @@ class TitleRecord(BaseRecord):
131
131
  self.__author_birth_year = self._parse_year(birth_year)
132
132
  self.__author_death_year = self._parse_year(death_year)
133
133
  except Exception as e:
134
- LOGGER.error(
134
+ LOGGER.warning(
135
135
  f"Failed extracting birth and/or death year " \
136
136
  f"from '{self.author_life_years}' with the following " \
137
137
  f"exception: '{e}'."
@@ -147,7 +147,7 @@ class TitleRecord(BaseRecord):
147
147
  self.__author_birth_year = self._parse_year(birth_year)
148
148
  self.__author_death_year = self._parse_year(death_year)
149
149
  except Exception as e:
150
- LOGGER.error(
150
+ LOGGER.warning(
151
151
  f"Failed extracting birth and/or death year " \
152
152
  f"from '{self.author_life_years}' with the following " \
153
153
  f"exception: '{e}'."
@@ -46,9 +46,9 @@ class PersonalName:
46
46
  try:
47
47
  last_name, first_name = self.__original_name.split(",")
48
48
  except Exception as e:
49
- LOGGER.error(
50
- f"Parsing personal name {self.__original_name} " \
51
- f"failed with error: {e}."
49
+ LOGGER.warning(
50
+ f"Parsing personal name '{self.__original_name}' " \
51
+ f"failed with error: {e}. Keeping unformatted version."
52
52
  )
53
53
  else:
54
54
  name_tokens = [
@@ -70,12 +70,16 @@ class PersonalName:
70
70
  if not self.__last_comma_first:
71
71
  if self.last_name or self.first_name:
72
72
  self.__last_comma_first = f"{self.last_name}, {self.first_name}"
73
+ else: self.__last_comma_first = self.__original_name
73
74
  return self.__last_comma_first.strip()
74
75
 
75
76
  @property
76
77
  def first_last(self) -> str:
77
78
  if not self.__first_last:
78
- self.__first_last = f"{self.first_name} {self.last_name}"
79
+ if self.first_name or self.last_name:
80
+ self.__first_last = f"{self.first_name} {self.last_name}"
81
+ else:
82
+ self.__first_last = self.__original_name
79
83
  return self.__first_last.strip()
80
84
 
81
85
 
@@ -2,7 +2,7 @@ import pymarc
2
2
  from typing import NoReturn
3
3
 
4
4
 
5
- class MarcConveter:
5
+ class MarcConverter:
6
6
  def __init__(self):
7
7
  pass
8
8
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rara-tools
3
- Version: 0.6.6
3
+ Version: 0.6.8
4
4
  Summary: Tools to support Kata's work.
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3.10
rara_tools-0.6.6/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.6.6
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes