Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*

!.git
!*.py
!*.rst
!*.txt
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ grafana-wtf changelog

in progress
===========
- Started using ``versioningit`` for versioning

2025-02-04 0.22.0
=================
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV TERM=linux

# Install prerequisites
RUN apt-get update
RUN apt-get --yes install wget
RUN apt-get --yes install git wget

# Configure build environment
ENV PIP_ROOT_USER_ACTION=ignore
Expand Down
10 changes: 9 additions & 1 deletion grafana_wtf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
"""grafana-wtf: Grep through all Grafana entities"""
try:
from importlib.metadata import PackageNotFoundError, version
except (ImportError, ModuleNotFoundError): # pragma:nocover
from importlib_metadata import PackageNotFoundError, version # type: ignore[assignment,no-redef,unused-ignore]

__appname__ = "grafana-wtf"
__version__ = "0.22.0"

try:
__version__ = version(__appname__)
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42", # At least v42 of setuptools required.
"versioningit",
]

[tool.versioningit.vcs]
method = "git-archive"
default-tag = "0.0.0"
describe-subst = "$Format:%(describe:tags)$"

[tool.ruff]
line-length = 100

Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

from setuptools import find_packages, setup
from versioningit import get_cmdclasses

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, "README.rst")).read()
Expand All @@ -14,6 +15,7 @@
# Core
"six",
"docopt-ng>=0.6.2,<0.10",
"importlib-metadata; python_version<'3.8'",
"munch>=2.5.0,<5",
"tqdm>=4.60.0,<5",
"verlib2>=0.3.1,<0.4",
Expand Down Expand Up @@ -43,7 +45,7 @@

setup(
name="grafana-wtf",
version="0.22.0",
cmdclass=get_cmdclasses(),
description="Grep through all Grafana entities in the spirit of git-wtf",
long_description=README,
license="AGPL 3, EUPL 1.2",
Expand Down