ods-tools 3.2.7__tar.gz → 3.2.9__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.
- {ods_tools-3.2.7 → ods_tools-3.2.9}/PKG-INFO +1 -1
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/__init__.py +1 -1
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/mapping/base.py +1 -1
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/oed/source.py +3 -3
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools.egg-info/PKG-INFO +1 -1
- {ods_tools-3.2.7 → ods_tools-3.2.9}/setup.py +2 -2
- {ods_tools-3.2.7 → ods_tools-3.2.9}/README.md +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/data/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/main.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/config.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/base.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/csv.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/db/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/db/base.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/db/errors.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/db/mssql.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/db/postgres.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/connector/db/sqlite.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/controller.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/data/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/errors.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/files/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/files/csv.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/files/yaml.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/log.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/mapping/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/mapping/errors.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/mapping/file.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/notset.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/runner/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/runner/base.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/runner/pandas.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/transformers/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/transformers/errors.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/transformers/grammar.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/transformers/transform.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/transformers/transform_utils.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/validator_base.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/odtf/validator_pandas.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/oed/__init__.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/oed/common.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/oed/exposure.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/oed/forex.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/oed/oed_schema.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/oed/setting_schema.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools/oed/validator.py +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools.egg-info/SOURCES.txt +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools.egg-info/dependency_links.txt +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools.egg-info/entry_points.txt +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools.egg-info/requires.txt +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/ods_tools.egg-info/top_level.txt +0 -0
- {ods_tools-3.2.7 → ods_tools-3.2.9}/setup.cfg +0 -0
|
@@ -278,7 +278,7 @@ class BaseMapping:
|
|
|
278
278
|
for transform in transform_list:
|
|
279
279
|
transform.parse()
|
|
280
280
|
if ((transform.transformation_tree is None or
|
|
281
|
-
|
|
281
|
+
not self.has_missing_columns(transform.transformation_tree, missing_columns)) and
|
|
282
282
|
(transform.when_tree is None or
|
|
283
283
|
not self.has_missing_columns(transform.when_tree, missing_columns))):
|
|
284
284
|
valid_transforms.append(transform)
|
|
@@ -283,8 +283,8 @@ class OedSource:
|
|
|
283
283
|
oed_df[column] = oed_df[column].cat.add_categories('')
|
|
284
284
|
oed_df[column] = oed_df[column] # make a copy f the col in case it is read_only
|
|
285
285
|
oed_df.loc[is_empty(oed_df, column), column] = ''
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
if pd.api.types.is_numeric_dtype(pd_dtype[column]): # make sure empty string are converted to nan
|
|
287
|
+
oed_df[column] = pd.to_numeric(oed_df[column], errors='coerce')
|
|
288
288
|
|
|
289
289
|
return oed_df.astype(to_tmp_dtype).astype(pd_dtype)
|
|
290
290
|
|
|
@@ -302,7 +302,7 @@ class OedSource:
|
|
|
302
302
|
"""
|
|
303
303
|
# set default values
|
|
304
304
|
for col, field_info in column_to_field.items():
|
|
305
|
-
fill_empty(df, col, OedSchema.get_default_from_ods_fields(ods_fields,
|
|
305
|
+
fill_empty(df, col, OedSchema.get_default_from_ods_fields(ods_fields, field_info['Input Field Name']))
|
|
306
306
|
|
|
307
307
|
# add required columns that allow blank values if missing
|
|
308
308
|
present_field = set(field_info['Input Field Name'] for field_info in column_to_field.values())
|
|
@@ -12,7 +12,7 @@ import json
|
|
|
12
12
|
|
|
13
13
|
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
|
|
14
14
|
|
|
15
|
-
OED_VERSION = '3.4.
|
|
15
|
+
OED_VERSION = '3.4.1'
|
|
16
16
|
# ORD_VERSION =
|
|
17
17
|
|
|
18
18
|
|
|
@@ -102,7 +102,7 @@ setuptools.setup(
|
|
|
102
102
|
include_package_data=True,
|
|
103
103
|
package_data={
|
|
104
104
|
"": ["*.md"], # Copy in readme
|
|
105
|
-
"ods_tools": ["data/*", "odtf/data
|
|
105
|
+
"ods_tools": ["data/*", "odtf/data/**/*"] # Copy spec JSON/CSV and YAML mappings
|
|
106
106
|
},
|
|
107
107
|
entry_points={
|
|
108
108
|
'console_scripts': [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|