Skip to content

ci: GitHub Actions test matrix for python 3.10+#30

Merged
nc9 merged 6 commits into
mainfrom
ci/python-matrix
May 22, 2026
Merged

ci: GitHub Actions test matrix for python 3.10+#30
nc9 merged 6 commits into
mainfrom
ci/python-matrix

Conversation

@nc9

@nc9 nc9 commented May 22, 2026

Copy link
Copy Markdown
Member

What

Adds the first CI workflow: a test matrix across python 3.10, 3.11, 3.12 and 3.13, plus a ruff lint/format job.

This is the CI follow-up asked for in #28, where a 3.12-only PEP 695 syntax change silently broke the advertised 3.10/3.11 support with no CI to catch it.

Notes

nc9 added 6 commits May 22, 2026 11:18
Adds keyword-only options to OEClient/AsyncOEClient for use behind
corporate proxies and TLS-intercepting setups:

- proxy / proxy_auth: route all requests through an HTTP proxy
- ssl_context: supply a pre-built ssl.SSLContext
- ca_cert: add an extra CA bundle to the default trust store
- verify_ssl: disable cert verification (escape hatch)
- trust_env: let aiohttp read proxy/.netrc from the environment

ClientSession construction is centralised in BaseOEClient._build_session()
so proxy and TLS config stay consistent across the sync and async clients
and their per-call sessions.

Closes #22
py312 made UP046 suggest PEP 695 generics, which break the advertised
3.10/3.11 support (see #28).
Copies .env and .envrc into 'claude --worktree' worktrees so an isolated
checkout can run tests and publish without manual setup.
Runs the test suite on python 3.10, 3.11, 3.12 and 3.13, plus a ruff
lint/format job. Catches version-support regressions like the PEP 695
syntax break in #28.

The two live API tests are skipped unless OPENELECTRICITY_API_KEY is
available, so CI is green without a secret; set it as a repo secret to
run them too.
enum.StrEnum is 3.11+, so the package failed to import on 3.10 despite
advertising requires-python >=3.10. Caught by the new CI matrix. Adds a
version-gated shim. Also adds the 3.13 trove classifier now CI covers it.
datetime.UTC is 3.11+, so test_timeseries.py failed to import on 3.10
(caught by the CI matrix). Also applies ruff format to types.py.
@nc9 nc9 changed the base branch from feat/proxy-cert-support to main May 22, 2026 03:20
@nc9 nc9 merged commit deb4c87 into main May 22, 2026
5 checks passed
@nc9 nc9 deleted the ci/python-matrix branch May 22, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant