From 2d14e95093aa55bec9a38ec7827c380b5bb2ace8 Mon Sep 17 00:00:00 2001
From: Andre Mayoraz <andre.mayoraz@idiap.ch>
Date: Thu, 2 Feb 2023 14:35:53 +0100
Subject: [PATCH] [ci] changed ci process to dev-profile

---
 .gitlab-ci.yml        |   5 +-
 pyproject.toml        | 111 +++++++++++++++++++++++++++++++++++++++++-
 requirements.txt      |  11 -----
 setup.py              |  64 +-----------------------
 test-requirements.txt |   0
 version.txt           |   1 -
 6 files changed, 116 insertions(+), 76 deletions(-)
 delete mode 100644 requirements.txt
 delete mode 100644 test-requirements.txt
 delete mode 100644 version.txt

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 845b719..9a47970 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 b738dc8..34a8be9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,104 @@
 [build-system]
-    requires = ["setuptools", "wheel", "bob.extension"]
+    requires = ["setuptools>=61.0.0", "wheel"]
     build-backend = "setuptools.build_meta"
 
+[project]
+    name = "bob.bio.vein"
+    version = "4.0.4b0"
+    requires-python = ">=3.9"
+    description = "Vein Recognition Library"
+    dynamic = ["readme"]
+    license = {text = "GPLv3 License"}
+    authors = [
+    {name = "Andre Anjos", email = "andre.anjos@idiap.ch"},
+    {name = "Pedro Tome", email = "pedro.tome@idiap.ch"},
+    ]
+    keywords = ["bob", "biometric recognition", "evaluation", "vein"]
+
+    classifiers=[
+        "Framework :: Bob",
+        "Development Status :: 4 - Beta",
+        "Intended Audience :: Science/Research",
+        "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
+        "Natural Language :: English",
+        "Programming Language :: Python",
+        "Programming Language :: Python :: 3",
+        "Topic :: Scientific/Engineering :: Artificial Intelligence",
+        "Topic :: Software Development :: Libraries :: Python Modules",
+    ]
+    dependencies = [
+        "setuptools",
+        "numpy",
+        "scipy",
+        "pillow",
+        "schema",
+        "docopt",
+        "scikit-image",
+        "matplotlib",
+        "bob.extension",
+        "bob.io.base",
+        "bob.bio.base",
+    ]
+
+[project.urls]
+    documentation = "https://www.idiap.ch/software/bob/docs/bob/bob.bio.vein/stable/"
+    homepage = "https://pypi.org/project/bob.bio.vein/"
+    repository = "https://gitlab.idiap.ch/bob/bob.bio.vein"
+    changelog = "https://gitlab.idiap.ch/bob/bob.bio.vein/-/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.bio.config"]
+    # protocols (must be specified before the database in the cmd)
+    # utfvp
+    nom = "bob.bio.vein.config.database.utfvp_nom"
+    full = "bob.bio.vein.config.database.utfvp_full"
+    1vsall = "bob.bio.vein.config.database.utfvp_1vsall"
+    # legacy baselines
+    mc = "bob.bio.vein.config.maximum_curvature"
+    rlt = "bob.bio.vein.config.repeated_line_tracking"
+    wld = "bob.bio.vein.config.wide_line_detector"
+    # verafinger contactless
+    vera_nom = "bob.bio.vein.config.database.verafinger_contactless_nom"
+
+[project.entry-points."bob.bio.database"]
+    utfvp = "bob.bio.vein.config.database.utfvp_nom:database"
+    verafinger_contactless = "bob.bio.vein.config.database.verafinger_contactless_nom:database"
+
+[project.entry-points."bob.bio.pipeline"]
+    wld = "bob.bio.vein.config.wide_line_detector:pipeline"
+    mc = "bob.bio.vein.config.maximum_curvature:pipeline"
+    rlt = "bob.bio.vein.config.repeated_line_tracking:pipeline"
+
+[project.scripts]
+    bob_bio_vein_compare_rois = "bob.bio.vein.script.compare_rois:main"
+    bob_bio_vein_view_sample = "bob.bio.vein.script.view_sample:main"
+    bob_bio_vein_blame = "bob.bio.vein.script.blame:main"
+
+
+[tool.distutils.bdist_wheel]
+    universal = true
+
 [tool.isort]
     profile = "black"
     line_length = 80
@@ -10,3 +107,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.bio.vein",
+    ]
+    junit_logging = "all"
+    junit_log_passing_tests = false
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index adbae37..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-setuptools
-numpy
-scipy
-pillow
-schema
-docopt
-scikit-image
-matplotlib
-bob.extension
-bob.io.base
-bob.bio.base
diff --git a/setup.py b/setup.py
index e2a0e0d..3a3aaad 100644
--- a/setup.py
+++ b/setup.py
@@ -1,66 +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.bio.vein",
-    version=open("version.txt").read().rstrip(),
-    description="Vein Recognition Library",
-    url="https://gitlab.idiap.ch/bob/bob.bio.vein",
-    license="GPLv3",
-    author="Andre Anjos,Pedro Tome",
-    author_email="andre.anjos@idiap.ch,pedro.tome@idiap.ch",
-    keywords="bob, biometric recognition, evaluation, vein",
-    long_description=open("README.rst").read(),
-    packages=find_packages(),
-    include_package_data=True,
-    zip_safe=False,
-    install_requires=install_requires,
-    entry_points={
-        "bob.bio.config": [
-            # protocols (must be specified before the database in the cmd)
-            # utfvp
-            "nom = bob.bio.vein.config.database.utfvp_nom",
-            "full = bob.bio.vein.config.database.utfvp_full",
-            "1vsall = bob.bio.vein.config.database.utfvp_1vsall",
-            # legacy baselines
-            "mc = bob.bio.vein.config.maximum_curvature",
-            "rlt = bob.bio.vein.config.repeated_line_tracking",
-            "wld = bob.bio.vein.config.wide_line_detector",
-            # verafinger contactless
-            "vera_nom = bob.bio.vein.config.database.verafinger_contactless_nom",
-        ],
-        "bob.bio.database": [
-            "utfvp = bob.bio.vein.config.database.utfvp_nom:database",
-            "verafinger_contactless = bob.bio.vein.config.database.verafinger_contactless_nom:database",
-        ],
-        "bob.bio.pipeline": [
-            "wld = bob.bio.vein.config.wide_line_detector:pipeline",
-            "mc = bob.bio.vein.config.maximum_curvature:pipeline",
-            "rlt = bob.bio.vein.config.repeated_line_tracking:pipeline",
-        ],
-        "console_scripts": [
-            "bob_bio_vein_compare_rois.py = bob.bio.vein.script.compare_rois:main",
-            "bob_bio_vein_view_sample.py = bob.bio.vein.script.view_sample:main",
-            "bob_bio_vein_blame.py = bob.bio.vein.script.blame:main",
-        ],
-    },
-    classifiers=[
-        "Framework :: Bob",
-        "Development Status :: 4 - Beta",
-        "Intended Audience :: Science/Research",
-        "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
-        "Natural Language :: English",
-        "Programming Language :: Python",
-        "Programming Language :: Python :: 3",
-        "Topic :: Scientific/Engineering :: Artificial Intelligence",
-        "Topic :: Software Development :: Libraries :: Python Modules",
-    ],
-)
+setup()
diff --git a/test-requirements.txt b/test-requirements.txt
deleted file mode 100644
index e69de29..0000000
diff --git a/version.txt b/version.txt
deleted file mode 100644
index 8f342b8..0000000
--- a/version.txt
+++ /dev/null
@@ -1 +0,0 @@
-4.0.4b0
-- 
GitLab