folio-migration-tools 1.10.0b1__py3-none-any.whl → 1.10.0b3__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.
@@ -62,6 +62,18 @@ class FileDefinition(BaseModel):
62
62
  ),
63
63
  ),
64
64
  ] = True
65
+ data_import_marc: Annotated[
66
+ bool,
67
+ Field(
68
+ title="Data import MARC",
69
+ description=(
70
+ "If set to true, successfully processed MARC records from this file will "
71
+ "be included in the MARC file for data import generated by the parent task for "
72
+ "inventory records created from this file. Only applied for MARC-based "
73
+ "transformations."
74
+ ),
75
+ ),
76
+ ] = True
65
77
 
66
78
 
67
79
  class IlsFlavour(str, Enum):
@@ -93,8 +93,8 @@ class MarcFileProcessor:
93
93
  legacy_ids,
94
94
  self.object_type,
95
95
  )
96
- if getattr(self.mapper.task_configuration, "data_import_marc", False):
97
- self.save_marc_record(marc_record, folio_rec, self.object_type)
96
+
97
+ self.save_marc_record(marc_record, file_def, folio_rec, self.object_type)
98
98
  Helper.write_to_file(self.created_objects_file, folio_rec)
99
99
  self.mapper.migration_report.add_general_statistics(
100
100
  i18n.t("Inventory records written to disk")
@@ -131,13 +131,23 @@ class MarcFileProcessor:
131
131
  ):
132
132
  self.mapper.remove_from_id_map(folio_rec.get("formerIds", []))
133
133
 
134
- def save_marc_record(self, marc_record: Record, folio_rec: Dict, object_type: FOLIONamespaces):
135
- self.mapper.save_data_import_marc_record(
136
- self.data_import_marc_file,
137
- object_type,
138
- marc_record,
139
- folio_rec,
140
- )
134
+ def save_marc_record(
135
+ self,
136
+ marc_record: Record,
137
+ file_def: FileDefinition,
138
+ folio_rec: Dict,
139
+ object_type: FOLIONamespaces,
140
+ ):
141
+ if (
142
+ getattr(self.mapper.task_configuration, "data_import_marc", False)
143
+ and file_def.data_import_marc
144
+ ):
145
+ self.mapper.save_data_import_marc_record(
146
+ self.data_import_marc_file,
147
+ object_type,
148
+ marc_record,
149
+ folio_rec,
150
+ )
141
151
 
