Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to hatchling #223

Merged
merged 8 commits into from
Jul 19, 2022
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]
extend-select = B9
extend-ignore = E501, E203, D103, D102, D101, D100, D107, D105, D205, D400, D401, D104, D412
per-file-ignores =
tests/*: T
noxfile.py: T
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.0
with:
extra_args: --hook-stage manual check-manifest

checks:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -80,7 +78,7 @@ jobs:
run: python -m pip list

- name: Check compute features
run: python -m pip install .[test,test_extras]
run: python -m pip install .[test,test-extras]

- name: Test package
run: python -m pytest -ra -m dis
Expand Down
11 changes: 0 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ repos:
hooks:
- id: isort

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.1
hooks:
- id: setup-cfg-fmt

- repo: https://github.com/mgedmin/check-manifest
rev: "0.48"
hooks:
- id: check-manifest
stages: [manual]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
hooks:
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

5 changes: 0 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import shutil
from pathlib import Path

import nox
Expand Down Expand Up @@ -50,9 +49,5 @@ def docs(session):
@nox.session
def build(session):
"""Build an SDist and wheel."""
build_p = DIR.joinpath("build")
if build_p.exists():
shutil.rmtree(build_p)

session.install("build")
session.run("python", "-m", "build")
144 changes: 127 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,48 +1,158 @@
[build-system]
requires = [
"setuptools>=42.0",
"setuptools_scm[toml]>=3.4"
"hatchling",
"hatch-vcs",
]
build-backend = "setuptools.build_meta"
build-backend = "hatchling.build"

[tool.setuptools_scm]
write_to = "src/vector/version.py"
[project]
name = "vector"
description = "Vector classes and utilities"
readme = { file = "README.md", content-type = "text/markdown" }
maintainers = [ {name = "The Scikit-HEP admins", email = "scikit-hep-admins@googlegroups.com"} ]
license = "BSD-3-Clause"
requires-python = ">=3.6"
keywords = [
"vector",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Physics",
"Typing :: Typed",
]
dependencies = [
"importlib-metadata>=0.22;python_version<\"3.8\"",
"numpy>=1.13.3",
"packaging>=19.0",
"typing-extensions;python_version<\"3.8\"",
]
dynamic = [
"version",
]

[[project.authors]]
name = "Jim Pivarski, Henry Schreiner, Eduardo Rodrigues"
email = "eduardo.rodrigues@cern.ch"

[project.optional-dependencies]
awkward = [
"awkward>=1.2.0",
]
dev = [
"awkward>=1.2.0",
"numba>=0.50; python_version>=\"3.6\"",
"pytest-cov>=3.0.0",
"pytest>=6",
"xdoctest>=1.0.0",
]
docs = [
"awkward",
"ipykernel",
"myst-parser>0.13",
"nbsphinx",
"sphinx-math-dollar",
"Sphinx>=4.0",
"sphinx_book_theme>=0.0.42",
"sphinx_copybutton",
]
test = [
"pytest-cov>=3.0.0",
"pytest>=6",
"xdoctest>=1.0.0",
]
test-extras = [
"spark-parser",
"uncompyle6",
]

[project.entry-points.numba_extensions]
init = "vector:register_numba"

[project.urls]
"Bug Tracker" = "https://github.com/scikit-hep/vector/issues"
Changelog = "https://vector.readthedocs.io/en/latest/changelog.html"
Discussions = "https://github.com/scikit-hep/vector/discussions"
Documentation = "https://vector.readthedocs.io/"
Homepage = "https://github.com/scikit-hep/vector"

[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/vector/version.py"

[tool.pytest.ini_options]
minversion = "6.0"
xfail_strict = true
addopts = ["-ra", "--strict-markers", "--strict-config"]
testpaths = ["tests"]
markers = ["slow", "numba", "awkward", "dis"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
]
testpaths = [
"tests",
]
markers = [
"slow",
"numba",
"awkward",
"dis",
]
log_cli_level = "DEBUG"
filterwarnings = ["error", "ignore::DeprecationWarning", "ignore::UserWarning"]
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore::UserWarning",
]

[tool.isort]
profile = "black"

[tool.mypy]
files = ["src/vector"]
files = [
"src/vector",
]
python_version = "3.8"
strict = true
warn_return_any = false
show_error_codes = true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "truthy-bool", "redundant-expr"]
enable_error_code = [
"ignore-without-code",
"truthy-bool",
"redundant-expr",
]

[[tool.mypy.overrides]]
module = "vector._compute.*.*"
disallow_untyped_defs = false
disallow_untyped_calls = false

[[tool.mypy.overrides]]
module = ["numba.*", "awkward.*"]
module = [
"numba.*",
"awkward.*",
]
ignore_missing_imports = true

[tool.check-manifest]
ignore = [
".*",
"environment.yml",
"src/vector/version.py",
"docs/**",
"noxfile.py",
".*",
"environment.yml",
"src/vector/version.py",
"docs/**",
"noxfile.py",
]
64 changes: 0 additions & 64 deletions setup.cfg

This file was deleted.

41 changes: 0 additions & 41 deletions setup.py

This file was deleted.