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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.12.4] - 2026-08-11

### Fixed

- Reject every fixed demo-rate literal, including the previously exempted
daily allowance, and direct examples to the reviewed live product facts.

## [1.12.3] - 2026-08-11

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ print("📊 Powered by https://oilpriceapi.com")

Ready to build with these examples?

1. **[Create an API key](https://oilpriceapi.com/auth/signup)** - The current free-account allowance is 50 requests/day; verify the [product facts](https://api.oilpriceapi.com/product-facts.json)
1. **[Create an API key](https://oilpriceapi.com/auth/signup)** - Check the reviewed [product facts](https://api.oilpriceapi.com/product-facts.json) for the current account allowance
2. **[Install the SDK](https://pypi.org/project/oilpriceapi/)** - `pip install oilpriceapi`
3. **[Read the docs](https://docs.oilpriceapi.com/sdk/python)** - Complete API reference
4. **[Choose a plan](https://oilpriceapi.com/pricing)** - Upgrade for more requests
Expand Down
2 changes: 1 addition & 1 deletion oilpriceapi/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
Used in __init__.py, client.py, and async_client.py.
"""

__version__ = "1.12.3"
__version__ = "1.12.4"
SDK_VERSION = __version__
SDK_NAME = "oilpriceapi-python"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "oilpriceapi"
version = "1.12.3"
version = "1.12.4"
description = "Official Python SDK for source-timestamped OilPriceAPI energy data"
authors = [
{name = "OilPriceAPI", email = "support@oilpriceapi.com"}
Expand Down
2 changes: 0 additions & 2 deletions scripts/validate_storefront_claims.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ def _claim_failures(root: Path, surfaces: Iterable[Path]) -> List[str]:
for label, pattern in BLOCKED:
match = pattern.search(text)
if match:
if label == "fixed demo rate" and match.group(0).lower() == "50 requests/day":
continue
failures.append(
f"{path.relative_to(root)}: {label} matched {match.group(0)!r}"
)
Expand Down
11 changes: 8 additions & 3 deletions tests/test_release_readiness.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ def test_release_documentation_matches_the_automated_gate() -> None:
assert changelog.count("## [Unreleased]") == 1


def test_examples_use_the_canonical_free_quota() -> None:
def test_examples_defer_mutable_allowances_to_product_facts() -> None:
examples = (ROOT / "EXAMPLES.md").read_text()

assert "50 requests/day" in examples
assert not re.search(r"free requests?/(?:month|monthly)", examples, re.IGNORECASE)
assert "https://api.oilpriceapi.com/product-facts.json" in examples
assert not re.search(
r"\b\d[\d,]*\s+(?:api\s+)?requests?\s*(?:/|per\s+)"
r"(?:minute|hour|day|month)s?\b",
examples,
re.IGNORECASE,
)


def test_publish_gate_audits_and_installs_the_built_wheel() -> None:
Expand Down
9 changes: 8 additions & 1 deletion tests/test_storefront_claims.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def test_rejects_claim_in_future_installed_package_data(tmp_path: Path) -> None:
'Monthly station query limit applies."""\n'
)
(package / "docs" / "catalog.json").write_text(
'{"allowance": "1,000 API requests/month"}\n'
'{"allowance": "1,000 API requests/month", '
'"daily_allowance": "50 requests/day"}\n'
)
(package / "__pycache__" / "version.cpython-312.pyc").write_bytes(b"\x00\xff")
(dist_info / "METADATA").write_text(
Expand Down Expand Up @@ -108,3 +109,9 @@ def test_rejects_claim_in_future_installed_package_data(tmp_path: Path) -> None:
for failure in failures
)
assert any("oilpriceapi/docs/catalog.json" in failure for failure in failures)
assert any(
"oilpriceapi/docs/catalog.json" in failure
and "fixed demo rate" in failure
and "matched '50 requests/day'" in failure
for failure in failures
)