Skip to content

Commit

Permalink
Merge pull request #81 from Remi-Gau/clean_up
Browse files Browse the repository at this point in the history
[MAINT] add bids example submodule for testing
  • Loading branch information
Remi-Gau authored Apr 12, 2024
2 parents 100728a + 7d5a3b9 commit 76f3dad
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 86 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
bids-examples
report.txt

# do not track _version.py for hatch
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "bids/ext/reports/templates"]
path = bids/ext/reports/templates
url = https://github.com/bids-standard/bids-methods.git
[submodule "tools/bids-examples"]
path = tools/bids-examples
url = https://github.com/bids-standard/bids-examples
datalad-url = https://github.com/bids-standard/bids-examples
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ repos:
- id: yamlfmt
args: [--mapping, '2', --sequence, '2', --offset, '0']

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


- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
# intersphinx
# -----------------------------------------------------------------------------
_python_version_str = f"{sys.version_info.major}.{sys.version_info.minor}"
_python_doc_base = "https://docs.python.org/" + _python_version_str
_python_doc_base = f"https://docs.python.org/{_python_version_str}"
intersphinx_mapping = {
"python": (_python_doc_base, None),
"numpy": ("https://numpy.org/doc/stable/", (None, "./_intersphinx/numpy-objects.inv")),
Expand Down
174 changes: 90 additions & 84 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,88 +1,74 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.targets.wheel]
packages = ["bids"]
only-include = ["bids/ext/reports"]

[tool.hatch.build.hooks.vcs]
version-file = "bids/ext/reports/_version.py"
requires = ["hatchling", "hatch-vcs"]

[project]
name = "pybids_reports"
description = "pybids-reports: report generator for BIDS datasets"
authors = [{ name = "PyBIDS Developers", email = "[email protected]"}]
maintainers = [{ name = "PyBIDS Developers", email = "[email protected]" }]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.8"
dependencies = [
"chevron",
"pybids>=0.15",
"nibabel",
"num2words",
"rich"
]
authors = [{name = "PyBIDS Developers", email = "[email protected]"}]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering"
]
dependencies = [
"chevron",
"pybids>=0.15",
"nibabel",
"num2words",
"rich"
]
description = "pybids-reports: report generator for BIDS datasets"
dynamic = ["version"]
# version = "0.1.0"

[project.scripts]
pybids_reports = "bids.ext.reports.cli:cli"

[project.urls]
Homepage = "http://github.com/bids-standard/pybids-reports"
Documentation = "https://pybids-reports.readthedocs.io/en/latest/"
"Bug tracker" = "http://github.com/bids-standard/pybids-reports/issues"
license = {file = "LICENSE"}
maintainers = [{name = "PyBIDS Developers", email = "[email protected]"}]
name = "pybids_reports"
readme = "README.md"
requires-python = ">=3.8"

[project.optional-dependencies]
ci_tests = [
"pybids_reports[test]",
"pytest-xdist"
]
dev = [
"pybids_reports[doc]",
"pybids_reports[test]"
]
doc = [
"furo",
"myst-parser",
"nbsphinx",
"numpydoc",
"sphinx",
"sphinx-argparse",
"sphinx-copybutton",
"sphinx_gallery",
"furo",
"myst-parser",
"nbsphinx",
"numpydoc",
"sphinx",
"sphinx-argparse",
"sphinx-copybutton",
"sphinx_gallery"
]
docs=["pybids_reports[doc]"]
docs = ["pybids_reports[doc]"]
test = [
"codecov",
"flake8-black",
"flake8-docstrings",
"flake8-isort",
"pytest>=3.3",
"pytest-cov",
]
tests=["pybids_reports[test]"]
ci_tests = [
"pybids_reports[test]",
"pytest-xdist"
]
dev = [
"pybids_reports[doc]",
"pybids_reports[test]"
"pytest-cov"
]
tests = ["pybids_reports[test]"]

[project.scripts]
pybids_reports = "bids.ext.reports.cli:cli"

[project.urls]
"Bug tracker" = "http://github.com/bids-standard/pybids-reports/issues"
Documentation = "https://pybids-reports.readthedocs.io/en/latest/"
Homepage = "http://github.com/bids-standard/pybids-reports"

[tool.black]
line-length = 99
target-version = ['py38']
include = '\.pyi?$'
exclude = '''
(
/(
Expand All @@ -99,41 +85,61 @@ exclude = '''
| bids/ext/reports/due.py
)
'''
include = '\.pyi?$'
line-length = 99
target-version = ['py38']

[tool.codespell]
skip = "./.git,bids/ext/reports/tests/data/*"
ignore-words-list = "te"
skip = "./.git,bids/ext/reports/tests/data/*"

[tool.coverage.paths]
source = [
"bids/ext/reports",
"**/bids/ext/reports"
]

[tool.coverage.report]
include_namespace_packages = true

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

[tool.hatch.build.targets.wheel]
only-include = ["bids/ext/reports"]
packages = ["bids"]

[tool.hatch.version]
source = "vcs"

[tool.isort]
combine_as_imports = true
line_length = 99
profile = "black"
skip_gitignore = true

[tool.mypy]
exclude = ['bids/ext/reports/tests/']
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
exclude = ['bids/ext/reports/tests/']
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
ignore_errors = true
module = [
'bids.ext.reports.tests.*',
'bids.ext.reports._version.*',
'bids.ext.reports.due.*',
]
ignore_errors = true

[tool.coverage.paths]
source = [
"bids/ext/reports",
"**/bids/ext/reports",
'bids.ext.reports.due.*'
]

[tool.coverage.report]
include_namespace_packages = true


[tool.isort]
combine_as_imports = true
line_length = 99
profile = "black"
skip_gitignore = true
[tool.pytest.ini_options]
addopts = "-ra --strict-config --strict-markers --doctest-modules --showlocals -s -vv --durations=0"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
junit_family = "xunit2"
minversion = "6.0"
norecursedirs = "bids/ext/reports/templates"
xfail_strict = true
1 change: 1 addition & 0 deletions tools/bids-examples
Submodule bids-examples added at 711be5

0 comments on commit 76f3dad

Please sign in to comment.