diff --git a/Cargo.lock b/Cargo.lock index 742f49f..efe28bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1410,7 +1410,7 @@ dependencies = [ [[package]] name = "pyfusion" -version = "2.0.0" +version = "2.0.1-dev0" dependencies = [ "bincode", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 8ee2aea..16f4e3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyfusion" -version = "2.0.0" +version = "2.0.1-dev0" edition = "2021" diff --git a/py_src/fusion/__init__.py b/py_src/fusion/__init__.py index f721f53..ad37df2 100644 --- a/py_src/fusion/__init__.py +++ b/py_src/fusion/__init__.py @@ -2,7 +2,7 @@ __author__ = """Fusion Devs""" __email__ = "fusion_developers@jpmorgan.com" -__version__ = "2.0.0" +__version__ = "2.0.1-dev0" from fusion._fusion import FusionCredentials from fusion.fs_sync import fsync diff --git a/py_src/fusion/attributes.py b/py_src/fusion/attributes.py index d8a1056..7c30149 100644 --- a/py_src/fusion/attributes.py +++ b/py_src/fusion/attributes.py @@ -2,7 +2,7 @@ from __future__ import annotations -from dataclasses import asdict, dataclass, field, fields +from dataclasses import dataclass, field, fields from typing import TYPE_CHECKING, Any, cast import numpy as np @@ -280,10 +280,9 @@ def to_dict(self: Attribute) -> dict[str, Any]: >>> attribute_dict = attribute.to_dict() """ - result = asdict(self) + result = {k: v for k, v in self.__dict__.items() if not k.startswith("_")} result["unit"] = str(self.unit) if self.unit is not None else None result["dataType"] = self.dataType.name - result.pop("_client") return result def create( diff --git a/py_src/fusion/dataset.py b/py_src/fusion/dataset.py index 334104e..46971cf 100644 --- a/py_src/fusion/dataset.py +++ b/py_src/fusion/dataset.py @@ -3,7 +3,7 @@ from __future__ import annotations import json as js -from dataclasses import asdict, dataclass, field, fields +from dataclasses import dataclass, field, fields from typing import TYPE_CHECKING, Any import pandas as pd @@ -426,9 +426,9 @@ def to_dict(self) -> dict[str, Any]: >>> dataset_dict = dataset.to_dict() """ - dataset_dict = asdict(self) + dataset_dict = {k: v for k, v in self.__dict__.items() if not k.startswith("_")} + dataset_dict["type"] = dataset_dict.pop("type_") - dataset_dict.pop("_client") return dataset_dict def create( diff --git a/py_src/fusion/product.py b/py_src/fusion/product.py index 91874ca..e743ffe 100644 --- a/py_src/fusion/product.py +++ b/py_src/fusion/product.py @@ -3,7 +3,7 @@ from __future__ import annotations import json as js -from dataclasses import asdict, dataclass, field, fields +from dataclasses import dataclass, field, fields from typing import TYPE_CHECKING, Any import pandas as pd @@ -364,8 +364,7 @@ def to_dict(self: Product) -> dict[str, Any]: >>> product_dict = product.to_dict() """ - product_dict = asdict(self) - product_dict.pop("_client") + product_dict = {k: v for k, v in self.__dict__.items() if not k.startswith("_")} return product_dict def create( diff --git a/pyproject.toml b/pyproject.toml index 2de8096..a50cd5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pyfusion" -version = "2.0.0" +version = "2.0.1-dev0" homepage = "https://github.com/jpmorganchase/fusion" description = "JPMC Fusion Developer Tools" @@ -237,7 +237,7 @@ exclude_lines = [ [tool.bumpversion] -current_version = "2.0.0" +current_version = "2.0.1-dev0" parse = '(?P\d+)\.(?P\d+)\.(?P\d+)(?:-(?P[a-z]+)(?P\d+))?' serialize = [ '{major}.{minor}.{patch}-{release}{candidate}',