Skip to content

Commit 66e18d8

Browse files
authored
Merge pull request #16 from GernotMaier/pypi-entry-point
Pypi entry point
2 parents ed20ad7 + 9c7a192 commit 66e18d8

File tree

6 files changed

+29
-2
lines changed

6 files changed

+29
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ __pycache__/
66
.DS_Store
77

88
v2dl5.egg-info
9+
10+
v2dl5/_version.py

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dynamic = ["version"]
1414
description = "High-level analysis for VERITAS with gammapy"
1515
readme = "README.md"
1616
license = { file="LICENSE" }
17-
version = "0.1.0"
1817
authors = [
1918
{ name="Gernot Maier", email="[email protected]" },
2019
]
@@ -30,6 +29,7 @@ dependencies = [
3029
"astropy",
3130
"astroquery",
3231
"gammapy",
32+
"Ipython",
3333
"pydantic<2",
3434
]
3535

@@ -38,7 +38,7 @@ dependencies = [
3838
"bug tracker" = "https://github.com/GernotMaier/V2DL5/issues"
3939

4040
[project.scripts]
41-
v2dl5-1d-reflected-region = "v2dl5.scripts.1d_reflected_region:main"
41+
v2dl5-reflected-region-analysis = "v2dl5.scripts.reflected_region_analysis:main"
4242

4343
[tool.black]
4444
line_length = 100

v2dl5/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import logging
2+
3+
from .version import __version__
4+
5+
logging.basicConfig(format="%(levelname)s::%(module)s(l%(lineno)s)::%(funcName)s::%(message)s")
6+
logging.getLogger("matplotlib").setLevel(logging.WARNING)
7+
8+
__all__ = ["__version__"]

v2dl5/scripts/__init__.py

Whitespace-only changes.

v2dl5/version.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# this is adapted from https://github.com/cta-observatory/ctapipe/blob/main/ctapipe/version.py
2+
# which is adapted from https://github.com/astropy/astropy/blob/master/astropy/version.py
3+
# see https://github.com/astropy/astropy/pull/10774 for a discussion on why this needed.
4+
5+
try:
6+
try:
7+
from ._dev.scm_version import version
8+
except ImportError:
9+
from ._version import version
10+
except Exception:
11+
import warnings
12+
13+
warnings.warn("Could not determine v2dl5 version; this indicates a broken installation.")
14+
del warnings
15+
version = "0.0.0"
16+
17+
__version__ = version

0 commit comments

Comments
 (0)