# package [build-system] requires = ["setuptools", "setuptools-scm"] build-backend = "setuptools.build_meta" [project] name = "imgx" authors = [ {name = "Yunguan Fu", email = "yunguan.fu.18@ucl.ac.uk"}, ] description = "A Jax-based deep learning toolkit for biomedical applications." requires-python = ">=3.9" license = {text = "Apache-2.0"} version = "0.3.2" [project.scripts] imgx_train="imgx.run_train:main" imgx_valid="imgx.run_valid:main" imgx_test="imgx.run_test:main" [tool.setuptools] packages = ["imgx"] package-dir = {"imgx"="./imgx"} # pytest [tool.pytest.ini_options] markers = [ "slow", # slow unit tests "integration", # integration tests ] # pre-commit [tool.isort] py_version=39 known_third_party = ["SimpleITK","absl","chex","hydra","jax","numpy","omegaconf","optax", "pandas","pytest","ray","rdkit","setuptools","tensorflow","tensorflow_datasets","tree","wandb"] multi_line_output = 3 force_grid_wrap = 0 line_length = 100 include_trailing_comma = true use_parentheses = true [tool.mypy] python_version = "3.9" warn_unused_configs = true ignore_missing_imports = true disable_error_code = ["misc","attr-defined","call-arg"] show_error_codes = true files = "**/*.py" [tool.ruff] line-length = 100 # Enable Pyflakes `E` and `F` codes by default. select = [ "F", # Pyflakes "E", "W", # pycodestyle "UP", # pyupgrade "N", # pep8-naming # flake8 "YTT", "ANN", "S", "BLE", "B", "A", "C4", "T10", "EM", "ISC", "ICN", "T20", "PT", "Q", "RET", "SIM", "TID", "ARG", "DTZ", "PIE", "PGH", # pygrep-hooks "RUF", # ruff "PLC", "PLE", "PLR", "PLW", # Pylint ] ignore = [ "ANN002", # MissingTypeArgs "ANN003", # MissingTypeKwargs "ANN101", # MissingTypeSelf "EM101", # Exception must not use a string literal, assign to variable first "EM102", # Exception must not use an f-string literal, assign to variable first "RET504", # Unnecessary variable assignment before `return` statement "S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue "PLR0913", # Too many arguments to function call "PLR0915", # Too many statements "PLE0605", # Invalid format for `__all__`, must be `tuple` or `list` "PLR0912", # Too many branches ] # Exclude a variety of commonly ignored directories. exclude = [ ".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox", ".pants.d", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv", ] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" # Assume Python 3.9 target-version = "py39" [tool.ruff.mccabe] # Unlike Flake8, default to a complexity level of 10. max-complexity = 10 [tool.ruff.per-file-ignores] "test_*.py" = ["S101"] "*_test.py" = ["S101"] [tool.ruff.pydocstyle] # Use Google-style docstrings. convention = "google" [tool.ruff.pylint] allow-magic-value-types = ["int", "str"]