rara-tools 0.4.1__tar.gz → 0.4.3__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.
- {rara_tools-0.4.1/rara_tools.egg-info → rara_tools-0.4.3}/PKG-INFO +1 -1
- rara_tools-0.4.3/VERSION +1 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/elastic.py +11 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_parsers/ems_parser.py +13 -7
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_parsers/location_parser.py +12 -6
- {rara_tools-0.4.1 → rara_tools-0.4.3/rara_tools.egg-info}/PKG-INFO +1 -1
- rara_tools-0.4.1/VERSION +0 -1
- {rara_tools-0.4.1 → rara_tools-0.4.3}/LICENSE.md +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/README.md +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/pyproject.toml +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/constants/__init__.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/constants/digitizer.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/constants/general.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/constants/linker.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/constants/normalizers.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/constants/parsers.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/converters.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/decorators.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/digar_schema_converter.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/exceptions.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/normalizers/__init__.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/normalizers/authorities.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/normalizers/base.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/normalizers/bibs.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/normalizers/viaf.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_parsers/base_parser.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_parsers/organization_parser.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_parsers/person_parser.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_parsers/title_parser.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_records/base_record.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_records/ems_record.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_records/organization_record.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_records/person_record.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_records/title_record.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/tools/entity_normalizers.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/tools/marc_converter.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/tools/russian_transliterator.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/s3.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/task_reporter.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/utils.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools.egg-info/SOURCES.txt +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools.egg-info/dependency_links.txt +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools.egg-info/requires.txt +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools.egg-info/top_level.txt +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/requirements.txt +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/setup.cfg +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_digar_schema_converter.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_elastic.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_elastic_vector_and_search_operations.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_entity_normalizers.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_marc_parsers.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_normalization.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_s3_exceptions.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_s3_file_operations.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_sierra_converters.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_task_reporter.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_utils.py +0 -0
- {rara_tools-0.4.1 → rara_tools-0.4.3}/tests/test_viaf_client.py +0 -0
rara_tools-0.4.3/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.4.3
|
|
@@ -203,6 +203,17 @@ class KataElastic:
|
|
|
203
203
|
actions = [{"_index": last_index_name, "_source": document} for document in documents]
|
|
204
204
|
successful_count, error_count = bulk(actions=actions, client=self.elasticsearch, max_retries=3, refresh=refresh)
|
|
205
205
|
return successful_count, error_count
|
|
206
|
+
|
|
207
|
+
@_elastic_connection
|
|
208
|
+
def bulk_index_without_rollver(
|
|
209
|
+
self,
|
|
210
|
+
documents: Iterator[dict],
|
|
211
|
+
index: str,
|
|
212
|
+
refresh="false",
|
|
213
|
+
) -> (int, int):
|
|
214
|
+
actions = [{"_index": index, "_source": document} for document in documents]
|
|
215
|
+
successful_count, error_count = bulk(actions=actions, client=self.elasticsearch, max_retries=3, refresh=refresh)
|
|
216
|
+
return successful_count, error_count
|
|
206
217
|
|
|
207
218
|
@_elastic_connection
|
|
208
219
|
def index_document(self, index: str, body: dict, document_id: Optional[str] = None) -> Dict:
|
|
@@ -39,11 +39,17 @@ class EMSMARCParser(BaseMARCParser):
|
|
|
39
39
|
f"from MARC dump '{self.marc_file_path}'."
|
|
40
40
|
)
|
|
41
41
|
for record in self.marc_record_generator():
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
try:
|
|
43
|
+
ems_record = EMSRecord(
|
|
44
|
+
record=record,
|
|
45
|
+
add_variations=self.add_variations
|
|
46
|
+
)
|
|
47
|
+
if ems_record.keyword_type == KeywordType.LOC:
|
|
48
|
+
continue
|
|
49
|
+
else:
|
|
50
|
+
yield ems_record.full_record
|
|
51
|
+
except Exception as e:
|
|
52
|
+
LOGGER.warning(
|
|
53
|
+
f"Error while parsing record {record}: {e}"
|
|
54
|
+
)
|
|
47
55
|
continue
|
|
48
|
-
else:
|
|
49
|
-
yield ems_record.full_record
|
|
@@ -38,9 +38,15 @@ class LocationMARCParser(BaseMARCParser):
|
|
|
38
38
|
f"from MARC dump '{self.marc_file_path}'."
|
|
39
39
|
)
|
|
40
40
|
for record in self.marc_record_generator():
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
try:
|
|
42
|
+
ems_record = EMSRecord(
|
|
43
|
+
record=record,
|
|
44
|
+
add_variations=self.add_variations
|
|
45
|
+
)
|
|
46
|
+
if ems_record.keyword_type == KeywordType.LOC:
|
|
47
|
+
yield ems_record.full_record
|
|
48
|
+
except Exception as e:
|
|
49
|
+
LOGGER.warning(
|
|
50
|
+
f"Error while parsing record {record}: {e}"
|
|
51
|
+
)
|
|
52
|
+
continue
|
rara_tools-0.4.1/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.4.1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_parsers/organization_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rara_tools-0.4.1 → rara_tools-0.4.3}/rara_tools/parsers/marc_records/organization_record.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|