Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
22 changes: 19 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,23 @@ repos:
hooks:
- id: blacken-docs

- repo: https://github.com/abravalheri/validate-pyproject
Comment thread
braingram marked this conversation as resolved.
rev: "v0.24.1"
- repo: local
hooks:
- id: validate-pyproject
- id: taplo-format
name: taplo-format
description: Format TOML documents
entry: taplo format
language: python
types: [toml]
args: []
require_serial: false
additional_dependencies: ["taplo==0.9.3"]
Comment thread
braingram marked this conversation as resolved.
Outdated
- id: taplo-lint
name: taplo-lint
description: Lint TOML documents
entry: taplo lint
language: python
types: [toml]
args: [--default-schema-catalogs]
require_serial: false
additional_dependencies: ["taplo==0.9.3"]
171 changes: 76 additions & 95 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 3',
]
dynamic = [
'version',
]
dynamic = ['version']
dependencies = [
"asdf-standard>=1.1.0",
"importlib-metadata>=4.11.4 ; python_version<='3.11'",
Expand All @@ -26,52 +24,35 @@ dependencies = [
# end of vendorized jsonschema deps
]
[project.optional-dependencies]
all = [
"asdf[lz4]",
"asdf[http]",
]
lz4 = [
"lz4>=0.10",
]
http = [
"fsspec[http]>=2022.8.2",
]
all = ["asdf[lz4]", "asdf[http]"]
lz4 = ["lz4>=0.10"]
http = ["fsspec[http]>=2022.8.2"]
docs = [
"sphinx-asdf>=0.2.2",
"graphviz",
"sphinx-inline-tabs",
'tomli; python_version < "3.11"',
"furo",
]
tests = [
"asdf[all]",
"psutil",
"pytest>=8",
]
test = [
"asdf[tests]",
]
benchmark = [
"asdf[tests]",
"pytest-benchmark",
]
tests = ["asdf[all]", "psutil", "pytest>=8"]
test = ["asdf[tests]"]
benchmark = ["asdf[tests]", "pytest-benchmark"]
[project.urls]
'documentation' = 'https://asdf.readthedocs.io/en/stable/'
'repository' = 'https://github.com/asdf-format/asdf'
'tracker' = 'https://github.com/asdf-format/asdf/issues'

[project.entry-points]
'asdf.extensions' = {asdf = 'asdf._core._integration:get_extensions'}
'asdf.resource_mappings' = {asdf = 'asdf._core._integration:get_json_schema_resource_mappings'}
asdf_extensions = {builtin = 'asdf.extension._legacy:BuiltinExtension'}
console_scripts = {asdftool = 'asdf._commands.main:main'}
'asdf.extensions' = { asdf = 'asdf._core._integration:get_extensions' }
'asdf.resource_mappings' = { asdf = 'asdf._core._integration:get_json_schema_resource_mappings' }
asdf_extensions = { builtin = 'asdf.extension._legacy:BuiltinExtension' }

[project.scripts]
asdftool = 'asdf._commands.main:main'

[build-system]
build-backend = 'setuptools.build_meta'
requires = [
"setuptools>=60",
"setuptools_scm[toml]>=8",
"wheel",
]
requires = ["setuptools>=60", "setuptools_scm[toml]>=8", "wheel"]

[tool.setuptools.packages.find]
include = ['asdf*']
Expand Down Expand Up @@ -104,66 +85,66 @@ force-exclude = '''

[tool.pytest.ini_options]
testpaths = ['asdf', 'docs']
minversion = 4.6
minversion = "4.6"
filterwarnings = [
'error', # also set in _tests/conftest to work with pyargs
'ignore:numpy.ndarray size changed:RuntimeWarning',
'ignore:Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.',
'error', # also set in _tests/conftest to work with pyargs
'ignore:numpy.ndarray size changed:RuntimeWarning',
'ignore:Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.',
]
addopts = [
'--doctest-modules',
'--doctest-glob=*.rst',
'--color=yes',
'-rsxfE',
'-p no:legacypath',
'--doctest-modules',
'--doctest-glob=*.rst',
'--color=yes',
'-rsxfE',
'-p no:legacypath',
]

[tool.coverage.run]
omit = [
'asdf/_astropy_init*',
'asdf/conftest*',
'asdf/cython_version*',
'asdf/setup_package*',
'asdf/*/setup_package*',
'asdf/*/*/setup_package*',
'asdf/testing/*',
'asdf/tests/*',
'asdf/*/tests/*',
'asdf/*/*/tests/*',
'asdf/version.*',
'asdf/compat*',
'asdf/_extern*',
'asdf/_jsonschema/**',
# And again for running against installed version
'*/asdf/_astropy_init*',
'*/asdf/conftest*',
'*/asdf/cython_version*',
'*/asdf/setup_package*',
'*/asdf/*/setup_package*',
'*/asdf/*/*/setup_package*',
'*/asdf/testing/*',
'*/asdf/tests/*',
'*/asdf/*/tests/*',
'*/asdf/*/*/tests/*',
'*/asdf/version.*',
'*/asdf/compat*',
'*/asdf/_extern*',
'*/asdf/_jsonschema/**',
'asdf/_astropy_init*',
'asdf/conftest*',
'asdf/cython_version*',
'asdf/setup_package*',
'asdf/*/setup_package*',
'asdf/*/*/setup_package*',
'asdf/testing/*',
'asdf/tests/*',
'asdf/*/tests/*',
'asdf/*/*/tests/*',
'asdf/version.*',
'asdf/compat*',
'asdf/_extern*',
'asdf/_jsonschema/**',
# And again for running against installed version
'*/asdf/_astropy_init*',
'*/asdf/conftest*',
'*/asdf/cython_version*',
'*/asdf/setup_package*',
'*/asdf/*/setup_package*',
'*/asdf/*/*/setup_package*',
'*/asdf/testing/*',
'*/asdf/tests/*',
'*/asdf/*/tests/*',
'*/asdf/*/*/tests/*',
'*/asdf/version.*',
'*/asdf/compat*',
'*/asdf/_extern*',
'*/asdf/_jsonschema/**',
]

[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
'pragma: no cover',
# Don't complain about packages we have installed
'except ImportError',
# Don't complain if tests don't hit assertions
'raise AssertionError',
'raise NotImplementedError',
# Don't complain about script hooks
'def main\(.*\):',
# Ignore branches that don't pertain to this version of Python
'pragma: py{ ignore_python_version }',
# Have to re-enable the standard pragma
'pragma: no cover',
# Don't complain about packages we have installed
'except ImportError',
# Don't complain if tests don't hit assertions
'raise AssertionError',
'raise NotImplementedError',
# Don't complain about script hooks
'def main\(.*\):',
# Ignore branches that don't pertain to this version of Python
'pragma: py{ ignore_python_version }',
]

[tool.ruff]
Expand All @@ -173,18 +154,18 @@ extend-exclude = ["asdf/_extern/*", "asdf/_jsonschema/*", "docs/*"]

[tool.ruff.lint]
select = [
# minimal set to match pre-ruff behavior
"E", # pycodestyle
"F", # pyflakes, autoflake
"I", # isort
"S", # bandit
"UP", # pyupgrade
"RUF", # ruff specific, includes yesqa
# minimal set to match pre-ruff behavior
"E", # pycodestyle
"F", # pyflakes, autoflake
"I", # isort
"S", # bandit
"UP", # pyupgrade
"RUF", # ruff specific, includes yesqa
]
extend-ignore = [
"S310", # URL open for permitted schemes
"RUF005", # prefer concatenate over add for collections
"RUF012", # mutable-class-default (typing related)
"S310", # URL open for permitted schemes
"RUF005", # prefer concatenate over add for collections
"RUF012", # mutable-class-default (typing related)
]

[tool.ruff.lint.per-file-ignores]
Expand All @@ -196,8 +177,8 @@ extend-ignore = [
exclude = ["asdf/_extern/*", "asdf/_jsonschema/*"]

[tool.codespell]
skip="*.pdf,*.asdf,.tox,asdf/_extern,asdf/_jsonschema,build,./tags,.git,docs/_build"
ignore-words-list="""
skip = "*.pdf,*.asdf,.tox,asdf/_extern,asdf/_jsonschema,build,./tags,.git,docs/_build"
ignore-words-list = """
fo,afile,
"""

Expand Down
Loading