Skip to content

Commit 4854423

Browse files
committed
switch to pyproject.toml
switch to pyproject.toml include pyproject.toml after install
1 parent d9aaa1a commit 4854423

File tree

6 files changed

+104
-89
lines changed

6 files changed

+104
-89
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ repos:
99
args: ['--line-length=125',
1010
'--skip-string-normalization']
1111

12+
- repo: https://github.com/tox-dev/pyproject-fmt
13+
rev: v2.5.0
14+
hooks:
15+
- id: pyproject-fmt
16+
1217
- repo: https://github.com/pre-commit/pre-commit-hooks
1318
rev: v5.0.0
1419
hooks:
1520
- id: check-added-large-files
1621
- id: check-case-conflict
1722
- id: check-merge-conflict
1823
- id: check-symlinks
24+
- id: check-toml
1925
- id: check-yaml
2026
- id: debug-statements
2127
- id: end-of-file-fixer
@@ -27,19 +33,13 @@ repos:
2733
rev: 5.13.2
2834
hooks:
2935
- id: isort
30-
args: ["--profile", "black", --line-length=125]
3136

3237
- repo: https://github.com/asottile/pyupgrade
3338
rev: v3.19.0
3439
hooks:
3540
- id: pyupgrade
3641
args: ["--py36-plus"]
3742

38-
- repo: https://github.com/asottile/setup-cfg-fmt
39-
rev: v2.7.0
40-
hooks:
41-
- id: setup-cfg-fmt
42-
4343
- repo: https://github.com/pycqa/flake8
4444
rev: 7.1.1
4545
hooks:

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include LICENSE README.md CONTRIBUTING.md CITATION.cff pyproject.toml setup.py setup.cfg .clang-format
1+
include LICENSE README.md CONTRIBUTING.md CITATION.cff pyproject.toml setup.py .clang-format
22
graft example-models
33
graft test
44
graft contrib
File renamed without changes.

pyproject.toml

Lines changed: 97 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,103 @@
11
[build-system]
2-
# AVOID CHANGING REQUIRES: IT WILL BE UPDATED BY PYSCAFFOLD!
3-
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5", "wheel"]
42
build-backend = "setuptools.build_meta"
53

4+
requires = [ "setuptools>=61", "setuptools-scm>=8" ]
5+
6+
[project]
7+
name = "hls4ml"
8+
version = "1.0.0"
9+
description = "Machine learning in FPGAs using HLS"
10+
readme = "README.md"
11+
license = { text = "Apache-2.0" }
12+
authors = [ { name = "hls4ml Team" } ]
13+
requires-python = ">=3.10"
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Intended Audience :: Developers",
17+
"Intended Audience :: Science/Research",
18+
"License :: OSI Approved :: Apache Software License",
19+
"Programming Language :: C++",
20+
"Programming Language :: Python :: 3 :: Only",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
25+
"Topic :: Software Development :: Libraries",
26+
"Topic :: Software Development :: Libraries :: Python Modules",
27+
]
28+
dependencies = [ "h5py", "numpy", "pydigitalwavetools==1.1", "pyyaml" ]
29+
30+
optional-dependencies.doc = [
31+
"sphinx",
32+
"sphinx-contributors",
33+
"sphinx-github-changelog",
34+
"sphinx-rtd-theme",
35+
]
36+
optional-dependencies.HGQ = [ "hgq~=0.2.0" ]
37+
optional-dependencies.optimization = [
38+
"keras-tuner==1.1.3",
39+
"ortools==9.4.1874",
40+
"packaging",
41+
]
42+
optional-dependencies.profiling = [ "matplotlib", "pandas", "seaborn" ]
43+
optional-dependencies.qkeras = [
44+
"qkeras",
45+
"tensorflow>=2.8,<=2.14.1",
46+
"tensorflow-model-optimization<=0.7.5",
47+
]
48+
optional-dependencies.quantus_report = [ "calmjs-parse", "tabulate" ]
49+
optional-dependencies.sr = [ "sympy" ]
50+
optional-dependencies.testing = [
51+
"calmjs-parse",
52+
"hgq~=0.2.0",
53+
"onnx>=1.4",
54+
"pytest",
55+
"pytest-cov",
56+
"pytest-randomly",
57+
"qonnx",
58+
"tabulate",
59+
"torch",
60+
]
61+
urls.Homepage = "https://fastmachinelearning.org/hls4ml"
62+
scripts.hls4ml = "hls4ml.cli:main"
63+
entry-points.pytest_randomly.random_seeder = "hls4ml:reseed"
64+
65+
[tool.setuptools]
66+
packages = [ "hls4ml" ]
67+
include-package-data = true
68+
669
[tool.setuptools_scm]
7-
# See configuration details in https://github.com/pypa/setuptools_scm
70+
871
version_scheme = "release-branch-semver"
9-
git_describe_command = "git describe --dirty --tags --long --match v* --first-parent"
72+
git_describe_command = [
73+
"git",
74+
"describe",
75+
"--dirty",
76+
"--tags",
77+
"--long",
78+
"--match",
79+
"v*",
80+
"--first-parent",
81+
]
1082
write_to = "hls4ml/_version.py"
83+
84+
[tool.black]
85+
line-length = 125
86+
skip-string-normalization = true
87+
88+
[tool.isort]
89+
profile = "black"
90+
line_length = 125
91+
92+
[tool.flake8]
93+
max-line-length = 125
94+
extend-ignore = [ "E203", "T201" ]
95+
96+
[tool.check-manifest]
97+
ignore = [
98+
".github/**",
99+
"docs/**",
100+
".pre-commit-config.yaml",
101+
"Jenkinsfile",
102+
"hls4ml/_version.py",
103+
]

setup.cfg

Lines changed: 0 additions & 74 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)