-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Migrate build to use hatchling (#241)
* Use hatchling and hatch-vcs as build system. - Done mostly automatically with 'hatch new --init'. * Remove setuptools and related files from repository. - Remove setup.py, setup.cfg, MANIFEST.in. - Remove check-manifest from 'develop' extra. * Remove setuptools install from CI. * Remove check-manifest checks from CI. * Add .flake8 file as flake8 doesn't support pyproject.toml.
- Loading branch information
1 parent
a2e7ad1
commit 66b2ea4
Showing
10 changed files
with
100 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[flake8] | ||
# E501: line too long | ||
extend-ignore = E501 | ||
max-line-length = 88 | ||
max-complexity = 18 | ||
count = True | ||
statistics = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,93 @@ | ||
[build-system] | ||
# Minimum requirements for the build system to execute. | ||
requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4"] | ||
build-backend = "setuptools.build_meta" | ||
requires = [ | ||
"hatchling>=1.13.0", | ||
"hatch-vcs>=0.3.0", | ||
] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "pylhe" | ||
dynamic = ["version"] | ||
description = "A small package to get structured data out of Les Houches Event files" | ||
readme = "README.md" | ||
license = { text = "Apache-2.0" } # SPDX short identifier | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{ name = "Lukas Heinrich", email = "[email protected]" }, | ||
{ name = "Matthew Feickert", email = "[email protected]" }, | ||
{ name = "Eduardo Rodrigues", email = "[email protected]" }, | ||
] | ||
maintainers = [ {name = "The Scikit-HEP admins", email = "[email protected]"} ] | ||
keywords = [ | ||
"lhe", | ||
"physics", | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
] | ||
dependencies = [ | ||
"awkward>=1.2.0", | ||
"graphviz>=0.12.0", | ||
"particle>=0.16", | ||
"vector>=0.8.1", | ||
] | ||
|
||
[project.optional-dependencies] | ||
lint = [ | ||
"black", | ||
"flake8", | ||
] | ||
test = [ | ||
"pydocstyle", | ||
"pytest-cov>=2.5.1", | ||
"pytest>=6.0", | ||
"scikit-hep-testdata>=0.4.36", | ||
] | ||
develop = [ | ||
"pyhf[lint,test]", | ||
"pre-commit", | ||
"tbump>=6.7.0", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/scikit-hep/pylhe" | ||
"Source Code" = "https://github.com/scikit-hep/pylhe" | ||
"Issue Tracker" = "https://github.com/scikit-hep/pylhe/issues" | ||
"Releases" = "https://github.com/scikit-hep/pylhe/releases" | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "src/pylhe/_version.py" | ||
[tool.hatch.version.raw-options] | ||
local_scheme = "no-local-version" | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "src/pylhe/_version.py" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
# hatchling always includes: | ||
# pyproject.toml, .gitignore, any README, any LICENSE, AUTHORS | ||
include = [ | ||
"/src", | ||
"/tests", | ||
"/CITATION.cff", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["src/pylhe"] | ||
|
||
[tool.black] | ||
line-length = 88 | ||
include = '\.pyi?$' | ||
|
@@ -19,18 +100,6 @@ extend-exclude = ''' | |
)/ | ||
''' | ||
|
||
[tool.check-manifest] | ||
ignore = [ | ||
'examples/*', | ||
'tests/*', | ||
'docker/*', | ||
'.*', | ||
'pyproject.toml', | ||
'pytest.ini', | ||
'codecov.yml', | ||
'CODE_OF_CONDUCT.md', | ||
] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
|