Coverage for setup.py: 0%

17 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2025-10-10 13:57 +0000

1"""Setup.py script for the FiLiP-Library""" 

2 

3import re 

4import setuptools 

5 

6# read the contents of your README file 

7from pathlib import Path 

8 

9readme_path = Path(__file__).parent.joinpath("README.md") 

10LONG_DESCRIPTION = readme_path.read_text(encoding="utf-8") 

11 

12INSTALL_REQUIRES = [ 

13 "aenum~=3.1.15", 

14 "datamodel_code_generator[http]~=0.25.0", 

15 "paho-mqtt~=2.0.0", 

16 "pandas_datapackage_reader~=0.18.0", 

17 "pydantic>=2.6.0,<2.9.0", 

18 "pydantic-settings>=2.0.0,<2.3.0", 

19 "geojson_pydantic~=1.0.2", 

20 "stringcase>=1.2.0", 

21 "regex~=2023.10.3", 

22 "requests~=2.32.0", 

23 "rapidfuzz~=3.4.0", 

24 "geojson-pydantic~=1.0.2", 

25 "wget~=3.2", 

26 "PyLD~=2.0.4", 

27 "pyjexl~=0.3.0", 

28 "packaging~=24.1", 

29 "matplotlib~=3.9.4", 

30] 

31 

32SETUP_REQUIRES = INSTALL_REQUIRES.copy() 

33 

34 

35def get_version(): 

36 init_py = Path(__file__).parent.joinpath("filip", "__init__.py") 

37 with open(init_py, "r") as f: 

38 content = f.read() 

39 # Using a regular expression to find the version string 

40 match = re.search(r"^__version__\s*=\s*['\"]([^'\"]*)['\"]", content, re.M) 

41 if match: 

42 return match.group(1) 

43 raise RuntimeError("Unable to find version string.") 

44 

45 

46VERSION = get_version() 

47 

48setuptools.setup( 

49 name="filip", 

50 version=VERSION, 

51 author="RWTH Aachen University, E.ON Energy Research Center, Institute\ 

52 of Energy Efficient Buildings and Indoor Climate", 

53 author_email="ebc-tools@eonerc.rwth-aachen.de", 

54 description="[FI]WARE [Li]brary for [P]ython", 

55 long_description=LONG_DESCRIPTION, 

56 long_description_content_type="text/markdown", 

57 url="https://github.com/RWTH-EBC/filip", 

58 download_url=f"https://github.com/RWTH-EBC/FiLiP/archive/refs/tags/v{VERSION}.tar.gz", 

59 project_urls={ 

60 "Documentation": "https://rwth-ebc.github.io/FiLiP/master/docs/index.html", 

61 "Source": "https://github.com/RWTH-EBC/filip", 

62 "Download": f"https://github.com/RWTH-EBC/FiLiP/archive/refs/tags/v{VERSION}.tar.gz", 

63 }, 

64 # Specify the Python versions you support here. In particular, ensure 

65 # that you indicate whether you support Python 2, Python 3 or both. 

66 classifiers=[ 

67 "Development Status :: 3 - Alpha", 

68 "Topic :: Scientific/Engineering", 

69 "Intended Audience :: Science/Research", 

70 "Programming Language :: Python :: 3.8", 

71 "Programming Language :: Python :: 3.9", 

72 "Programming Language :: Python :: 3.10", 

73 "Programming Language :: Python :: 3.11", 

74 "Programming Language :: Python :: 3.12", 

75 "License :: OSI Approved :: BSD License", 

76 ], 

77 keywords=["iot", "fiware", "semantic"], 

78 packages=setuptools.find_packages( 

79 exclude=["tests", "tests.*", "img", "tutorials.*", "tutorials"] 

80 ), 

81 package_data={"filip": ["data/unece-units/*.csv"]}, 

82 setup_requires=SETUP_REQUIRES, 

83 # optional modules 

84 extras_require={ 

85 "development": ["pre-commit~=4.0.1"], 

86 "semantics": ["igraph~=0.11.2", "rdflib>=6.0.0,<=6.1.1"], 

87 "tutorials": ["plotly==5.24.1", "matplotlib~=3.4.3"], 

88 ":python_version < '3.9'": ["pandas~=1.3.5"], 

89 ":python_version >= '3.9'": ["pandas>=2.1.4,<2.4.0"], 

90 }, 

91 install_requires=INSTALL_REQUIRES, 

92 python_requires=">=3.8", 

93)