python-table-converter 0.2.2__tar.gz → 0.2.3__tar.gz
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.
- {python_table_converter-0.2.2 → python_table_converter-0.2.3}/PKG-INFO +1 -1
- {python_table_converter-0.2.2 → python_table_converter-0.2.3}/pyproject.toml +1 -1
- python_table_converter-0.2.3/table_converter/__init__.py +2 -0
- {python_table_converter-0.2.2 → python_table_converter-0.2.3}/table_converter/core/convert.py +3 -5
- python_table_converter-0.2.2/table_converter/__init__.py +0 -2
- {python_table_converter-0.2.2 → python_table_converter-0.2.3}/LICENSE +0 -0
- {python_table_converter-0.2.2 → python_table_converter-0.2.3}/README.md +0 -0
- {python_table_converter-0.2.2 → python_table_converter-0.2.3}/table_converter/cli.py +0 -0
- {python_table_converter-0.2.2 → python_table_converter-0.2.3}/table_converter/commands/convert_tables.py +0 -0
- {python_table_converter-0.2.2 → python_table_converter-0.2.3}/table_converter/core/config.py +0 -0
{python_table_converter-0.2.2 → python_table_converter-0.2.3}/table_converter/core/convert.py
RENAMED
|
@@ -251,19 +251,17 @@ def convert(
|
|
|
251
251
|
ic()
|
|
252
252
|
ic(input_files)
|
|
253
253
|
df_list = []
|
|
254
|
-
dict_constants: OrderedDict | None = None
|
|
255
254
|
dict_formats: OrderedDict | None = None
|
|
256
255
|
dict_assign_ids= None
|
|
257
256
|
root_id_stat = create_id_stat_node()
|
|
258
257
|
config = setup_config(config_path)
|
|
259
258
|
ic(config)
|
|
260
259
|
if assign_constants:
|
|
261
|
-
dict_constants = OrderedDict()
|
|
262
260
|
fields = assign_constants.split(',')
|
|
263
261
|
for field in fields:
|
|
264
262
|
if '=' in field:
|
|
265
263
|
dst, src = field.split('=')
|
|
266
|
-
|
|
264
|
+
config.process.assign_constants[dst] = src
|
|
267
265
|
else:
|
|
268
266
|
raise ValueError(f'Invalid constant assignment: {field}')
|
|
269
267
|
if assign_formats:
|
|
@@ -327,8 +325,8 @@ def convert(
|
|
|
327
325
|
new_row = OrderedDict(row)
|
|
328
326
|
set_field_value(new_row, '__debug__.__original__', orig)
|
|
329
327
|
set_field_value(new_row, '__debug__.__file__', input_file)
|
|
330
|
-
if
|
|
331
|
-
new_row = map_constants(new_row,
|
|
328
|
+
if config.process.assign_constants:
|
|
329
|
+
new_row = map_constants(new_row, config.process.assign_constants)
|
|
332
330
|
if config.map:
|
|
333
331
|
new_row = remap_columns(new_row, config.map)
|
|
334
332
|
if config.process.split_by_newline:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_table_converter-0.2.2 → python_table_converter-0.2.3}/table_converter/core/config.py
RENAMED
|
File without changes
|