Skip to content

Commit 82690ac

Browse files
fix: address all post-review issues before v0.1.0 tag
- Remove AGENT_PROMPT.md (internal tooling detail, not for public repo) - Add LICENSE (MIT, Develeap), CHANGELOG.md, CONTRIBUTING.md - Add "Maintained by Develeap" link to README - Fix jitter accumulation in retry loop: jitter now applied to sleep time only, not carried forward into the base delay - Enforce CircuitBreaker half_open_max_calls via a call counter - Guard Retry-After int() parse against HTTP-date format values - Remove unsound cast(dict, response.json()) — use type: ignore comment - Convert CircuitState to StrEnum for consistency with rest of codebase - Convert RetryConfig and CircuitBreakerConfig to frozen dataclasses - Narrow ping() except clause to avoid swallowing programming bugs - Tighten publish.yml tag conditions to strict semver (no-hyphen → PyPI) - Relabel HYPERPING_API_BASE/API_PATHS comment in __init__.py
1 parent 03c2e47 commit 82690ac

8 files changed

Lines changed: 121 additions & 147 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
publish-testpypi:
2121
needs: [build]
22-
if: contains(github.ref, 'rc') || contains(github.ref, 'alpha') || contains(github.ref, 'beta')
22+
if: "github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && contains(github.ref_name, '-')"
2323
runs-on: ubuntu-latest
2424
environment:
2525
name: testpypi
@@ -35,7 +35,7 @@ jobs:
3535

3636
publish-pypi:
3737
needs: [build]
38-
if: "!contains(github.ref, 'rc') && !contains(github.ref, 'alpha') && !contains(github.ref, 'beta')"
38+
if: "github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && !contains(github.ref_name, '-')"
3939
runs-on: ubuntu-latest
4040
environment:
4141
name: pypi

AGENT_PROMPT.md

Lines changed: 0 additions & 89 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] — 2025-01-01
9+
10+
### Added
11+
12+
- Initial release of the `hyperping` Python SDK.
13+
- `HyperpingClient` with full support for Monitors, Incidents, Maintenance Windows, Outages, and Status Pages.
14+
- Automatic retry with exponential backoff and jitter on transient errors (5xx, 429).
15+
- Circuit breaker pattern to prevent cascading failures.
16+
- Typed Pydantic v2 models for all API resources.
17+
- `py.typed` marker for PEP 561 compliance.
18+
- CI matrix across Python 3.11, 3.12, 3.13.
19+
- OIDC trusted publisher workflow for PyPI releases (no stored secrets).

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing
2+
3+
Thank you for your interest in contributing to `hyperping`!
4+
5+
## Setup
6+
7+
```bash
8+
git clone https://github.com/develeap/hyperping-python.git
9+
cd hyperping-python
10+
uv sync --all-extras
11+
```
12+
13+
## Running tests
14+
15+
```bash
16+
uv run pytest -v
17+
```
18+
19+
## Linting and type checking
20+
21+
```bash
22+
uv run ruff check src tests
23+
uv run mypy src
24+
```
25+
26+
## Pull requests
27+
28+
1. Fork the repo and create a branch from `main`.
29+
2. Write tests for any new behaviour.
30+
3. Ensure all checks pass locally.
31+
4. Open a PR — a maintainer will review it.
32+
33+
## Reporting issues
34+
35+
Open an issue at https://github.com/develeap/hyperping-python/issues.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Develeap
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
178178
## License
179179

180180
MIT — see [LICENSE](LICENSE).
181+
182+
## Maintained by
183+
184+
[Develeap](https://develeap.com)

src/hyperping/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"ENDPOINTS",
9797
"get_endpoint_url",
9898
"get_version_for_endpoint",
99-
# Backward compatibility
99+
# Convenience aliases (also used in tests)
100100
"HYPERPING_API_BASE",
101101
"API_PATHS",
102102
# Exceptions

0 commit comments

Comments
 (0)