142
152
  def save_srs_record(
143
153
  self,
@@ -52,7 +52,8 @@ class MigrationTaskBase:
52
52
  self.ecs_tenant_id = (
53
53
  task_configuration.ecs_tenant_id or library_configuration.ecs_tenant_id
54
54
  )
55
- self.folio_client.tenant_id = self.ecs_tenant_id
55
+ if self.ecs_tenant_id:
56
+ self.folio_client.tenant_id = self.ecs_tenant_id
56
57
 
57
58
  self.central_folder_structure: Optional[FolderStructure] = None
58
59
  if library_configuration.is_ecs and library_configuration.ecs_central_iteration_identifier:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: folio-migration-tools
3
- Version: 1.10.0b1
3
+ Version: 1.10.0b3
4
4
  Summary: A tool allowing you to migrate data from legacy ILS:s (Library systems) into FOLIO LSP
5
5
  Keywords: FOLIO,ILS,LSP,Library Systems,MARC21,Library data
6
6
  Author: Theodor Tolstoy, Lisa Sjögren, Brooks Travis, Jeremy Nelson, Clinton Bradford
@@ -10,7 +10,7 @@ folio_migration_tools/folder_structure.py,sha256=yqeeB1uADw9J6TCHUxKOv7wrTglfAeX
10
10
  folio_migration_tools/helper.py,sha256=Jb-9PrMkgOUGYScRf8jMmGGTcPIohm3eFHenGSi3cUA,2979
11
11
  folio_migration_tools/holdings_helper.py,sha256=yJpz6aJrKRBiJ1MtT5bs2vXAc88uJuGh2_KDuCySOKc,7559
12
12
  folio_migration_tools/i18n_config.py,sha256=3AH_2b9zTsxE4XTe4isM_zYtPJSlK0ix6eBmV7kAYUM,228
13
- folio_migration_tools/library_configuration.py,sha256=N-wisWVi9rE9ojG4Z0nGOzxPb407MND-79Gkh1psnFk,8516
13
+ folio_migration_tools/library_configuration.py,sha256=lgfnY1yXIK-sNlfooV646H6O0QEUvF-yRRh-YdOGjG4,8993
14
14
  folio_migration_tools/mapper_base.py,sha256=NopqwmHXcNe6s7zKCzZzcy0Qp-rCrQGknepes0sw4ns,23725
15
15
  folio_migration_tools/mapping_file_transformation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  folio_migration_tools/mapping_file_transformation/courses_mapper.py,sha256=ZRQ8KNgmM4Ki3ZQ3eqwyceOM55Bn8t3ZT8Pn3T-wmK8,8092
@@ -28,7 +28,7 @@ folio_migration_tools/marc_rules_transformation/conditions.py,sha256=zzl18PsqUaX
28
28
  folio_migration_tools/marc_rules_transformation/holdings_statementsparser.py,sha256=-mOGtoPa3qmEqGWtyBTN-fQ743ZmT8caDLc9ES9J74Y,13667
29
29
  folio_migration_tools/marc_rules_transformation/hrid_handler.py,sha256=WudBOzCwcJAuhEm4urLhAk5OQWGfbKz9_4Ou8fmjm1E,10022
30
30
  folio_migration_tools/marc_rules_transformation/loc_language_codes.xml,sha256=ztn2_yKws6qySL4oSsZh7sOjxq5bCC1PhAnXJdtgmJ0,382912
31
- folio_migration_tools/marc_rules_transformation/marc_file_processor.py,sha256=qEhbEcstP2Yvm_7Vr0hmRyBptn6XPbhG0INi_Pb6SKg,12365
31
+ folio_migration_tools/marc_rules_transformation/marc_file_processor.py,sha256=o03d_G-4MR4e5VPfu7ljxAVDl79o2ONpQIqQ-V2RCdA,12523
32
32
  folio_migration_tools/marc_rules_transformation/marc_reader_wrapper.py,sha256=9ATjYMRAjy0QcXtmNZaHVhHLJ5hE1WUgOcF6KMJjbgo,5309
33
33
  folio_migration_tools/marc_rules_transformation/rules_mapper_authorities.py,sha256=fhe1vTt9F5u5PJliklSGP3TPZHRO3KV8GHeb-pdLdnA,9622
34
34
  folio_migration_tools/marc_rules_transformation/rules_mapper_base.py,sha256=ijOs9r0Mcx0XyNhDAq7fw1aFJ-JnAEhHx98-t262uRo,46158
@@ -45,7 +45,7 @@ folio_migration_tools/migration_tasks/holdings_marc_transformer.py,sha256=b1lWbY
45
45
  folio_migration_tools/migration_tasks/items_transformer.py,sha256=gIJ9SKUENE3OaEouGAFTsGjciN_YxwRoUAAEKJlfG-E,19498
46
46
  folio_migration_tools/migration_tasks/loans_migrator.py,sha256=6mwtA9-6B_pU1GKS9VD7Wu5stZ8YLlyeliFJhyPuho0,38785
47
47
  folio_migration_tools/migration_tasks/manual_fee_fines_transformer.py,sha256=CnmlTge7nChUJ10EiUkriQtJlVxWqglgfhjgneh2_yM,7247
48
- folio_migration_tools/migration_tasks/migration_task_base.py,sha256=AYkrypN4D4dfPO8Kj8l2mNsxcmIkj_1BG38UdC7vlrc,22304
48
+ folio_migration_tools/migration_tasks/migration_task_base.py,sha256=yg96RuRHgapDHNjLE-1Fg_gpRmaRmVx7GUm45lHTIBY,22339
49
49
  folio_migration_tools/migration_tasks/orders_transformer.py,sha256=h8EyRbvbtwDZJq1y73J7oZFRdI1U4vq1Vrlay4GLf4M,13885
50
50
  folio_migration_tools/migration_tasks/organization_transformer.py,sha256=5s-ACb9-R8JLlPnROOq1ZnDIRCLQeWaxORDn0SrhQqs,16747
51
51
  folio_migration_tools/migration_tasks/requests_migrator.py,sha256=Q7sWOxqq73Fdg3Q1tmpvRxU9qhhG1BV3AGMoCMwh2cE,14768
@@ -58,7 +58,7 @@ folio_migration_tools/transaction_migration/legacy_request.py,sha256=Kv7jpBIuZ_q
58
58
  folio_migration_tools/transaction_migration/legacy_reserve.py,sha256=qzw0okg4axAE_ezXopP9gFsQ_e60o0zh7zqRzFBSWHY,1806
59
59
  folio_migration_tools/transaction_migration/transaction_result.py,sha256=cTdCN0BnlI9_ZJB2Z3Fdkl9gpymIi-9mGZsRFlQcmDk,656
60
60
  folio_migration_tools/translations/en.json,sha256=4Ac66PR5Y78ll4_grhBm2IdTMsoZUv0q3IJvX8SQiJI,41778
61
- folio_migration_tools-1.10.0b1.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
62
- folio_migration_tools-1.10.0b1.dist-info/entry_points.txt,sha256=mJRRiCNP9j7_NpVXamHEiW8pDEjWQs1vEqD89G354cM,79
63
- folio_migration_tools-1.10.0b1.dist-info/METADATA,sha256=S629dTqv9fG2BF5Z2WsRKI5YRClB-wv_8frekt5zoyo,7162
64
- folio_migration_tools-1.10.0b1.dist-info/RECORD,,
61
+ folio_migration_tools-1.10.0b3.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
62
+ folio_migration_tools-1.10.0b3.dist-info/entry_points.txt,sha256=mJRRiCNP9j7_NpVXamHEiW8pDEjWQs1vEqD89G354cM,79
63
+ folio_migration_tools-1.10.0b3.dist-info/METADATA,sha256=SgteVRYKSUGrgKVAHV8y4706ylBe7LiFsp4tXtyBxOg,7162
64
+ folio_migration_tools-1.10.0b3.dist-info/RECORD,,