folio-data-import 0.2.1__py3-none-any.whl → 0.2.3__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.

@@ -238,7 +238,7 @@ class UserImporter: # noqa: R0902
238
238
  None
239
239
  """
240
240
  mapped_departments = []
241
- for department in user_obj["departments"]:
241
+ for department in user_obj.pop("departments", []):
242
242
  try:
243
243
  mapped_departments.append(self.department_map[department])
244
244
  except KeyError:
@@ -250,7 +250,8 @@ class UserImporter: # noqa: R0902
250
250
  f'Row {line_number}: Department "{department}" not found, ' # noqa: B907
251
251
  f"excluding department from user\n"
252
252
  )
253
- user_obj["departments"] = mapped_departments
253
+ if mapped_departments:
254
+ user_obj["departments"] = mapped_departments
254
255
 
255
256
  async def update_existing_user(self, user_obj, existing_user) -> Tuple[dict, dict]:
256
257
  """
@@ -593,7 +594,9 @@ class UserImporter: # noqa: R0902
593
594
  await self.logfile.write(message + "\n")
594
595
  tasks = []
595
596
  if tasks:
597
+ start = time.time()
596
598
  await asyncio.gather(*tasks)
599
+ duration = time.time() - start
597
600
  async with self.lock:
598
601
  message = (
599
602
  f"{dt.now().isoformat(sep=' ', timespec='milliseconds')}: "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: folio_data_import
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: A python module to interact with the data importing capabilities of the open-source FOLIO ILS
5
5
  License: MIT
6
6
  Author: Brooks Travis
@@ -0,0 +1,9 @@
1
+ folio_data_import/MARCDataImport.py,sha256=IStQ--WpPtnoPunQLK-LBiWApA1n9PHdKeNaFWk01a0,19478
2
+ folio_data_import/UserImport.py,sha256=L9GT6HjcsPSIILTb5LwXuWjyNBl3J6ft4PC4fgoqweI,27910
3
+ folio_data_import/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ folio_data_import/__main__.py,sha256=kav_uUsnrIjGjVxQkk3exLKrc1mah9t2x3G6bGS-5I0,3710
5
+ folio_data_import-0.2.3.dist-info/LICENSE,sha256=qJX7wxMC7ky9Kq4v3zij8MjGEiC5wsB7pYeOhLj5TDk,1083
6
+ folio_data_import-0.2.3.dist-info/METADATA,sha256=zhDrLl8I8ymgN2BD4RQpmfKhKXpWJ52t7BNCrQ0lm7U,2420
7
+ folio_data_import-0.2.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
8
+ folio_data_import-0.2.3.dist-info/entry_points.txt,sha256=498SxWVXeEMRNw3PUf-eoReZvKewmYwPBtZhIUPr_Jg,192
9
+ folio_data_import-0.2.3.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- folio_data_import/MARCDataImport.py,sha256=IStQ--WpPtnoPunQLK-LBiWApA1n9PHdKeNaFWk01a0,19478
2
- folio_data_import/UserImport.py,sha256=XmExJ7VKHsMYRIeoczEzv1F8gnQO6pym_rz1y2KlKn4,27784
3
- folio_data_import/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- folio_data_import/__main__.py,sha256=kav_uUsnrIjGjVxQkk3exLKrc1mah9t2x3G6bGS-5I0,3710
5
- folio_data_import-0.2.1.dist-info/LICENSE,sha256=qJX7wxMC7ky9Kq4v3zij8MjGEiC5wsB7pYeOhLj5TDk,1083
6
- folio_data_import-0.2.1.dist-info/METADATA,sha256=Qh0yMC56C8gsfM7-54hVoUnRcYF-gDsRcPP-A_t2VkQ,2420
7
- folio_data_import-0.2.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
8
- folio_data_import-0.2.1.dist-info/entry_points.txt,sha256=498SxWVXeEMRNw3PUf-eoReZvKewmYwPBtZhIUPr_Jg,192
9
- folio_data_import-0.2.1.dist-info/RECORD,,