diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 102d087..0000000 --- a/setup.cfg +++ /dev/null @@ -1,37 +0,0 @@ -[metadata] -name = robotframework-datadriver -version = attr: src.DataDriver.DataDriver.__version__ -author = René Rohner(Snooz82) -author_email = snooz@posteo.de -description = A library for Data-Driven Testing. -long_description = file: Readme.rst -long_description_content_type = text/x-rst -url = https://github.com/Snooz82/robotframework-datadriver -classifiers = - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - License :: OSI Approved :: Apache Software License - Operating System :: OS Independent - Topic :: Software Development :: Testing - Topic :: Software Development :: Testing :: Acceptance - Framework :: Robot Framework - -[options] -packages = find: -package_dir = - = src -install_requires = - robotframework >= 4.0.2 - docutils - Pygments -python_requires = >=3.6.15 - -[options.extras_require] -xls = - pandas - xlrd >= 1.2.0 - openpyxl - -[options.packages.find] -where = src \ No newline at end of file diff --git a/setup.py b/setup.py index 0936043..3ba6640 100644 --- a/setup.py +++ b/setup.py @@ -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="snooz@posteo.de", + 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", +) diff --git a/src/DataDriver/DataDriver.py b/src/DataDriver/DataDriver.py index 086970c..8d70548 100644 --- a/src/DataDriver/DataDriver.py +++ b/src/DataDriver/DataDriver.py @@ -49,7 +49,7 @@ warn, ) -__version__ = "1.7.0" +__version__ = "1.8.0" class DataDriver: diff --git a/src/DataDriver/xlsx_reader.py b/src/DataDriver/xlsx_reader.py index 99fd4b0..122b230 100644 --- a/src/DataDriver/xlsx_reader.py +++ b/src/DataDriver/xlsx_reader.py @@ -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)