Skip to content

Commit

Permalink
fixed Pandas 2.0 interpreting valid string "None" as NaN (NoneType)
Browse files Browse the repository at this point in the history
  • Loading branch information
Snooz82 committed Jun 13, 2023
1 parent be50356 commit 8cc4137
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 41 deletions.
37 changes: 0 additions & 37 deletions setup.cfg

This file was deleted.

42 changes: 40 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
from setuptools import setup # type: ignore
from setuptools import setup
from setuptools import find_packages
import re
from pathlib import Path

setup()

with Path("Readme.rst").open(encoding="utf-8") as fh:
long_description = fh.read()

with (Path(__file__).resolve().parent / "src" / "DataDriver" / "DataDriver.py").open(encoding="utf-8") as f:
VERSION = re.search('\n__version__ = "(.*)"', f.read()).group(1)

setup(
name="robotframework-datadriver",
version=VERSION,
author="René Rohner(Snooz82)",
author_email="[email protected]",
description="A library for Data-Driven Testing.",
long_description=long_description,
long_description_content_type="text/x-rst",
url="https://github.com/Snooz82/robotframework-datadriver",
package_dir={"": "src"},
packages=find_packages("src"),
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Acceptance",
"Framework :: Robot Framework",
],
install_requires=["robotframework >= 4.0.2", "docutils", "Pygments"],
extras_require={"xls": ["pandas", "xlrd >= 1.2.0", "openpyxl"]},
python_requires=">=3.7.12",
)
2 changes: 1 addition & 1 deletion src/DataDriver/DataDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
warn,
)

__version__ = "1.7.0"
__version__ = "1.8.0"


class DataDriver:
Expand Down
2 changes: 1 addition & 1 deletion src/DataDriver/xlsx_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ def get_data_from_source(self):

def read_data_frame_from_file(self, dtype):
return pd.read_excel(
self.file, sheet_name=self.sheet_name, dtype=dtype, engine="openpyxl"
self.file, sheet_name=self.sheet_name, dtype=dtype, engine="openpyxl", na_filter=False
).replace(nan, "", regex=True)

0 comments on commit 8cc4137

Please sign in to comment.