Skip to content

Commit 7bfbea0

Browse files
authored
Add basic pyproject (#4)
* Add basic pyproject * Use VCS-based versioning * Deleted unneeded test path * Address review comments and bump minimum python
1 parent 0b4bfad commit 7bfbea0

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6+
# auto-generated version file
7+
src/astro_image_display_api/_version.py
8+
69
# C extensions
710
*.so
811

@@ -26,6 +29,7 @@ share/python-wheels/
2629
*.egg
2730
MANIFEST
2831

32+
2933
# PyInstaller
3034
# Usually these files are written by a python script from a template
3135
# before PyInstaller builds the exe, so as to inject date/other infos into it.

pyproject.toml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "astro-image-display-api"
7+
dynamic = ["version"]
8+
description = 'Astronomical image display API definition for cross-backend interoperability'
9+
readme = "README.md"
10+
requires-python = ">=3.12"
11+
license = "BSD-3-Clause"
12+
keywords = []
13+
authors = [
14+
{ name = "Matt Craig", email = "[email protected]" },
15+
]
16+
classifiers = [
17+
"Development Status :: 4 - Beta",
18+
"Programming Language :: Python",
19+
"Programming Language :: Python :: 3.12",
20+
"Programming Language :: Python :: 3.13",
21+
"Programming Language :: Python :: Implementation :: CPython",
22+
]
23+
dependencies = []
24+
25+
[project.urls]
26+
Documentation = "https://github.com/astropy/astro-image-display-api#readme"
27+
Issues = "https://github.com/astropy/astro-image-display-api/issues"
28+
Source = "https://github.com/astropy/astro-image-display-api"
29+
30+
[tool.hatch.version]
31+
source = "vcs"
32+
33+
[tool.hatch.build.hooks.vcs]
34+
version-file = "src/astro_image_display_api/_version.py"
35+
36+
[tool.coverage.run]
37+
source_pkgs = ["astro_image_display_api", "tests"]
38+
branch = true
39+
parallel = true
40+
41+
[tool.coverage.paths]
42+
astro_image_display_api = ["src/astro_image_display_api", "*/astro-image-display-api/src/astro_image_display_api"]
43+
tests = ["tests"]
44+
45+
[tool.coverage.report]
46+
exclude_lines = [
47+
"no cov",
48+
"if __name__ == .__main__.:",
49+
"if TYPE_CHECKING:",
50+
]

0 commit comments

Comments
 (0)