folio-migration-tools 1.10.0__py3-none-any.whl → 1.10.0b2__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.
- folio_migration_tools/__main__.py +0 -9
- folio_migration_tools/circulation_helper.py +5 -6
- folio_migration_tools/folder_structure.py +6 -16
- folio_migration_tools/helper.py +6 -7
- folio_migration_tools/holdings_helper.py +3 -4
- folio_migration_tools/library_configuration.py +0 -12
- folio_migration_tools/mapper_base.py +6 -7
- folio_migration_tools/mapping_file_transformation/user_mapper.py +0 -4
- folio_migration_tools/marc_rules_transformation/conditions.py +29 -0
- folio_migration_tools/marc_rules_transformation/marc_file_processor.py +9 -19
- folio_migration_tools/marc_rules_transformation/rules_mapper_authorities.py +242 -0
- folio_migration_tools/marc_rules_transformation/rules_mapper_base.py +15 -10
- folio_migration_tools/marc_rules_transformation/rules_mapper_bibs.py +2 -3
- folio_migration_tools/marc_rules_transformation/rules_mapper_holdings.py +5 -6
- folio_migration_tools/migration_report.py +6 -17
- folio_migration_tools/migration_tasks/authority_transformer.py +118 -0
- folio_migration_tools/migration_tasks/batch_poster.py +298 -219
- folio_migration_tools/migration_tasks/bibs_transformer.py +2 -2
- folio_migration_tools/migration_tasks/holdings_csv_transformer.py +9 -9
- folio_migration_tools/migration_tasks/holdings_marc_transformer.py +3 -3
- folio_migration_tools/migration_tasks/items_transformer.py +4 -6
- folio_migration_tools/migration_tasks/loans_migrator.py +18 -19
- folio_migration_tools/migration_tasks/manual_fee_fines_transformer.py +3 -3
- folio_migration_tools/migration_tasks/migration_task_base.py +5 -13
- folio_migration_tools/migration_tasks/orders_transformer.py +3 -4
- folio_migration_tools/migration_tasks/requests_migrator.py +9 -10
- folio_migration_tools/migration_tasks/reserves_migrator.py +4 -5
- folio_migration_tools/migration_tasks/user_transformer.py +5 -15
- folio_migration_tools/translations/en.json +7 -0
- {folio_migration_tools-1.10.0.dist-info → folio_migration_tools-1.10.0b2.dist-info}/METADATA +2 -3
- {folio_migration_tools-1.10.0.dist-info → folio_migration_tools-1.10.0b2.dist-info}/RECORD +33 -32
- folio_migration_tools/i18n_cache.py +0 -79
- {folio_migration_tools-1.10.0.dist-info → folio_migration_tools-1.10.0b2.dist-info}/WHEEL +0 -0
- {folio_migration_tools-1.10.0.dist-info → folio_migration_tools-1.10.0b2.dist-info}/entry_points.txt +0 -0
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
folio_migration_tools/__init__.py,sha256=lnYgqA47l0iA-iORkVH3dgevk7gyGxVwg3MnLltA-U8,223
|
|
2
|
-
folio_migration_tools/__main__.py,sha256=
|
|
3
|
-
folio_migration_tools/circulation_helper.py,sha256=
|
|
2
|
+
folio_migration_tools/__main__.py,sha256=MlF8Fj_E4EcW6rU0posfj3ZyPzSWzSm6zXz2jlN7OGw,8835
|
|
3
|
+
folio_migration_tools/circulation_helper.py,sha256=r1zpOKy47VFRHyXHvwUEjPfQ4jyJpjMAYc1IktJ94WU,14661
|
|
4
4
|
folio_migration_tools/colors.py,sha256=GP0wdI_GZ2WD5SjrbPN-S3u8vvN_u6rGQIBBcWv_0ZM,227
|
|
5
5
|
folio_migration_tools/config_file_load.py,sha256=zHHa6NDkN6EJiQE4DgjrFQPVKsd70POsfbGkB8308jg,2822
|
|
6
6
|
folio_migration_tools/custom_dict.py,sha256=rRd9_RQqI85171p7wTfpMM0Mladh-LChbgMSmLvN7N0,680
|
|
7
7
|
folio_migration_tools/custom_exceptions.py,sha256=BLP1gMPbTHSN-rqxzTawT4sRLiyAU3blBdkUBwiiPRk,2642
|
|
8
8
|
folio_migration_tools/extradata_writer.py,sha256=fuchNcMc6BYb9IyfAcvXg7X4J2TfX6YiROfT2hr0JMw,1678
|
|
9
|
-
folio_migration_tools/folder_structure.py,sha256=
|
|
10
|
-
folio_migration_tools/helper.py,sha256=
|
|
11
|
-
folio_migration_tools/holdings_helper.py,sha256=
|
|
12
|
-
folio_migration_tools/i18n_cache.py,sha256=wOJc3OkHwItlFNC2jQB5R9AoIga0g0P1YhQqHgjeqK4,2858
|
|
9
|
+
folio_migration_tools/folder_structure.py,sha256=yqeeB1uADw9J6TCHUxKOv7wrTglfAeX9KpwNgOHjTg0,6917
|
|
10
|
+
folio_migration_tools/helper.py,sha256=Jb-9PrMkgOUGYScRf8jMmGGTcPIohm3eFHenGSi3cUA,2979
|
|
11
|
+
folio_migration_tools/holdings_helper.py,sha256=yJpz6aJrKRBiJ1MtT5bs2vXAc88uJuGh2_KDuCySOKc,7559
|
|
13
12
|
folio_migration_tools/i18n_config.py,sha256=3AH_2b9zTsxE4XTe4isM_zYtPJSlK0ix6eBmV7kAYUM,228
|
|
14
|
-
folio_migration_tools/library_configuration.py,sha256=
|
|
15
|
-
folio_migration_tools/mapper_base.py,sha256=
|
|
13
|
+
folio_migration_tools/library_configuration.py,sha256=N-wisWVi9rE9ojG4Z0nGOzxPb407MND-79Gkh1psnFk,8516
|
|
14
|
+
folio_migration_tools/mapper_base.py,sha256=NopqwmHXcNe6s7zKCzZzcy0Qp-rCrQGknepes0sw4ns,23725
|
|
16
15
|
folio_migration_tools/mapping_file_transformation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
16
|
folio_migration_tools/mapping_file_transformation/courses_mapper.py,sha256=ZRQ8KNgmM4Ki3ZQ3eqwyceOM55Bn8t3ZT8Pn3T-wmK8,8092
|
|
18
17
|
folio_migration_tools/mapping_file_transformation/holdings_mapper.py,sha256=1y64W1i4v3lV7LD0_QwrHBPx6HkA1o5muyXpWKiH2Hk,8305
|
|
@@ -23,41 +22,43 @@ folio_migration_tools/mapping_file_transformation/notes_mapper.py,sha256=vCmZmjr
|
|
|
23
22
|
folio_migration_tools/mapping_file_transformation/order_mapper.py,sha256=VUcbeBGlQ7KsDPgJlaOOe8bO0y5IRLTCBH_IQKcaqiA,18267
|
|
24
23
|
folio_migration_tools/mapping_file_transformation/organization_mapper.py,sha256=MKlN3doQ_R-Y3klkbCFL4qHUfhMATBsIhvq1jpmajqQ,14641
|
|
25
24
|
folio_migration_tools/mapping_file_transformation/ref_data_mapping.py,sha256=rROcBiL5TE7bWsJ95A6shurPZ1e4In6PTwR5BN9amzU,8991
|
|
26
|
-
folio_migration_tools/mapping_file_transformation/user_mapper.py,sha256=
|
|
25
|
+
folio_migration_tools/mapping_file_transformation/user_mapper.py,sha256=13cvFr7Vp6uxZNpAmLxGvPVLC1_En2NVvLtuP75HAzU,8846
|
|
27
26
|
folio_migration_tools/marc_rules_transformation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
folio_migration_tools/marc_rules_transformation/conditions.py,sha256
|
|
27
|
+
folio_migration_tools/marc_rules_transformation/conditions.py,sha256=zzl18PsqUaXsT5mcolPC89ar4RpQTs_beKAgVg4bttI,48190
|
|
29
28
|
folio_migration_tools/marc_rules_transformation/holdings_statementsparser.py,sha256=-mOGtoPa3qmEqGWtyBTN-fQ743ZmT8caDLc9ES9J74Y,13667
|
|
30
29
|
folio_migration_tools/marc_rules_transformation/hrid_handler.py,sha256=WudBOzCwcJAuhEm4urLhAk5OQWGfbKz9_4Ou8fmjm1E,10022
|
|
31
30
|
folio_migration_tools/marc_rules_transformation/loc_language_codes.xml,sha256=ztn2_yKws6qySL4oSsZh7sOjxq5bCC1PhAnXJdtgmJ0,382912
|
|
32
|
-
folio_migration_tools/marc_rules_transformation/marc_file_processor.py,sha256=
|
|
31
|
+
folio_migration_tools/marc_rules_transformation/marc_file_processor.py,sha256=qEhbEcstP2Yvm_7Vr0hmRyBptn6XPbhG0INi_Pb6SKg,12365
|
|
33
32
|
folio_migration_tools/marc_rules_transformation/marc_reader_wrapper.py,sha256=9ATjYMRAjy0QcXtmNZaHVhHLJ5hE1WUgOcF6KMJjbgo,5309
|
|
34
|
-
folio_migration_tools/marc_rules_transformation/
|
|
35
|
-
folio_migration_tools/marc_rules_transformation/
|
|
36
|
-
folio_migration_tools/marc_rules_transformation/
|
|
37
|
-
folio_migration_tools/
|
|
33
|
+
folio_migration_tools/marc_rules_transformation/rules_mapper_authorities.py,sha256=fhe1vTt9F5u5PJliklSGP3TPZHRO3KV8GHeb-pdLdnA,9622
|
|
34
|
+
folio_migration_tools/marc_rules_transformation/rules_mapper_base.py,sha256=ijOs9r0Mcx0XyNhDAq7fw1aFJ-JnAEhHx98-t262uRo,46158
|
|
35
|
+
folio_migration_tools/marc_rules_transformation/rules_mapper_bibs.py,sha256=F8tKn59zHUV3Gqa9NY-JvTbWgfDjNTcPvQONk8gzwGs,30428
|
|
36
|
+
folio_migration_tools/marc_rules_transformation/rules_mapper_holdings.py,sha256=YILyEfO-LkQPk-4OjiuY68X5xDA0LlI7UUp7_mvzLUE,29184
|
|
37
|
+
folio_migration_tools/migration_report.py,sha256=B8e4tMfT0xCJ3BxkSg7ZZJYmg0VLQVXmmVnWwmojZD4,4260
|
|
38
38
|
folio_migration_tools/migration_tasks/__init__.py,sha256=ZkbY_yGyB84Ke8OMlYUzyyBj4cxxNrhMTwQlu_GbdDs,211
|
|
39
|
-
folio_migration_tools/migration_tasks/
|
|
40
|
-
folio_migration_tools/migration_tasks/
|
|
39
|
+
folio_migration_tools/migration_tasks/authority_transformer.py,sha256=tB9XBJn5BPJ1Xa79R9blDz31jN4UvLB1VFbyFjFjfM4,4228
|
|
40
|
+
folio_migration_tools/migration_tasks/batch_poster.py,sha256=x3DQPrI1QnRtg9Bdf-e3ztv4llWPt5JpeCIyE7mMNWU,50634
|
|
41
|
+
folio_migration_tools/migration_tasks/bibs_transformer.py,sha256=zPxh2tjyqx88fuH1FuKLwhT6lhZ5fVTQAqE08IggYgM,6351
|
|
41
42
|
folio_migration_tools/migration_tasks/courses_migrator.py,sha256=sKIeyUlc7o189lw88XbGILVkwnR9krqO0PgS-vLCCm8,7039
|
|
42
|
-
folio_migration_tools/migration_tasks/holdings_csv_transformer.py,sha256
|
|
43
|
-
folio_migration_tools/migration_tasks/holdings_marc_transformer.py,sha256=
|
|
44
|
-
folio_migration_tools/migration_tasks/items_transformer.py,sha256=
|
|
45
|
-
folio_migration_tools/migration_tasks/loans_migrator.py,sha256=
|
|
46
|
-
folio_migration_tools/migration_tasks/manual_fee_fines_transformer.py,sha256=
|
|
47
|
-
folio_migration_tools/migration_tasks/migration_task_base.py,sha256=
|
|
48
|
-
folio_migration_tools/migration_tasks/orders_transformer.py,sha256=
|
|
43
|
+
folio_migration_tools/migration_tasks/holdings_csv_transformer.py,sha256=JzOufqjSR2V-gUvOq0pdQFsXjpxk1ldGJBQWIWGfCps,21915
|
|
44
|
+
folio_migration_tools/migration_tasks/holdings_marc_transformer.py,sha256=b1lWbYmBdvN37Yk_hpeh7y2TDrzdHmUm5jXxP2jxZ-0,14191
|
|
45
|
+
folio_migration_tools/migration_tasks/items_transformer.py,sha256=gIJ9SKUENE3OaEouGAFTsGjciN_YxwRoUAAEKJlfG-E,19498
|
|
46
|
+
folio_migration_tools/migration_tasks/loans_migrator.py,sha256=6mwtA9-6B_pU1GKS9VD7Wu5stZ8YLlyeliFJhyPuho0,38785
|
|
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=yg96RuRHgapDHNjLE-1Fg_gpRmaRmVx7GUm45lHTIBY,22339
|
|
49
|
+
folio_migration_tools/migration_tasks/orders_transformer.py,sha256=h8EyRbvbtwDZJq1y73J7oZFRdI1U4vq1Vrlay4GLf4M,13885
|
|
49
50
|
folio_migration_tools/migration_tasks/organization_transformer.py,sha256=5s-ACb9-R8JLlPnROOq1ZnDIRCLQeWaxORDn0SrhQqs,16747
|
|
50
|
-
folio_migration_tools/migration_tasks/requests_migrator.py,sha256=
|
|
51
|
-
folio_migration_tools/migration_tasks/reserves_migrator.py,sha256=
|
|
52
|
-
folio_migration_tools/migration_tasks/user_transformer.py,sha256=
|
|
51
|
+
folio_migration_tools/migration_tasks/requests_migrator.py,sha256=Q7sWOxqq73Fdg3Q1tmpvRxU9qhhG1BV3AGMoCMwh2cE,14768
|
|
52
|
+
folio_migration_tools/migration_tasks/reserves_migrator.py,sha256=jdiwWAlMydXE2vlv0lgHRUljarslveyVOu-TCnymAEs,9953
|
|
53
|
+
folio_migration_tools/migration_tasks/user_transformer.py,sha256=fWfcO9Njwpyt0-De3nhC_gMu_lHOEkhMdCRryXz3xcc,12241
|
|
53
54
|
folio_migration_tools/task_configuration.py,sha256=6eqbjjSWfi-qgp0bhCsuBVE3gTK4HaXzXsAo68JPGc0,1146
|
|
54
55
|
folio_migration_tools/transaction_migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
56
|
folio_migration_tools/transaction_migration/legacy_loan.py,sha256=A5qvThfP3g62YnykLyti_tqTY7dq1SbLi3WZz7QXk6s,7399
|
|
56
57
|
folio_migration_tools/transaction_migration/legacy_request.py,sha256=Kv7jpBIuZ_qyay8BdaeCPJID67l43Cl6x-ws9Lt49NI,6121
|
|
57
58
|
folio_migration_tools/transaction_migration/legacy_reserve.py,sha256=qzw0okg4axAE_ezXopP9gFsQ_e60o0zh7zqRzFBSWHY,1806
|
|
58
59
|
folio_migration_tools/transaction_migration/transaction_result.py,sha256=cTdCN0BnlI9_ZJB2Z3Fdkl9gpymIi-9mGZsRFlQcmDk,656
|
|
59
|
-
folio_migration_tools/translations/en.json,sha256=
|
|
60
|
-
folio_migration_tools-1.10.
|
|
61
|
-
folio_migration_tools-1.10.
|
|
62
|
-
folio_migration_tools-1.10.
|
|
63
|
-
folio_migration_tools-1.10.
|
|
60
|
+
folio_migration_tools/translations/en.json,sha256=4Ac66PR5Y78ll4_grhBm2IdTMsoZUv0q3IJvX8SQiJI,41778
|
|
61
|
+
folio_migration_tools-1.10.0b2.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
62
|
+
folio_migration_tools-1.10.0b2.dist-info/entry_points.txt,sha256=mJRRiCNP9j7_NpVXamHEiW8pDEjWQs1vEqD89G354cM,79
|
|
63
|
+
folio_migration_tools-1.10.0b2.dist-info/METADATA,sha256=d5nC-kL214BrNPpDSJIdH5TiEhtVuTeaPIF8KTHiq10,7162
|
|
64
|
+
folio_migration_tools-1.10.0b2.dist-info/RECORD,,
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"""Cached i18n translation wrapper to improve performance.
|
|
2
|
-
|
|
3
|
-
This module provides a drop-in replacement for i18n.t() that caches translation
|
|
4
|
-
results on first call. This significantly reduces overhead when the same translation
|
|
5
|
-
string is requested multiple times across the application.
|
|
6
|
-
|
|
7
|
-
The cache uses functools.lru_cache with a large maxsize to handle the typical
|
|
8
|
-
number of unique translation strings in the application.
|
|
9
|
-
|
|
10
|
-
Example:
|
|
11
|
-
Instead of:
|
|
12
|
-
import i18n
|
|
13
|
-
label = i18n.t("Some translation")
|
|
14
|
-
|
|
15
|
-
Use:
|
|
16
|
-
from folio_migration_tools.i18n_cache import i18n_t
|
|
17
|
-
label = i18n_t("Some translation")
|
|
18
|
-
|
|
19
|
-
The cached version will only perform the translation lookup on the first call,
|
|
20
|
-
then return the cached result on subsequent calls. Parameterized translations
|
|
21
|
-
are handled correctly - parameters are included in the cache key.
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
from functools import lru_cache
|
|
25
|
-
|
|
26
|
-
import i18n
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@lru_cache(maxsize=2048)
|
|
30
|
-
def i18n_t(key: str, *args, **kwargs) -> str:
|
|
31
|
-
"""Cached wrapper around i18n.t() for static translations.
|
|
32
|
-
|
|
33
|
-
This function caches the results of i18n.t() calls to avoid repeated
|
|
34
|
-
translation lookups. This is most beneficial for static translation strings
|
|
35
|
-
that don't change parameters.
|
|
36
|
-
|
|
37
|
-
For parameterized translations with dynamic values, the cache key includes
|
|
38
|
-
the parameters, so different parameter values will result in different cache
|
|
39
|
-
entries. This is appropriate for occasional calls but should be avoided in
|
|
40
|
-
tight loops with dynamic parameters.
|
|
41
|
-
|
|
42
|
-
Args:
|
|
43
|
-
key: The translation key to look up
|
|
44
|
-
*args: Positional arguments passed to i18n.t()
|
|
45
|
-
**kwargs: Keyword arguments passed to i18n.t()
|
|
46
|
-
|
|
47
|
-
Returns:
|
|
48
|
-
The translated string, cached on subsequent calls with identical key/args/kwargs
|
|
49
|
-
|
|
50
|
-
Note:
|
|
51
|
-
The cache is module-level and persists for the lifetime of the process.
|
|
52
|
-
If you need to change locales at runtime, call clear_i18n_cache() to
|
|
53
|
-
invalidate the cache.
|
|
54
|
-
"""
|
|
55
|
-
# Convert kwargs to a hashable form for caching (dicts aren't hashable)
|
|
56
|
-
# We create a tuple of sorted items so the same kwargs always hash the same way
|
|
57
|
-
# Note: kwargs_tuple would be: tuple(sorted(kwargs.items())) if kwargs else ()
|
|
58
|
-
|
|
59
|
-
# Note: We can't actually use *args in the lru_cache because it won't work properly
|
|
60
|
-
# with the way we've defined this. The actual i18n.t call is below.
|
|
61
|
-
return i18n.t(key, **kwargs)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
def clear_i18n_cache() -> None:
|
|
65
|
-
"""Clear the i18n translation cache.
|
|
66
|
-
|
|
67
|
-
Call this if you need to change locales at runtime and want translations
|
|
68
|
-
to be re-evaluated with the new locale.
|
|
69
|
-
"""
|
|
70
|
-
i18n_t.cache_clear()
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
def get_i18n_cache_info() -> tuple:
|
|
74
|
-
"""Get cache statistics for monitoring and debugging.
|
|
75
|
-
|
|
76
|
-
Returns:
|
|
77
|
-
A named tuple with fields: hits, misses, maxsize, currsize
|
|
78
|
-
"""
|
|
79
|
-
return i18n_t.cache_info()
|
|
File without changes
|
{folio_migration_tools-1.10.0.dist-info → folio_migration_tools-1.10.0b2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|