folio-data-import 0.4.0__tar.gz → 0.4.2__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 folio-data-import might be problematic. Click here for more details.
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/PKG-INFO +3 -3
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/pyproject.toml +4 -4
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/UserImport.py +9 -1
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/LICENSE +0 -0
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/README.md +0 -0
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/MARCDataImport.py +0 -0
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/__init__.py +0 -0
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/__main__.py +0 -0
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/_progress.py +0 -0
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/custom_exceptions.py +0 -0
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/marc_preprocessors/__init__.py +0 -0
- {folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/marc_preprocessors/_preprocessors.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: folio_data_import
|
|
3
|
-
Version: 0.4.
|
|
4
|
-
Summary: A python module to
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: A python module to perform bulk import of data into a FOLIO environment. Currently supports MARC and user data import.
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Author: Brooks Travis
|
|
@@ -26,7 +26,7 @@ Requires-Dist: inquirer (>=3.4.0,<4.0.0)
|
|
|
26
26
|
Requires-Dist: pyhumps (>=3.8.0,<4.0.0)
|
|
27
27
|
Requires-Dist: pymarc (>=5.2.2,<6.0.0)
|
|
28
28
|
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
29
|
-
Requires-Dist: typer (>=0.
|
|
29
|
+
Requires-Dist: typer (>=0.19.2)
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
|
|
32
32
|
# folio_data_import
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "folio_data_import"
|
|
3
|
-
version = "0.4.
|
|
4
|
-
description = "A python module to
|
|
3
|
+
version = "0.4.2"
|
|
4
|
+
description = "A python module to perform bulk import of data into a FOLIO environment. Currently supports MARC and user data import."
|
|
5
5
|
authors = ["Brooks Travis <brooks.travis@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
7
7
|
readme = "README.md"
|
|
8
|
-
packages = [{include = "folio_data_import", from="src"}]
|
|
8
|
+
packages = [{ include = "folio_data_import", from = "src" }]
|
|
9
9
|
|
|
10
10
|
[tool.poetry.scripts]
|
|
11
11
|
folio-data-import = "folio_data_import.__main__:app"
|
|
@@ -25,7 +25,7 @@ flake8-bugbear = "^24.8.19"
|
|
|
25
25
|
flake8-bandit = "^4.1.1"
|
|
26
26
|
flake8-isort = "^6.1.1"
|
|
27
27
|
flake8-docstrings = "^1.7.0"
|
|
28
|
-
typer = "
|
|
28
|
+
typer = ">=0.19.2"
|
|
29
29
|
|
|
30
30
|
[tool.poetry.group.dev.dependencies]
|
|
31
31
|
pytest = "^8.3.2"
|
|
@@ -88,6 +88,7 @@ class UserImporter: # noqa: R0902
|
|
|
88
88
|
only_update_present_fields: bool = False,
|
|
89
89
|
default_preferred_contact_type: str = "002",
|
|
90
90
|
fields_to_protect: List[str] = [],
|
|
91
|
+
no_progress: bool = False,
|
|
91
92
|
) -> None:
|
|
92
93
|
self.limit_simultaneous_requests = limit_simultaneous_requests
|
|
93
94
|
self.batch_size = batch_size
|
|
@@ -112,6 +113,7 @@ class UserImporter: # noqa: R0902
|
|
|
112
113
|
self.lock: asyncio.Lock = asyncio.Lock()
|
|
113
114
|
self.logs: dict = {"created": 0, "updated": 0, "failed": 0}
|
|
114
115
|
self.fields_to_protect = set(fields_to_protect)
|
|
116
|
+
self.no_progress = no_progress
|
|
115
117
|
|
|
116
118
|
@staticmethod
|
|
117
119
|
def build_ref_data_id_map(
|
|
@@ -929,7 +931,7 @@ class UserImporter: # noqa: R0902
|
|
|
929
931
|
)
|
|
930
932
|
self.progress = progress
|
|
931
933
|
self.task_progress = progress.add_task(
|
|
932
|
-
"Importing users: ", total=total_lines, created=0, updated=0, failed=0
|
|
934
|
+
"Importing users: ", total=total_lines, created=0, updated=0, failed=0, visible=not self.no_progress
|
|
933
935
|
) # Add a task to the progress bar
|
|
934
936
|
openfile.seek(0)
|
|
935
937
|
tasks = []
|
|
@@ -1108,6 +1110,11 @@ def main(
|
|
|
1108
1110
|
case_sensitive=False,
|
|
1109
1111
|
help="The default preferred contact type to use if the provided value is not valid or not present",
|
|
1110
1112
|
),
|
|
1113
|
+
no_progress: bool = typer.Option(
|
|
1114
|
+
False,
|
|
1115
|
+
"--no-progress",
|
|
1116
|
+
help="Disable progress bar display during user import",
|
|
1117
|
+
),
|
|
1111
1118
|
) -> None:
|
|
1112
1119
|
"""
|
|
1113
1120
|
Command-line interface to batch import users into FOLIO
|
|
@@ -1144,6 +1151,7 @@ def main(
|
|
|
1144
1151
|
update_only_present_fields,
|
|
1145
1152
|
default_preferred_contact_type.value,
|
|
1146
1153
|
fields_to_protect=protect_fields,
|
|
1154
|
+
no_progress=no_progress
|
|
1147
1155
|
)
|
|
1148
1156
|
asyncio.run(run_user_importer(importer, error_file_path))
|
|
1149
1157
|
except Exception as ee:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{folio_data_import-0.4.0 → folio_data_import-0.4.2}/src/folio_data_import/custom_exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|