diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eeaab5..9a3b90c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/EXAMPLES.md b/EXAMPLES.md index f46a511..3b33b28 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -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 diff --git a/oilpriceapi/version.py b/oilpriceapi/version.py index 5341fdb..de4188b 100644 --- a/oilpriceapi/version.py +++ b/oilpriceapi/version.py @@ -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" diff --git a/pyproject.toml b/pyproject.toml index ff203d4..93c40dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"} diff --git a/scripts/validate_storefront_claims.py b/scripts/validate_storefront_claims.py index 949a66b..9c4e949 100644 --- a/scripts/validate_storefront_claims.py +++ b/scripts/validate_storefront_claims.py @@ -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}" ) diff --git a/tests/test_release_readiness.py b/tests/test_release_readiness.py index d0034a9..eff5f4c 100644 --- a/tests/test_release_readiness.py +++ b/tests/test_release_readiness.py @@ -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: diff --git a/tests/test_storefront_claims.py b/tests/test_storefront_claims.py index abb8794..b6ec354 100644 --- a/tests/test_storefront_claims.py +++ b/tests/test_storefront_claims.py @@ -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( @@ -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 + )