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

## [Unreleased]

## [1.12.1] - 2026-08-11

### Fixed

- Read release metadata without importing the uninstalled source package, so
the trusted publisher can validate the exact wheel from a build-only clean
environment before PyPI upload.

## [1.12.0] - 2026-08-11

### Added
Expand Down
15 changes: 0 additions & 15 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,3 @@ include .env.example

# Include type information
recursive-include oilpriceapi py.typed

# Exclude unnecessary files
global-exclude *.pyc
global-exclude *.pyo
global-exclude __pycache__
global-exclude .DS_Store
global-exclude *.so

# Exclude test and development files
exclude test_sdk_live.py
exclude generate_*.py
exclude data_validation_comparison.py
prune tests
prune docs/_build
prune htmlcov
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.0"
__version__ = "1.12.1"
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.0"
version = "1.12.1"
description = "Official Python SDK for source-timestamped OilPriceAPI energy data"
authors = [
{name = "OilPriceAPI", email = "support@oilpriceapi.com"}
Expand Down
13 changes: 11 additions & 2 deletions scripts/clean-wheel-smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ set -euo pipefail
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
wheel="$(find "$root_dir/dist" -maxdepth 1 -name '*.whl' -print -quit)"
expected_version="$(
cd "$root_dir"
python -c 'from oilpriceapi.version import SDK_VERSION; print(SDK_VERSION)'
python -c '
import pathlib
import re
import sys

project = pathlib.Path(sys.argv[1]).read_text()
match = re.search(r"(?m)^version = \"([^\"]+)\"$", project)
if match is None:
raise SystemExit("project version not found")
print(match.group(1))
' "$root_dir/pyproject.toml"
)"

if [[ -z "$wheel" ]]; then
Expand Down
2 changes: 2 additions & 0 deletions tests/sdk_audit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
@dataclass
class TestResult:
"""Test result container"""
__test__ = False

name: str
passed: bool
error: str = None
Expand Down
9 changes: 9 additions & 0 deletions tests/test_release_readiness.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ def test_examples_use_the_canonical_free_quota() -> None:

def test_publish_gate_audits_and_installs_the_built_wheel() -> None:
workflow = (ROOT / ".github" / "workflows" / "publish.yml").read_text()
smoke = (ROOT / "scripts" / "clean-wheel-smoke.sh").read_text()

assert "pip-audit" in workflow
assert "scripts/clean-wheel-smoke.sh" in workflow
assert "continue-on-error: true" not in workflow
assert "from oilpriceapi.version import SDK_VERSION" not in smoke


def test_packaging_configuration_remains_compatible_with_supported_python() -> None:
Expand All @@ -41,3 +43,10 @@ def test_packaging_configuration_remains_compatible_with_supported_python() -> N
assert 'license = {file = "LICENSE"}' in project
assert 'requires-python = ">=3.8"' in project
assert "[tool.ruff.lint]" in project


def test_manifest_has_no_noop_exclusion_patterns() -> None:
manifest = (ROOT / "MANIFEST.in").read_text()

for stale in ("global-exclude", "exclude test_sdk_live.py", "prune "):
assert stale not in manifest