diff --git a/pyproject.toml b/pyproject.toml index 4e09837..599fb6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,11 @@ [project] name = "detectmatelibrary" -version = "0.2.0" description = "DetectMate Library for log processing components" -readme = "README.md" -dynamic = ["authors"] +readme = {file = "README.md", content-type = "text/markdown"} +dynamic = ["version"] +authors = [{"name" = "André García Gómez"}, {"name" = "Viktor Beck"}, {"name" = "Thorina Boenke"}, + {"name" = "Wolfgang Hotwagner"}, {"name" = "Anna Erdi"}, {"name" = "Ernst Leierzopf"}] +license = "EUPL-1.2" requires-python = ">=3.12" dependencies = [ "protobuf>=6.32.1", @@ -25,8 +27,7 @@ dependencies = [ ] [dependency-groups] -# add dependencies in this section with: uv add --optional dev -# install with all the dev dependencies: uv pip install -e .[dev] +# install with all the dev dependencies: uv pip install --group dev dev = [ "mike>=2.1.3", "prek>=0.2.8", @@ -34,8 +35,20 @@ dev = [ "pytest-cov>=6.2.1", ] +[project.optional-dependencies] +polars-rtcompat = [ + "polars[rtcompat]>=1.38.1", +] + +[tool.setuptools.dynamic] +version = {attr = "detectmatelibrary.metadata.__version__"} + +[project.urls] +Homepage = "https://ait-detectmate.github.io/DetectMateLibrary/latest" +Repository = "https://github.com/ait-detectmate/DetectMateLibrary" + [build-system] -requires = ["setuptools>=45.0", "wheel"] +requires = ["setuptools>=80", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] diff --git a/setup.py b/setup.py deleted file mode 100644 index 7dcd355..0000000 --- a/setup.py +++ /dev/null @@ -1,35 +0,0 @@ -from setuptools import setup, find_packages -import tomllib - - -def gather_dependencies(toml_path: str = "pyproject.toml") -> list[str]: - with open(toml_path, "rb") as f: - data = tomllib.load(f) - - # Try Poetry first - poetry_deps = data.get("tool", {}).get("poetry", {}).get("dependencies", {}) - if poetry_deps: - return [f"{dep}{version}" for dep, version in poetry_deps.items()] - - # Fall back to PEP 621 - project_deps: list[str] = data.get("project", {}).get("dependencies", []) - return project_deps - - -setup( - name="detectmatelibrary", - version="0.1.0", - package_dir={"": "src"}, - packages=find_packages(where="src"), - description="DetectMate Library for log processing components", - author="voice", - author_email="voice@example.com", - install_requires=gather_dependencies(), - data_files=[( - "src/tools/workspace/templates/data", - [ - "src/tools/workspace/templates/data/logs.json", - "src/tools/workspace/templates/data/parsed_log.json", - ] - )] -) diff --git a/src/detectmatelibrary/__init__.py b/src/detectmatelibrary/__init__.py index ce6e3bb..3cfe805 100644 --- a/src/detectmatelibrary/__init__.py +++ b/src/detectmatelibrary/__init__.py @@ -3,11 +3,22 @@ from . import parsers from . import schemas from . import utils +from .metadata import (__authors__, __contact__, __copyright__, __date__, __deprecated__, __website__, + __license__, __status__, __version__) __all__ = [ "common", "detectors", "parsers", "schemas", - "utils" + "utils", + "__authors__", + "__contact__", + "__copyright__", + "__date__", + "__deprecated__", + "__website__", + "__license__", + "__status__", + "__version__" ] diff --git a/src/detectmatelibrary/metadata.py b/src/detectmatelibrary/metadata.py new file mode 100644 index 0000000..99b40c1 --- /dev/null +++ b/src/detectmatelibrary/metadata.py @@ -0,0 +1,12 @@ +__authors__ = ["André García Gómez", "Viktor Beck", "Thorina Boenke", "Wolfgang Hotwagner", "Anna Erdi", + "Ernst Leierzopf"] +__contact__ = "aecid@ait.ac.at" +__copyright__ = "Copyright 2026, AIT Austrian Institute of Technology GmbH" +__date__ = "2026/05/18" +__deprecated__ = False +__website__ = "https://aecid.ait.ac.at" +__license__ = "EUPL-1.2" +__status__ = "Development" +__version__ = "0.2.0" +__all__ = ['__authors__', '__contact__', '__copyright__', '__date__', '__deprecated__', '__website__', + '__license__', '__status__', '__version__'] diff --git a/uv.lock b/uv.lock index 176093d..9aa2181 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 2 +revision = 3 requires-python = ">=3.12" resolution-markers = [ "python_full_version >= '3.14' and sys_platform == 'win32'", @@ -224,7 +224,6 @@ wheels = [ [[package]] name = "detectmatelibrary" -version = "0.2.0" source = { editable = "." } dependencies = [ { name = "detectmateperformance" }, @@ -246,6 +245,11 @@ dependencies = [ { name = "tiktoken" }, ] +[package.optional-dependencies] +polars-rtcompat = [ + { name = "polars", extra = ["rtcompat"] }, +] + [package.dev-dependencies] dev = [ { name = "mike" }, @@ -263,6 +267,7 @@ requires-dist = [ { name = "openai", specifier = ">=2.26.0" }, { name = "pandas", specifier = ">=2.3.2" }, { name = "polars", specifier = ">=1.38.1" }, + { name = "polars", extras = ["rtcompat"], marker = "extra == 'polars-rtcompat'", specifier = ">=1.38.1" }, { name = "protobuf", specifier = ">=6.32.1" }, { name = "pyarrow", specifier = ">=24.0.0" }, { name = "pydantic", specifier = ">=2.11.7" }, @@ -273,6 +278,7 @@ requires-dist = [ { name = "tenacity", specifier = ">=9.1.4" }, { name = "tiktoken", specifier = ">=0.12.0" }, ] +provides-extras = ["polars-rtcompat"] [package.metadata.requires-dev] dev = [ @@ -899,6 +905,11 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ea/91/74fc60d94488685a92ac9d49d7ec55f3e91fe9b77942a6235a5fa7f249c3/polars-1.40.1-py3-none-any.whl", hash = "sha256:c0f861219d1319cdea45c4ce4d30355a47176b8f98dcedf95ea8269f131b8abd", size = 828723, upload-time = "2026-04-22T19:14:25.452Z" }, ] +[package.optional-dependencies] +rtcompat = [ + { name = "polars-runtime-compat" }, +] + [[package]] name = "polars-runtime-32" version = "1.40.1" @@ -915,6 +926,22 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/65/ad/b33c3022a394f3eb55c3310597cec615412a8a33880055eee191d154a628/polars_runtime_32-1.40.1-cp310-abi3-win_arm64.whl", hash = "sha256:b5cbfaf6b085b420b4bfcbe24e8f665076d1cccfdb80c0484c02a023ce205537", size = 45822104, upload-time = "2026-04-22T19:14:54.192Z" }, ] +[[package]] +name = "polars-runtime-compat" +version = "1.40.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4c/60/f8340030f94a45231ad02abff171c8c10f45df0984e5a4fd0f39a48500f4/polars_runtime_compat-1.40.1.tar.gz", hash = "sha256:6149aa764439cec26a5f883fb9921a50f61a0f6c4549df51c735626701a73a18", size = 2935443, upload-time = "2026-04-22T19:16:00.906Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/07/c7/978481a2a2f5b50636d485bc176e16084fa1bb3b1d7e7e34f580cef240dc/polars_runtime_compat-1.40.1-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:a683d287237f1dcc3dee95b5b2b6408cec318abbbb412ca49206492513be862f", size = 52016973, upload-time = "2026-04-22T19:15:25.228Z" }, + { url = "https://files.pythonhosted.org/packages/8b/c9/e308b0bbb331330a762f5f495597d34e9933c965ca6d4026a2eb481ef4ad/polars_runtime_compat-1.40.1-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:c83750f5593cec088134614fbf783fd10c5a92030d71b35f3dea0fff682d92c6", size = 46246682, upload-time = "2026-04-22T19:15:28.666Z" }, + { url = "https://files.pythonhosted.org/packages/1d/54/eaecb4747695e2e200ed6d13ce40dd7b0cdc7499d0b9af1e64e83af0e46d/polars_runtime_compat-1.40.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffa15c4a8b7f67911412c849dc3d3aac313f682d834eb3f374d0f6cb7e080efc", size = 50123217, upload-time = "2026-04-22T19:15:32.321Z" }, + { url = "https://files.pythonhosted.org/packages/20/87/0a881905d94341111d38e6a7ae94674511e6797cf3be2500998f06963edf/polars_runtime_compat-1.40.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0373dabf942135d13b453d50be7a84b14420b495bd1242570545f58866396e7", size = 55869626, upload-time = "2026-04-22T19:15:37.15Z" }, + { url = "https://files.pythonhosted.org/packages/be/6e/ac57e39bb94ebd63d6714895881ee0461e39039daa208916e5cad93174f9/polars_runtime_compat-1.40.1-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:bcdc488472d2c57dd3315a897456b47cdac222a1520fcf3d8d38410a5bf47ec1", size = 50287716, upload-time = "2026-04-22T19:15:40.829Z" }, + { url = "https://files.pythonhosted.org/packages/e1/f3/b75afc9f79cd4cadff52bdc4566119892b378f739a295573bf6bd0190a6c/polars_runtime_compat-1.40.1-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:34d03962169fc7c0ef6f6efd324d0a51350e7b5abf3b0cd118eb7a32e4d947ec", size = 53796312, upload-time = "2026-04-22T19:15:44.68Z" }, + { url = "https://files.pythonhosted.org/packages/67/68/0df61011d894d1c94c915b39423c9aab79b3f7b18b836031ed32987227e0/polars_runtime_compat-1.40.1-cp310-abi3-win_amd64.whl", hash = "sha256:d9ccfe58eeb776567cf9556a83b980b9face9f0b1bb629bf2cd2334f4d9daf57", size = 51696665, upload-time = "2026-04-22T19:15:48.65Z" }, + { url = "https://files.pythonhosted.org/packages/45/01/1bc7e868d3e4055b1ae756ad8ccc2a5d2bce57d7c88c3b4427babd43450b/polars_runtime_compat-1.40.1-cp310-abi3-win_arm64.whl", hash = "sha256:0c662e6acf5d4e3784eee8e8a1ec6eb185132ac90689cb84034132b5787903b1", size = 45701223, upload-time = "2026-04-22T19:15:52.189Z" }, +] + [[package]] name = "prek" version = "0.3.11"