Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 100
ignore = E203,W503
exclude =
*/__init__.py
.tox/
11 changes: 7 additions & 4 deletions dandischema/tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,13 @@ def test_valid_schema(self) -> None:
dummy_validator = MagicMock(spec=JsonschemaValidator)
valid_schema = {"type": "object"}

with patch("requests.get") as mock_get, patch(
"dandischema.metadata.dandi_jsonschema_validator",
return_value=dummy_validator,
) as mock_validator:
with (
patch("requests.get") as mock_get,
patch(
"dandischema.metadata.dandi_jsonschema_validator",
return_value=dummy_validator,
) as mock_validator,
):
mock_response = MagicMock()
mock_response.raise_for_status.return_value = None
mock_response.json.return_value = valid_schema
Expand Down
91 changes: 87 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,66 @@
[build-system]
# Setuptools version should match setup.py; wheel because pip will insert it noisily
requires = ["setuptools >= 42.0.0", "versioningit", "wheel"]
build-backend = 'setuptools.build_meta'
requires = ["setuptools >= 61.0.0", "versioningit"]
build-backend = "setuptools.build_meta"

[project]
name = "dandischema"
description = "Schemata for DANDI archive project"
readme = {file = "README.md", content-type = "text/markdown"}
license = "Apache-2.0"
authors = [
{name = "DANDI developers", email = "team@dandiarchive.org"},
]
maintainers = [
{name = "Yaroslav O. Halchenko", email = "debian@onerussian.com"},
]
classifiers = [
"Development Status :: 1 - Planning",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.10"
dependencies = [
"jsonschema[format]",
"packaging>=14.0",
"pydantic-settings",
"pydantic[email]~=2.4",
"requests",
"zarr_checksum",
]
dynamic = ["version"]

[project.urls]
Homepage = "http://dandiarchive.org"
"Source Code" = "https://github.com/dandi/dandischema"

[project.optional-dependencies]
style = [
"flake8",
"pre-commit",
]
test = [
"anys",
"mypy",
"pytest",
"pytest-cov",
"pytest-rerunfailures",
]
all = [
"dandischema[style]",
"dandischema[test]",
]

[tool.setuptools.packages.find]
namespaces = true
include = ["dandischema*"]

[tool.versioningit]
default-version = "0+unknown"
Expand All @@ -19,10 +78,34 @@ distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
file = "dandischema/_version.py"

[tool.black]
exclude='\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist'
exclude = '\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist'

[tool.isort]
profile = "black"
force_sort_within_sections = true
reverse_relative = true
known_first_party = ["dandischema"]

[tool.mypy]
allow_incomplete_defs = false
allow_untyped_defs = false
ignore_missing_imports = false
no_implicit_optional = true
implicit_reexport = false
local_partial_types = true
pretty = true
show_error_codes = true
show_traceback = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
plugins = ["pydantic.mypy"]
exclude = ['^dandischema/_version\.py$']

[[tool.mypy.overrides]]
module = "dandischema._version"
follow_imports = "skip"

[tool.pydantic-mypy]
init_forbid_extra = true
97 changes: 0 additions & 97 deletions setup.cfg

This file was deleted.

23 changes: 0 additions & 23 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ deps =
codespell~=2.0
flake8
commands =
codespell dandischema setup.py
flake8 --config=setup.cfg {posargs} dandischema setup.py
codespell dandischema
flake8 {posargs} dandischema

[testenv:typing]
deps =
Expand Down
Loading