Skip to content

Commit ffaa9fa

Browse files
committed
Update project configuration to make package standalone
1 parent f3e6c6f commit ffaa9fa

File tree

3 files changed

+61
-36
lines changed

3 files changed

+61
-36
lines changed

pyproject.toml

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,57 @@
1-
[tool.black]
2-
line-length = 110
3-
target-version = ["py311"]
4-
5-
[tool.isort]
6-
profile = "black"
7-
line_length = 110
8-
9-
[tool.ruff]
10-
line-length = 110
11-
target-version = "py311"
12-
exclude = [
13-
"__init__.py",
14-
]
1+
[build-system]
2+
requires = ["setuptools", "lsst-versions >= 1.3.0"]
3+
build-backend = "setuptools.build_meta"
154

16-
[tool.ruff.lint]
17-
ignore = [
18-
"N802",
19-
"N803",
20-
"N806",
21-
"N812",
22-
"N815",
23-
"N816",
24-
"N999",
5+
[project]
6+
name = "lsst-sconsUtils"
7+
description = "Utilities for build LSST packages with SCons."
8+
license = {text = "BSD 3-Clause License, GPLv3+"}
9+
readme = "README.md"
10+
authors = [
11+
{name="Rubin Observatory Data Management", email="dm-admin@lists.lsst.org"},
2512
]
26-
select = [
27-
"E", # pycodestyle
28-
"F", # pyflakes
29-
"N", # pep8-naming
30-
"W", # pycodestyle
13+
classifiers = [
14+
"Intended Audience :: Science/Research",
15+
"License :: OSI Approved :: BSD License",
16+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
17+
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Topic :: Scientific/Engineering :: Astronomy",
3123
]
32-
extend-select = [
33-
"RUF100", # Warn about unused noqa
24+
keywords = ["lsst"]
25+
dependencies = [
26+
"flake8",
27+
"pytest >= 3.2",
28+
"pytest-cov",
29+
"pytest-session2file",
30+
"ruff",
31+
"scons",
3432
]
33+
dynamic = ["version"]
34+
requires-python = ">=3.10.0"
35+
36+
[project.urls]
37+
"Homepage" = "https://github.com/lsst/sconsUtils"
38+
39+
[project.optional-dependencies]
40+
test = []
41+
42+
[tool.setuptools.packages.find]
43+
where = ["python"]
44+
45+
[tool.setuptools]
46+
zip-safe = true
47+
license-files = ["COPYRIGHT", "LICENSE", "gpl-v3.0.txt", "bsd_license.txt"]
3548

36-
[tool.ruff.lint.pycodestyle]
37-
max-doc-length = 79
49+
[tool.setuptools.package-data]
50+
"lsst.pex.config" = ["py.typed", "configs/*.cfg"]
3851

39-
[tool.ruff.lint.pydocstyle]
40-
convention = "numpy"
52+
[tool.setuptools.dynamic]
53+
version = { attr = "lsst_versions.get_lsst_version" }
4154

4255
[tool.pytest.ini_options]
4356
addopts = "--import-mode=importlib" # Recommended as best practice
57+
norecursedirs = ["build"]

requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
flake8
2+
pytest >= 3.2
3+
pytest-cov
4+
pytest-session2file
5+
ruff
6+
scons

setup.cfg

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
[flake8]
22
max-line-length = 110
33
max-doc-length = 79
4-
ignore = N802, N803, N806, N812, N815, N816, W503, E203
5-
exclude = __init__.py, tests/.tests
4+
ignore = E133, E226, E228, N802, N803, N806, N812, N813, N815, N816, W503
5+
exclude =
6+
bin,
7+
doc/conf.py,
8+
**/*/__init__.py,
9+
**/*/version.py,
10+
tests/.tests

0 commit comments

Comments
 (0)