diff --git a/.circleci/config.yml b/.circleci/config.yml index 53d5786..6889b9f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: - checkout - run: name: install dependencies - command: pip3 install -r requirements.txt -r test-requirements.txt --user + command: pip3 install --user .[dev] - run: name: confirm black version command: black --version @@ -33,7 +33,7 @@ jobs: - checkout - run: name: install dependencies - command: pip3 install -r requirements.txt --user + command: pip3 install --user . - run: name: run tests command: python -m unittest @@ -60,7 +60,7 @@ jobs: - run: name: install dependencies command: > - pip3 install --user -r requirements.txt -r test-requirements.txt + pip3 install --user .[dev] - run: name: check version command: | @@ -92,7 +92,7 @@ jobs: at: ~/openbas-client - run: name: install dependencies - command: pip3 install -r requirements.txt --user + command: pip3 install --user . - run: name: install twine command: pip3 install twine diff --git a/pyproject.toml b/pyproject.toml index 0b6fae5..cb102a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,77 @@ +[project] +name = "pyobas" +dynamic = ["version"] +description = "Python API client for OpenBAS." +authors = [ + {name = "Filigran", email = "contact@filigran.io"} + ] +maintainers = [ + {name = "Filigran", email = "contact@filigran.io"} + ] +license = { text = "Apache-2.0" } +readme = "README.md" +requires-python = ">=3.11" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: Apache Software License", + "Natural Language :: English", + "Natural Language :: French", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Topic :: Security", + "Topic :: Software Development :: Libraries :: Python Modules" +] +dependencies = [ + "datefinder (>=0.7.3,<0.8)", + "pika (>=1.3.0,<1.4.0)", + "python-magic (>=0.4.27,<0.5); sys_platform == 'linux' or sys_platform == 'darwin'", + "python-magic-bin (>=0.4.14,<0.5); sys_platform == 'win32'", + "python_json_logger (>=3.3.0,<3.4.0)", + "PyYAML (>=6.0,<6.1)", + "pydantic (>=2.11.3,<2.12.0)", + "requests (>=2.32.3,<2.33.0)", + "setuptools (>=80.4.0,<80.5.0)", + "cachetools (>=5.5.0,<5.6.0)", + "prometheus-client (>=0.21.1,<0.22.0)", + "opentelemetry-api (>=1.32.0,<1.33.0)", + "opentelemetry-sdk (>=1.32.0,<1.33.0)", + # OpenBAS, + "requests-toolbelt (>=1.0.0,<1.1.0)", + "dataclasses-json (>=0.6.4,<0.7.0)", + "thefuzz (>=0.22,<0.23)" +] + +[project.optional-dependencies] +dev = [ + "black (>=25.1.0,<25.2.0)", + "build (>=1.2.1,<1.3.0)", + "isort (>=6.0.0,<6.1.0)", + "types-pytz (>=2025.2.0.20250326,<2025.3.0.0)", + "pre-commit (>=4.2.0,<4.3.0)", + "types-python-dateutil (>=2.9.0,<2.10.0)", + "wheel (>=0.45.1,<0.46.0)" +] +doc = [ + "autoapi (>=2.0.1,<2.1.0)", + "sphinx-autodoc-typehints (>=3.2.0,<3.3.0)", + "sphinx-rtd-theme (>=3.0.2,<3.1.0)" +] + [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] + +[tool.setuptools.dynamic] +version = { attr = "pyobas.__version__" } + [tool.isort] profile = "black" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 0acbd58..0000000 --- a/requirements.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Filigran -datefinder~=0.7.3 -pika~=1.3.0 -python-magic~=0.4.27; sys_platform == 'linux' or sys_platform == 'darwin' -python-magic-bin~=0.4.14; sys_platform == 'win32' -python_json_logger~=3.3.0 -PyYAML~=6.0 -pydantic~=2.11.3 -requests~=2.32.3 -setuptools~=80.4.0 -cachetools~=5.5.0 -prometheus-client~=0.21.1 -opentelemetry-api~=1.32.0 -opentelemetry-sdk~=1.32.0 -# OpenBAS -requests-toolbelt~=1.0.0 -dataclasses-json~=0.6.4 -thefuzz~=0.22 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index fac9625..0000000 --- a/setup.cfg +++ /dev/null @@ -1,71 +0,0 @@ -[metadata] -name = pyobas -version = attr: pyobas.__version__ -author = Filigran -author_email = contact@filigran.io -maintainer = Filigran -url = https://github.com/OpenBAS-Platform/client-python -description = Python API client for OpenBAS. -long_description = file: README.md -long_description_content_type = text/markdown -license = Apache -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Intended Audience :: Information Technology - Intended Audience :: Science/Research - License :: OSI Approved :: Apache Software License - Natural Language :: English - Natural Language :: French - Operating System :: OS Independent - Programming Language :: Python :: 3 - Topic :: Security - Topic :: Software Development :: Libraries :: Python Modules - -[options] -python_requires = >=3.7 -packages = - pyobas - pyobas.apis - pyobas.apis.inject_expectation - pyobas.apis.inject_expectation.model - pyobas.backends - pyobas.configuration - pyobas.contracts - pyobas.daemons - pyobas.signatures - -include_package_data = True -install_requires = - # Filigran - datefinder~=0.7.3 - pika~=1.3.0 - python-magic~=0.4.27; sys_platform == 'linux' or sys_platform == 'darwin' - python-magic-bin~=0.4.14; sys_platform == 'win32' - python_json_logger~=3.3.0 - PyYAML~=6.0 - pydantic~=2.11.3 - requests~=2.32.3 - setuptools~=80.4.0 - cachetools~=5.5.0 - prometheus-client~=0.21.1 - opentelemetry-api~=1.32.0 - opentelemetry-sdk~=1.32.0 - # OpenBAS - requests-toolbelt~=1.0.0 - dataclasses-json~=0.6.4 - thefuzz~=0.22 - -[options.extras_require] -dev = - black~=25.1.0 - build~=1.2.1 - isort~=6.0.0 - types-pytz~=2025.2.0.20250326 - pre-commit~=4.2.0 - types-python-dateutil~=2.9.0 - wheel~=0.45.1 -doc = - autoapi~=2.0.1 - sphinx-autodoc-typehints~=3.2.0 - sphinx-rtd-theme~=3.0.2 diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index eed11d1..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -black==25.1.0 -isort>=5.10 -build>=0.7 -isort>=5.10 -pre-commit~=4.1 -pytest~=8.1 -pytest-cases~=3.6 -pytest-cov~=6.1 -pytest_randomly~=3.8 -types-python-dateutil>=2.8 -types-pytz>=2021.3.5 -wheel~=0.36 -thefuzz~=0.22 \ No newline at end of file