diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 845b719f2378d396a8b75296a68d1e32c840e7c7..9a479703105d5241942420e9cfdf0867cc3183e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1 +1,4 @@ -include: 'https://gitlab.idiap.ch/bob/bob.devtools/raw/master/bob/devtools/data/gitlab-ci/single-package.yaml' +include: + - project: bob/dev-profile + ref: main + file: gitlab/python.yml diff --git a/pyproject.toml b/pyproject.toml index b738dc847ff9705c5769673db7415f2eb9a75f4d..8485c20a6cbebe0e38233503c237072415975561 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,90 @@ [build-system] - requires = ["setuptools", "wheel", "bob.extension"] + requires = ["setuptools>=61.0.0", "wheel"] build-backend = "setuptools.build_meta" +[project] + name = "bob.fusion.base" + version = "0.1.5b0" + requires-python = ">=3.9" + description = "Score fusion in biometric and pad experiments" + dynamic = ["readme"] + license = {text = "GPLv3 License"} + authors = [ + {name = "Amir Mohammadi", email = "amir.mohammadi@idiap.ch"}, + ] + keywords = ["bob", "score fusion", "evaluation", "biometric"] + + classifiers=[ + "Framework :: Bob", + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Natural Language :: English", + "Programming Language :: Python", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + ] + dependencies = [ + "setuptools", + "numpy", + "bob.extension", + "bob.measure", + "bob.learn.em", + "bob.bio.base", + "scikit-learn", + "matplotlib", + ] + +[project.urls] + documentation = "https://www.idiap.ch/software/bob/docs/bob/bob.fusion.base/stable/" + homepage = "https://pypi.org/project/bob.fusion.base/" + repository = "https://gitlab.idiap.ch/bob/bob.fusion.base" + changelog = "https://gitlab.idiap.ch/bob/bob.fusion.base/-/releases" + +[project.optional-dependencies] + qa = ["pre-commit"] + doc = [ + "sphinx", + "sphinx_rtd_theme", + "sphinx-autodoc-typehints", + "auto-intersphinx", + "sphinxcontrib-programoutput", + ] + test = [ + "pytest", + "pytest-cov", + "coverage", + ] + +[tool.setuptools] + zip-safe = false + package-dir = {"" = "src"} + +[tool.setuptools.dynamic] + readme = {file = "README.rst"} + +[project.entry-points."bob.cli"] + fusion = "bob.fusion.base.script.fusion:fusion" + +[project.entry-points."bob.fusion.cli"] + fuse = "bob.fusion.base.script.fuse:fuse" + resource = "bob.fusion.base.script.resource:resource" + boundary = "bob.fusion.base.script.boundary:boundary" + +[project.entry-points."bob.fusion.algorithm"] + mean = "bob.fusion.base.config.algorithm.mean:algorithm" + mean-tanh = "bob.fusion.base.config.algorithm.mean:algorithm_tanh" + llr = "bob.fusion.base.config.algorithm.llr_skl:algorithm" + llr-tanh = "bob.fusion.base.config.algorithm.llr_skl:algorithm_tanh" + plr-2 = "bob.fusion.base.config.algorithm.plr_2:algorithm" + plr-2-tanh = "bob.fusion.base.config.algorithm.plr_2:algorithm_tanh" + plr-3 = "bob.fusion.base.config.algorithm.plr_3:algorithm" + plr-3-tanh = "bob.fusion.base.config.algorithm.plr_3:algorithm_tanh" + gmm = "bob.fusion.base.config.algorithm.gmm:algorithm" + gmm-tanh = "bob.fusion.base.config.algorithm.gmm:algorithm_tanh" + +[tool.distutils.bdist_wheel] + universal = true + [tool.isort] profile = "black" line_length = 80 @@ -10,3 +93,15 @@ [tool.black] line-length = 80 + +[tool.coverage.run] + relative_files = true + +[tool.pytest.ini_options] + addopts = [ + "--import-mode=append", + "--cov-report=term-missing", + "--cov=bob.fusion.base", + ] + junit_logging = "all" + junit_log_passing_tests = false diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index dca2c71dd8d1c13157dcdb5440e8339f32699dc7..0000000000000000000000000000000000000000 --- a/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -setuptools -numpy -bob.extension -bob.measure -bob.learn.em -bob.bio.base -scikit-learn # Used for classifiers and pre-processors. -matplotlib # for plotting diff --git a/setup.py b/setup.py index ffa14e5f7961f589e5f8383ac8aa3566b43e486b..3a3aaadbd1b7a7371f5208fe978855323b3c5291 100644 --- a/setup.py +++ b/setup.py @@ -1,59 +1,6 @@ #!/usr/bin/env python # vim: set fileencoding=utf-8 : -from setuptools import dist, setup +from setuptools import setup -dist.Distribution(dict(setup_requires=["bob.extension"])) - -from bob.extension.utils import find_packages, load_requirements - -install_requires = load_requirements() - -setup( - name="bob.fusion.base", - version=open("version.txt").read().rstrip(), - description="Score fusion in biometric and pad experiments", - url="https://gitlab.idiap.ch/bob/bob.fusion.base", - license="GPLv3", - author="Amir Mohammadi", - author_email="amir.mohammadi@idiap.ch", - keywords="bob, score fusion, evaluation, biometric", - long_description=open("README.rst").read(), - packages=find_packages(), - include_package_data=True, - zip_safe=False, - install_requires=install_requires, - entry_points={ - # main entry for bob fusion cli - "bob.cli": [ - "fusion = bob.fusion.base.script.fusion:fusion", - ], - # bob fusion scripts - "bob.fusion.cli": [ - "fuse = bob.fusion.base.script.fuse:fuse", - "resource = bob.fusion.base.script.resource:resource", - "boundary = bob.fusion.base.script.boundary:boundary", - ], - "bob.fusion.algorithm": [ - "mean = bob.fusion.base.config.algorithm.mean:algorithm", - "mean-tanh = bob.fusion.base.config.algorithm.mean:algorithm_tanh", - "llr = bob.fusion.base.config.algorithm.llr_skl:algorithm", - "llr-tanh = bob.fusion.base.config.algorithm.llr_skl:algorithm_tanh", - "plr-2 = bob.fusion.base.config.algorithm.plr_2:algorithm", - "plr-2-tanh = bob.fusion.base.config.algorithm.plr_2:algorithm_tanh", - "plr-3 = bob.fusion.base.config.algorithm.plr_3:algorithm", - "plr-3-tanh = bob.fusion.base.config.algorithm.plr_3:algorithm_tanh", - "gmm = bob.fusion.base.config.algorithm.gmm:algorithm", - "gmm-tanh = bob.fusion.base.config.algorithm.gmm:algorithm_tanh", - ], - }, - classifiers=[ - "Framework :: Bob", - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Natural Language :: English", - "Programming Language :: Python", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - ], -) +setup() diff --git a/version.txt b/version.txt deleted file mode 100644 index ccf6dfd37dbdaca02c998d60c539dff63b9d9dfb..0000000000000000000000000000000000000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.1.5b0