folio-data-import 0.4.0__py3-none-any.whl → 0.4.2__py3-none-any.whl

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.

@@ -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:
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: folio_data_import
3
- Version: 0.4.0
4
- Summary: A python module to interact with the data importing capabilities of the open-source FOLIO ILS
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.17.4,<0.18.0)
29
+ Requires-Dist: typer (>=0.19.2)
30
30
  Description-Content-Type: text/markdown
31
31
 
32
32
  # folio_data_import
@@ -1,13 +1,13 @@
1
1
  folio_data_import/MARCDataImport.py,sha256=ubTd7ROtqLavSmPNma2pI8ixjFZs7FEp5_oIuD0ONqo,42945
2
- folio_data_import/UserImport.py,sha256=ic2msCmHsU3cFWPd1edBbC7ltTCYxV8OFCvGd0cBcDQ,43048
2
+ folio_data_import/UserImport.py,sha256=ayfZERg-dqbLBITmAy5JjD8HTdbuo4ok32pqT-_lrw8,43337
3
3
  folio_data_import/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  folio_data_import/__main__.py,sha256=asGlYSuLpvNW5cwxcAH03iXtMcP_DpCdwhpYZy01org,269
5
5
  folio_data_import/_progress.py,sha256=QsZNHLjjNW3Q_NHIAuLgsigGXnV-COAvxIM6vO2ggnM,1010
6
6
  folio_data_import/custom_exceptions.py,sha256=1xw1BI5fW7WDd37zUIOcw0DAvrFKtklnqmbRhZXSAiE,1093
7
7
  folio_data_import/marc_preprocessors/__init__.py,sha256=urExfNTQoZsDCtDPcUY9EEC5OFcUihxhYEQkQFVzbMY,30
8
8
  folio_data_import/marc_preprocessors/_preprocessors.py,sha256=PuXWWzDLr0AJVS0rFcK5MiP_apSm0ewwTNRd_n8hMgc,16584
9
- folio_data_import-0.4.0.dist-info/METADATA,sha256=Ecy3voKtb7f647G1MHwvgWOH5LBJYaAHjB7yXGoFlMI,8530
10
- folio_data_import-0.4.0.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
11
- folio_data_import-0.4.0.dist-info/entry_points.txt,sha256=jRCg5w4I8s4qYRexIJJeVLSNZ142WVTn25tM84MetxM,174
12
- folio_data_import-0.4.0.dist-info/licenses/LICENSE,sha256=qJX7wxMC7ky9Kq4v3zij8MjGEiC5wsB7pYeOhLj5TDk,1083
13
- folio_data_import-0.4.0.dist-info/RECORD,,
9
+ folio_data_import-0.4.2.dist-info/METADATA,sha256=PbnTmb-rvOso-jfTNgut9OfAGafUq6vs5tV70hAZ14g,8547
10
+ folio_data_import-0.4.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
11
+ folio_data_import-0.4.2.dist-info/entry_points.txt,sha256=jRCg5w4I8s4qYRexIJJeVLSNZ142WVTn25tM84MetxM,174
12
+ folio_data_import-0.4.2.dist-info/licenses/LICENSE,sha256=qJX7wxMC7ky9Kq4v3zij8MjGEiC5wsB7pYeOhLj5TDk,1083
13
+ folio_data_import-0.4.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.0
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any