Newer
Older
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
#
# SPDX-License-Identifier: GPL-3.0-or-later
[build-system]
requires = ["hatchling", "versioningit"]
build-backend = "hatchling.build"
requires-python = ">=3.10"
description = "Benchmarks for Computer-Aided Disease Detection from Medical Data."
license = { text = "GNU General Public License v3 (GPLv3)" }
authors = [{ name = "Geoffrey Raposo", email = "geoffrey@raposo.ch" }]
{ name = "Andre Anjos", email = "andre.anjos@idiap.ch" },
{ name = "Daniel Carron", email = "daniel.carron@idiap.ch" },
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",

André Anjos
committed
"credible",
"scikit-learn",
"tqdm",
"psutil",
"tabulate",
"matplotlib",
"pillow",
"torch>=1.8",
"torchvision>=0.10",
"versioningit",
]
[tool.hatch.version]
source = "versioningit"
[tool.hatch.build.targets.sdist]
include = [
"src/**/*.py",
"src/**/*.json",
"src/**/*.json.bz2",
"tests/**/*.py",
"tests/**/*.png",
"tests/**/*.csv",
"tests/**/*.json",
"doc/**/*.rst",
"doc/**/*.png",
"LICENSES/*.txt",
[tool.hatch.build.targets.wheel]
packages = ["src/mednet"]
documentation = "https://www.idiap.ch/software/biosignal/software/docs/biosignal/software/mednet/main/sphinx/"
homepage = "https://pypi.org/project/mednet"
repository = "https://gitlab.idiap.ch/biosignal/software/mednet"
changelog = "https://gitlab.idiap.ch/biosignal/software/mednet/-/releases"
[project.optional-dependencies]
qa = ["pre-commit"]
doc = [
"sphinx",
"furo",
"sphinx-autodoc-typehints",
"auto-intersphinx",
"sphinx-copybutton",
"sphinx-inline-tabs",
"sphinx-click",
]
test = ["pytest", "pytest-cov", "coverage"]
mednet = "mednet.scripts.cli:cli"
[project.entry-points."mednet.config"]
pasa = "mednet.config.models.pasa"
mlp = "mednet.config.models.mlp"
logistic-regression = "mednet.config.models.logistic_regression"
alexnet = "mednet.config.models.alexnet"
alexnet-pretrained = "mednet.config.models.alexnet_pretrained"
densenet = "mednet.config.models.densenet"
densenet-pretrained = "mednet.config.models.densenet_pretrained"
montgomery = "mednet.config.data.montgomery.default"
montgomery-f0 = "mednet.config.data.montgomery.fold_0"
montgomery-f1 = "mednet.config.data.montgomery.fold_1"
montgomery-f2 = "mednet.config.data.montgomery.fold_2"
montgomery-f3 = "mednet.config.data.montgomery.fold_3"
montgomery-f4 = "mednet.config.data.montgomery.fold_4"
montgomery-f5 = "mednet.config.data.montgomery.fold_5"
montgomery-f6 = "mednet.config.data.montgomery.fold_6"
montgomery-f7 = "mednet.config.data.montgomery.fold_7"
montgomery-f8 = "mednet.config.data.montgomery.fold_8"
montgomery-f9 = "mednet.config.data.montgomery.fold_9"
shenzhen = "mednet.config.data.shenzhen.default"

André Anjos
committed
shenzhen-alltest = "mednet.config.data.shenzhen.alltest"
shenzhen-f0 = "mednet.config.data.shenzhen.fold_0"
shenzhen-f1 = "mednet.config.data.shenzhen.fold_1"
shenzhen-f2 = "mednet.config.data.shenzhen.fold_2"
shenzhen-f3 = "mednet.config.data.shenzhen.fold_3"
shenzhen-f4 = "mednet.config.data.shenzhen.fold_4"
shenzhen-f5 = "mednet.config.data.shenzhen.fold_5"
shenzhen-f6 = "mednet.config.data.shenzhen.fold_6"
shenzhen-f7 = "mednet.config.data.shenzhen.fold_7"
shenzhen-f8 = "mednet.config.data.shenzhen.fold_8"
shenzhen-f9 = "mednet.config.data.shenzhen.fold_9"
indian = "mednet.config.data.indian.default"
indian-f0 = "mednet.config.data.indian.fold_0"
indian-f1 = "mednet.config.data.indian.fold_1"
indian-f2 = "mednet.config.data.indian.fold_2"
indian-f3 = "mednet.config.data.indian.fold_3"
indian-f4 = "mednet.config.data.indian.fold_4"
indian-f5 = "mednet.config.data.indian.fold_5"
indian-f6 = "mednet.config.data.indian.fold_6"
indian-f7 = "mednet.config.data.indian.fold_7"
indian-f8 = "mednet.config.data.indian.fold_8"
indian-f9 = "mednet.config.data.indian.fold_9"
# TBX11K dataset split 1: healthy vs active tb, and cross-validation folds
tbx11k-v1-healthy-vs-atb = "mednet.config.data.tbx11k.v1_healthy_vs_atb"
tbx11k-v1-f0 = "mednet.config.data.tbx11k.v1_fold_0"
tbx11k-v1-f1 = "mednet.config.data.tbx11k.v1_fold_1"
tbx11k-v1-f2 = "mednet.config.data.tbx11k.v1_fold_2"
tbx11k-v1-f3 = "mednet.config.data.tbx11k.v1_fold_3"
tbx11k-v1-f4 = "mednet.config.data.tbx11k.v1_fold_4"
tbx11k-v1-f5 = "mednet.config.data.tbx11k.v1_fold_5"
tbx11k-v1-f6 = "mednet.config.data.tbx11k.v1_fold_6"
tbx11k-v1-f7 = "mednet.config.data.tbx11k.v1_fold_7"
tbx11k-v1-f8 = "mednet.config.data.tbx11k.v1_fold_8"
tbx11k-v1-f9 = "mednet.config.data.tbx11k.v1_fold_9"
# TBX11K dataset split 2: others vs active tb, and cross-validation folds
tbx11k-v2-others-vs-atb = "mednet.config.data.tbx11k.v2_others_vs_atb"
tbx11k-v2-f0 = "mednet.config.data.tbx11k.v2_fold_0"
tbx11k-v2-f1 = "mednet.config.data.tbx11k.v2_fold_1"
tbx11k-v2-f2 = "mednet.config.data.tbx11k.v2_fold_2"
tbx11k-v2-f3 = "mednet.config.data.tbx11k.v2_fold_3"
tbx11k-v2-f4 = "mednet.config.data.tbx11k.v2_fold_4"
tbx11k-v2-f5 = "mednet.config.data.tbx11k.v2_fold_5"
tbx11k-v2-f6 = "mednet.config.data.tbx11k.v2_fold_6"
tbx11k-v2-f7 = "mednet.config.data.tbx11k.v2_fold_7"
tbx11k-v2-f8 = "mednet.config.data.tbx11k.v2_fold_8"
tbx11k-v2-f9 = "mednet.config.data.tbx11k.v2_fold_9"
montgomery-shenzhen = "mednet.config.data.montgomery_shenzhen.default"
montgomery-shenzhen-f0 = "mednet.config.data.montgomery_shenzhen.fold_0"
montgomery-shenzhen-f1 = "mednet.config.data.montgomery_shenzhen.fold_1"
montgomery-shenzhen-f2 = "mednet.config.data.montgomery_shenzhen.fold_2"
montgomery-shenzhen-f3 = "mednet.config.data.montgomery_shenzhen.fold_3"
montgomery-shenzhen-f4 = "mednet.config.data.montgomery_shenzhen.fold_4"
montgomery-shenzhen-f5 = "mednet.config.data.montgomery_shenzhen.fold_5"
montgomery-shenzhen-f6 = "mednet.config.data.montgomery_shenzhen.fold_6"
montgomery-shenzhen-f7 = "mednet.config.data.montgomery_shenzhen.fold_7"
montgomery-shenzhen-f8 = "mednet.config.data.montgomery_shenzhen.fold_8"
montgomery-shenzhen-f9 = "mednet.config.data.montgomery_shenzhen.fold_9"
montgomery-shenzhen-indian = "mednet.config.data.montgomery_shenzhen_indian.default"
montgomery-shenzhen-indian-f0 = "mednet.config.data.montgomery_shenzhen_indian.fold_0"
montgomery-shenzhen-indian-f1 = "mednet.config.data.montgomery_shenzhen_indian.fold_1"
montgomery-shenzhen-indian-f2 = "mednet.config.data.montgomery_shenzhen_indian.fold_2"
montgomery-shenzhen-indian-f3 = "mednet.config.data.montgomery_shenzhen_indian.fold_3"
montgomery-shenzhen-indian-f4 = "mednet.config.data.montgomery_shenzhen_indian.fold_4"
montgomery-shenzhen-indian-f5 = "mednet.config.data.montgomery_shenzhen_indian.fold_5"
montgomery-shenzhen-indian-f6 = "mednet.config.data.montgomery_shenzhen_indian.fold_6"
montgomery-shenzhen-indian-f7 = "mednet.config.data.montgomery_shenzhen_indian.fold_7"
montgomery-shenzhen-indian-f8 = "mednet.config.data.montgomery_shenzhen_indian.fold_8"
montgomery-shenzhen-indian-f9 = "mednet.config.data.montgomery_shenzhen_indian.fold_9"
# montgomery-shenzhen-indian-tbx11k aggregated dataset
montgomery-shenzhen-indian-tbx11k-v1 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_healthy_vs_atb"
montgomery-shenzhen-indian-tbx11k-v1-f0 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_0"
montgomery-shenzhen-indian-tbx11k-v1-f1 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_1"
montgomery-shenzhen-indian-tbx11k-v1-f2 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_2"
montgomery-shenzhen-indian-tbx11k-v1-f3 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_3"
montgomery-shenzhen-indian-tbx11k-v1-f4 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_4"
montgomery-shenzhen-indian-tbx11k-v1-f5 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_5"
montgomery-shenzhen-indian-tbx11k-v1-f6 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_6"
montgomery-shenzhen-indian-tbx11k-v1-f7 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_7"
montgomery-shenzhen-indian-tbx11k-v1-f8 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_8"
montgomery-shenzhen-indian-tbx11k-v1-f9 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v1_fold_9"
montgomery-shenzhen-indian-tbx11k-v2 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_others_vs_atb"
montgomery-shenzhen-indian-tbx11k-v2-f0 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_0"
montgomery-shenzhen-indian-tbx11k-v2-f1 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_1"
montgomery-shenzhen-indian-tbx11k-v2-f2 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_2"
montgomery-shenzhen-indian-tbx11k-v2-f3 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_3"
montgomery-shenzhen-indian-tbx11k-v2-f4 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_4"
montgomery-shenzhen-indian-tbx11k-v2-f5 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_5"
montgomery-shenzhen-indian-tbx11k-v2-f6 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_6"
montgomery-shenzhen-indian-tbx11k-v2-f7 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_7"
montgomery-shenzhen-indian-tbx11k-v2-f8 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_8"
montgomery-shenzhen-indian-tbx11k-v2-f9 = "mednet.config.data.montgomery_shenzhen_indian_tbx11k.v2_fold_9"
# tbpoc dataset (only cross-validation folds)
tbpoc-f0 = "mednet.config.data.tbpoc.fold_0"
tbpoc-f1 = "mednet.config.data.tbpoc.fold_1"
tbpoc-f2 = "mednet.config.data.tbpoc.fold_2"
tbpoc-f3 = "mednet.config.data.tbpoc.fold_3"
tbpoc-f4 = "mednet.config.data.tbpoc.fold_4"
tbpoc-f5 = "mednet.config.data.tbpoc.fold_5"
tbpoc-f6 = "mednet.config.data.tbpoc.fold_6"
tbpoc-f7 = "mednet.config.data.tbpoc.fold_7"
tbpoc-f8 = "mednet.config.data.tbpoc.fold_8"
tbpoc-f9 = "mednet.config.data.tbpoc.fold_9"
# hivtb dataset (only cross-validation folds)
hivtb-f0 = "mednet.config.data.hivtb.fold_0"
hivtb-f1 = "mednet.config.data.hivtb.fold_1"
hivtb-f2 = "mednet.config.data.hivtb.fold_2"
hivtb-f3 = "mednet.config.data.hivtb.fold_3"
hivtb-f4 = "mednet.config.data.hivtb.fold_4"
hivtb-f5 = "mednet.config.data.hivtb.fold_5"
hivtb-f6 = "mednet.config.data.hivtb.fold_6"
hivtb-f7 = "mednet.config.data.hivtb.fold_7"
hivtb-f8 = "mednet.config.data.hivtb.fold_8"
hivtb-f9 = "mednet.config.data.hivtb.fold_9"
# NIH CXR14 (relabeled), multi-class (14 labels)
nih-cxr14 = "mednet.config.data.nih_cxr14.default"
nih-cxr14-cardiomegaly = "mednet.config.data.nih_cxr14.cardiomegaly"
# PadChest, multi-class (varied number of labels)
padchest-idiap = "mednet.config.data.padchest.idiap"
padchest-tb-idiap = "mednet.config.data.padchest.tb_idiap"
padchest-no-tb-idiap = "mednet.config.data.padchest.no_tb_idiap"
padchest-cardiomegaly-idiap = "mednet.config.data.padchest.cardiomegaly_idiap"
nih-cxr14-padchest = "mednet.config.data.nih_cxr14_padchest.idiap"
# montgomery-shenzhen-indian-padchest aggregated dataset
montgomery-shenzhen-indian-padchest = "mednet.config.data.montgomery_shenzhen_indian_padchest.default"
[tool.isort]
profile = "black"
line_length = 80
order_by_type = true
lines_between_types = 1
[tool.black]
line-length = 80
[tool.pytest.ini_options]
addopts = ["--cov=mednet", "--cov-report=term-missing", "--import-mode=append"]
"all", # report on all checks, except the below
"ES01", # Not all functions require extended summaries
"EX01", # Not all functions require examples
"GL01", # Expects text to be on the line after the opening quotes but that is in direct opposition of the sphinx recommendations and conflicts with other pre-commit hooks.
"GL08", # Causes issues if we don't have a docstring at the top of the file. Disabling this might fail to catch actual missing docstrings.
"PR04", # numpydoc does not currently support PEP484 typehints, which we are using
"RT03", # Since sphinx is unable to understand type annotations we need to remove some types from 'Returns', which breaks this check.
"SA01", # We do not use Also sections
"SS06", # Summary will span multiple lines if too long because of reformatting by other hooks.
exclude = [ # don't report on objects that match any of these regex
'\.__len__$',
'\.__getitem__$',
'\.__iter__$',
'\.__exit__$',
override_SS05 = [ # override SS05 to allow docstrings starting with these words
'^Process ',
'^Assess ',
'^Access ',
'^This',