Skip to content

Commit

Permalink
fix import linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Mar 15, 2024
1 parent eda018e commit c96cd2d
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 71 deletions.
21 changes: 0 additions & 21 deletions .importlinter

This file was deleted.

6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ repos:
- id: yamlfmt
args: [--mapping, '4', --sequence, '4', --offset, '0']

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-toml
args: [--autofix, --indent, '4']

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
hooks:
Expand Down
123 changes: 73 additions & 50 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,9 @@ build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]

[project]
name = "bidsmreye"
description = "bids app using deepMReye to decode eye motion for fMRI time series data"
readme = "README.md"
requires-python = ">=3.9.0"
license = { file="LICENSE" }
authors = [
{ name = "Remi Gau", email = "[email protected]" },
{name = "Remi Gau", email = "[email protected]"}
]
keywords = [
"BIDS",
"brain imaging data structure",
"neuroimaging",
"automated pipeline",
"MRI",
"Eyetracking",
"Machine learning",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
Expand All @@ -30,7 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Scientific/Engineering :: Image Processing"
]
dependencies = [
"attrs",
Expand All @@ -44,9 +30,24 @@ dependencies = [
"tomli; python_version < '3.11'",
"keras<3.0.0"
]
description = "bids app using deepMReye to decode eye motion for fMRI time series data"
dynamic = ["version"]
keywords = [
"BIDS",
"brain imaging data structure",
"neuroimaging",
"automated pipeline",
"MRI",
"Eyetracking",
"Machine learning"
]
license = {file = "LICENSE"}
name = "bidsmreye"
readme = "README.md"
requires-python = ">=3.9.0"

[project.optional-dependencies]
dev = ["bidsmreye[doc,test,style]"]
# also stored in docs/requirements.txt
# to speed up readthedocs build
doc = [
Expand All @@ -56,9 +57,10 @@ doc = [
"sphinx",
"sphinx-argparse",
"sphinx-copybutton",
"sphinx-rtd-theme",
"sphinx-rtd-theme"
]
style =[
docs = ["bidsmreye[doc]"]
style = [
"black",
"codespell",
"flake8",
Expand All @@ -67,24 +69,30 @@ style =[
'types-all',
'pandas-stubs',
"pre-commit",
"sourcery",
"sourcery"
]
test = [
"pytest",
"pytest-cov",
"pytest-cov"
]
dev = ["bidsmreye[doc,test,style]"]
docs = ["bidsmreye[doc]"]
tests = ["bidsmreye[test]"]

[project.urls]
Homepage = "https://github.com/cpp-lln-lab/bidsMReye"
"Bug Tracker" = "https://github.com/cpp-lln-lab/bidsMReye/issues"

[project.scripts]
bidsmreye = "bidsmreye.bidsmreye:cli"
bidsmreye_model = "bidsmreye.download:cli"

[project.urls]
"Bug Tracker" = "https://github.com/cpp-lln-lab/bidsMReye/issues"
Homepage = "https://github.com/cpp-lln-lab/bidsMReye"

[tool.black]
line-length = 90

[tool.codespell]
builtin = "clear,rare"
ignore-words-list = "fo,slite"
skip = "*.svg,*.eps,.git,env,*build,.mypy*,outputs,.mypy_cache,moae_fmriprep,bidsmreye/templates/CITATION.bib"

[tool.hatch.build.hooks.vcs]
version-file = "bidsmreye/_version.py"

Expand All @@ -94,44 +102,49 @@ packages = ["bidsmreye"]
[tool.hatch.version]
source = "vcs"

[tool.black]
line-length = 90

[tool.codespell]
skip = "*.svg,*.eps,.git,env,*build,.mypy*,outputs,.mypy_cache,moae_fmriprep,bidsmreye/templates/CITATION.bib"
builtin = "clear,rare"
ignore-words-list = "fo,slite"
[tool.importlinter]
ignore_imports = [
"bidsmreye._version"
]
root_package = "bidsmreye"

[tool.vulture]
min_confidence = 70
paths = ["bidsmreye"]
sort_by_size = true
[[tool.importlinter.contracts]]
containers = "bidsmreye"
layers = [
"bidsmreye",
"prepare_data | generalize | download",
"quality_control",
"visualize",
"bids_utils",
"methods",
"utils",
"configuration",
"logging",
"defaults"
]
name = "Layered architecture"
type = "layers"

[tool.mypy]
exclude = ['tests/']
plugins = "pydantic.mypy"
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
exclude = ['tests/']
no_implicit_optional = true
plugins = "pydantic.mypy"
warn_redundant_casts = true
warn_unused_ignores = true

[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true

[[tool.mypy.overrides]]
ignore_errors = true
module = [
'bids.*',
"bidsmreye._version"
]
ignore_errors = true

[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
'attrs.*',
"bidsmreye._version",
Expand All @@ -142,15 +155,25 @@ module = [
'plotly.*',
'pooch.*',
'rich.*',
'scipy.*',
'scipy.*'
]
ignore_missing_imports = true

[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true

[tool.pytest.ini_options]
addopts = "--cov bidsmreye -ra --strict-config --strict-markers --doctest-modules --showlocals -s -vv --durations=0"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
junit_family = "xunit2"
log_cli_level = "INFO"
minversion = "6.0"
xfail_strict = true
testpaths = ["tests"]
log_cli_level = "INFO"
xfail_strict = true

[tool.vulture]
min_confidence = 70
paths = ["bidsmreye"]
sort_by_size = true

0 comments on commit c96cd2d

Please sign in to comment.