folio-data-import 0.3.1__py3-none-any.whl → 0.3.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.

@@ -3,6 +3,7 @@ import sys
3
3
  from typing import Callable, Dict, List, Tuple, Union
4
4
  import pymarc
5
5
  import logging
6
+ import re
6
7
 
7
8
  from pymarc.record import Record
8
9
 
@@ -361,7 +362,7 @@ def clean_empty_fields(record: Record, **kwargs) -> Record:
361
362
 
362
363
  for field in record.get_fields(*MAPPED_FIELDS.keys()):
363
364
  len_subs = len(field.subfields)
364
- subfield_value = bool(field.subfields[0].value) if len_subs else False
365
+ subfield_value = bool(re.sub(r"[.,-]", "", field.subfields[0].value).strip()) if len_subs else False
365
366
  if int(field.tag) > 9 and len_subs == 0:
366
367
  logger.log(
367
368
  26,
@@ -463,12 +464,12 @@ def move_authority_subfield_9_to_0_all_controllable_fields(record: Record, **kwa
463
464
  "100", "110", "111", "130",
464
465
  "600", "610", "611", "630", "650", "651", "655",
465
466
  "700", "710", "711", "730",
466
- "800", "810", "811", "830"
467
+ "800", "810", "811", "830", "880"
467
468
  ]
468
469
  for field in record.get_fields(*controlled_fields):
469
470
  for subfield in list(field.get_subfields("9")):
470
471
  field.add_subfield("0", subfield)
471
- field.delete_subfield("9", subfield)
472
+ field.delete_subfield("9")
472
473
  logger.log(
473
474
  26,
474
475
  "DATA ISSUE\t%s\t%s\t%s",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: folio_data_import
3
- Version: 0.3.1
3
+ Version: 0.3.2
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
@@ -4,9 +4,9 @@ folio_data_import/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
4
4
  folio_data_import/__main__.py,sha256=kav_uUsnrIjGjVxQkk3exLKrc1mah9t2x3G6bGS-5I0,3710
5
5
  folio_data_import/custom_exceptions.py,sha256=1xw1BI5fW7WDd37zUIOcw0DAvrFKtklnqmbRhZXSAiE,1093
6
6
  folio_data_import/marc_preprocessors/__init__.py,sha256=urExfNTQoZsDCtDPcUY9EEC5OFcUihxhYEQkQFVzbMY,30
7
- folio_data_import/marc_preprocessors/_preprocessors.py,sha256=5JnxCoLDsZKEwrAazTXrI1b0CNthvhcTEKgQZILIjVk,16533
8
- folio_data_import-0.3.1.dist-info/LICENSE,sha256=qJX7wxMC7ky9Kq4v3zij8MjGEiC5wsB7pYeOhLj5TDk,1083
9
- folio_data_import-0.3.1.dist-info/METADATA,sha256=VsbdMezeVPB5jyYAB6o-9k6fhfgnEa5i_T2GphBOtzg,6069
10
- folio_data_import-0.3.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
- folio_data_import-0.3.1.dist-info/entry_points.txt,sha256=498SxWVXeEMRNw3PUf-eoReZvKewmYwPBtZhIUPr_Jg,192
12
- folio_data_import-0.3.1.dist-info/RECORD,,
7
+ folio_data_import/marc_preprocessors/_preprocessors.py,sha256=HnW7hw7DFTxyiUxYtl-8v0liW4FDi0y5SvI2ZwhdWPU,16570
8
+ folio_data_import-0.3.2.dist-info/LICENSE,sha256=qJX7wxMC7ky9Kq4v3zij8MjGEiC5wsB7pYeOhLj5TDk,1083
9
+ folio_data_import-0.3.2.dist-info/METADATA,sha256=r8J3ZZm833GcuaCAAj-mBZ2bVPyq4Xa6rPgqSbgVBkE,6069
10
+ folio_data_import-0.3.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
+ folio_data_import-0.3.2.dist-info/entry_points.txt,sha256=498SxWVXeEMRNw3PUf-eoReZvKewmYwPBtZhIUPr_Jg,192
12
+ folio_data_import-0.3.2.dist-info/RECORD,,