Skip to content

Commit

Permalink
Run tests on python 3.12 and 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmyronyuk committed Mar 6, 2025
1 parent 0f0ab1f commit 2c56bec
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout repository code
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ s.labels(method="POST", endpoint="/login").observe(3.4)

### With custom quantiles and precisions

By default, metrics are observed for next quantile-precision pairs
By default, metrics are observed for next (quantile, precision (inaccuracy)) pairs
`((0.50, 0.05), (0.90, 0.01), (0.99, 0.001))`
but you can provide your own value when creating the metric.
but you can provide your own values when creating the metric.

```python
from prometheus_summary import Summary
Expand Down
8 changes: 4 additions & 4 deletions prometheus_summary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class Summary(prometheus_client.Summary):
# pairs of (quantile, allowed error)
# pairs of (quantile, allowed error (inaccuracy))
DEFAULT_INVARIANTS = ((0.50, 0.05), (0.90, 0.01), (0.99, 0.001))

def __init__(
Expand Down Expand Up @@ -40,9 +40,9 @@ def __init__(
registry=registry,
_labelvalues=_labelvalues,
)
self._kwargs['invariants'] = invariants
self._kwargs['max_age_seconds'] = max_age_seconds
self._kwargs['age_buckets'] = age_buckets
self._kwargs["invariants"] = invariants
self._kwargs["max_age_seconds"] = max_age_seconds
self._kwargs["age_buckets"] = age_buckets

def _metric_init(self):
super()._metric_init()
Expand Down
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,25 @@ def readfile(filename) -> str:
license="Apache License 2.0",
url="https://github.com/RefaceAI/prometheus-summary",
packages=["prometheus_summary"],
python_requires=">=3.7",
install_requires=[
"prometheus_client>=0.11.0",
"quantile-estimator>=0.1.0",
],
platforms="Platform Independent",
classifiers=[
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Mathematics",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
)

0 comments on commit 2c56bec

Please sign in to comment.