codex-python 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ on:
7
7
 
8
8
  permissions:
9
9
  contents: read
10
+ id-token: write
10
11
 
11
12
  jobs:
12
13
  build-and-publish:
@@ -28,7 +29,5 @@ jobs:
28
29
  - name: Build distribution
29
30
  run: uv build
30
31
 
31
- - name: Publish to PyPI
32
- env:
33
- PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
34
- run: uv publish --token "$PYPI_API_TOKEN"
32
+ - name: Publish to PyPI (Trusted Publishing)
33
+ run: uv publish --trusted-publishing=always
@@ -43,3 +43,7 @@ coverage.xml
43
43
  # uv
44
44
  .uv/
45
45
  uv.lock
46
+
47
+ # Local environment files
48
+ .env
49
+ .env.*
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
6
6
 
7
+ ## [0.1.1] - 2025-09-10
8
+ ### Added
9
+ - CodexClient synchronous wrapper with defaults
10
+ - Python API `run_exec` with robust error handling
11
+
12
+ ### Changed
13
+ - Switch publish workflow to PyPI Trusted Publishing (OIDC)
14
+ - Docs and Makefile updates
15
+
7
16
  ## [0.1.0] - 2025-09-10
8
17
  ### Added
9
18
  - Initial project scaffold with Python 3.13+
@@ -15,3 +24,4 @@ The format is based on Keep a Changelog and this project adheres to Semantic Ver
15
24
  - MIT License
16
25
 
17
26
  [0.1.0]: https://github.com/gersmann/codex-python/releases/tag/v0.1.0
27
+ [0.1.1]: https://github.com/gersmann/codex-python/releases/tag/v0.1.1
@@ -36,7 +36,7 @@ This project is typed and ships a `py.typed` marker. Please keep public APIs typ
36
36
  2. Update `CHANGELOG.md`.
37
37
  3. Merge to `main`.
38
38
  4. Tag the release: `git tag -a vX.Y.Z -m "vX.Y.Z" && git push --tags`.
39
- 5. GitHub Actions (publish workflow) will build and publish to PyPI on `v*` tags.
39
+ 5. GitHub Actions (publish workflow) will build and publish to PyPI on `v*` tags using Trusted Publishing (OIDC). No token is required.
40
40
 
41
41
  ## Pre-commit (optional but recommended)
42
42
  ```
@@ -51,4 +51,3 @@ Please open an issue with reproduction steps, expected vs actual behavior, and e
51
51
 
52
52
  ## Code of Conduct
53
53
  By participating, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md).
54
-
@@ -0,0 +1,51 @@
1
+ .PHONY: help venv fmt lint test build publish clean
2
+
3
+ help:
4
+ @echo "Common targets:"
5
+ @echo " make lint - Run ruff and mypy"
6
+ @echo " make test - Run pytest"
7
+ @echo " make build - Build sdist and wheel with uv"
8
+ @echo " make publish - Publish to PyPI via uv (uses PYPI_API_TOKEN)"
9
+ @echo " make clean - Remove build artifacts"
10
+
11
+ venv:
12
+ uv venv --python 3.13
13
+ @echo "Run: . .venv/bin/activate"
14
+
15
+ fmt:
16
+ uv run --group dev ruff format .
17
+
18
+ lint:
19
+ uv run --group dev ruff format --check .
20
+ uv run --group dev ruff check .
21
+ uv run --group dev mypy codex
22
+
23
+ test:
24
+ uv run --group dev pytest
25
+
26
+ build:
27
+ uv build
28
+
29
+ publish: build
30
+ @# Load local environment if present
31
+ @set -e; \
32
+ if [ -f .env ]; then set -a; . ./.env; set +a; fi; \
33
+ if [ -n "$${UV_PUBLISH_TOKEN:-}" ]; then \
34
+ echo "Publishing with token (UV_PUBLISH_TOKEN)"; \
35
+ uv publish --token "$${UV_PUBLISH_TOKEN}"; \
36
+ elif [ -n "$${PYPI_API_TOKEN:-}" ]; then \
37
+ echo "Publishing with token (PYPI_API_TOKEN)"; \
38
+ uv publish --token "$${PYPI_API_TOKEN}"; \
39
+ elif [ -n "$${UV_PUBLISH_USERNAME:-}" ] && [ -n "$${UV_PUBLISH_PASSWORD:-}" ]; then \
40
+ echo "Publishing with username/password (UV_PUBLISH_USERNAME)"; \
41
+ uv publish --username "$${UV_PUBLISH_USERNAME}" --password "$${UV_PUBLISH_PASSWORD}"; \
42
+ elif [ -n "$${PYPI_USERNAME:-}" ] && [ -n "$${PYPI_PASSWORD:-}" ]; then \
43
+ echo "Publishing with username/password (PYPI_USERNAME)"; \
44
+ uv publish --username "$${PYPI_USERNAME}" --password "$${PYPI_PASSWORD}"; \
45
+ else \
46
+ echo "No credentials found. Set UV_PUBLISH_TOKEN or PYPI_API_TOKEN, or UV_PUBLISH_USERNAME/UV_PUBLISH_PASSWORD (or PYPI_USERNAME/PYPI_PASSWORD)."; \
47
+ exit 1; \
48
+ fi
49
+
50
+ clean:
51
+ rm -rf build dist *.egg-info .pytest_cache .mypy_cache .ruff_cache
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-python
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A minimal Python library scaffold for codex-python
5
5
  Project-URL: Homepage, https://github.com/gersmann/codex-python
6
6
  Project-URL: Repository, https://github.com/gersmann/codex-python
@@ -113,8 +113,10 @@ export PYPI_API_TOKEN="pypi-XXXX" # create at https://pypi.org/manage/account/t
113
113
  uv publish --token "$PYPI_API_TOKEN"
114
114
  ```
115
115
 
116
- - GitHub Actions: add a repository secret `PYPI_API_TOKEN` and push a tag like `v0.1.0`.
117
- The workflow at `.github/workflows/publish.yml` builds and publishes with `uv` on `v*` tags.
116
+ - GitHub Actions (Trusted Publishing): enable PyPI Trusted Publishing for
117
+ `gersmann/codex-python` and push a tag like `v0.1.0`. No token is needed.
118
+ The workflow at `.github/workflows/publish.yml` requests an OIDC token and
119
+ runs `uv publish --trusted-publishing=always` on `v*` tags.
118
120
 
119
121
  ### Dev tooling
120
122
 
@@ -73,8 +73,10 @@ export PYPI_API_TOKEN="pypi-XXXX" # create at https://pypi.org/manage/account/t
73
73
  uv publish --token "$PYPI_API_TOKEN"
74
74
  ```
75
75
 
76
- - GitHub Actions: add a repository secret `PYPI_API_TOKEN` and push a tag like `v0.1.0`.
77
- The workflow at `.github/workflows/publish.yml` builds and publishes with `uv` on `v*` tags.
76
+ - GitHub Actions (Trusted Publishing): enable PyPI Trusted Publishing for
77
+ `gersmann/codex-python` and push a tag like `v0.1.0`. No token is needed.
78
+ The workflow at `.github/workflows/publish.yml` requests an OIDC token and
79
+ runs `uv publish --trusted-publishing=always` on `v*` tags.
78
80
 
79
81
  ### Dev tooling
80
82
 
@@ -27,4 +27,4 @@ __all__ = [
27
27
  ]
28
28
 
29
29
  # Managed by Hatch via pyproject.toml [tool.hatch.version]
30
- __version__ = "0.1.0"
30
+ __version__ = "0.1.1"
@@ -1,37 +0,0 @@
1
- .PHONY: help venv fmt lint test build publish clean
2
-
3
- help:
4
- @echo "Common targets:"
5
- @echo " make lint - Run ruff and mypy"
6
- @echo " make test - Run pytest"
7
- @echo " make build - Build sdist and wheel with uv"
8
- @echo " make publish - Publish to PyPI via uv (uses PYPI_API_TOKEN)"
9
- @echo " make clean - Remove build artifacts"
10
-
11
- venv:
12
- uv venv --python 3.13
13
- @echo "Run: . .venv/bin/activate"
14
-
15
- fmt:
16
- uv run --group dev ruff format .
17
-
18
- lint:
19
- uv run --group dev ruff format --check .
20
- uv run --group dev ruff check .
21
- uv run --group dev mypy codex
22
-
23
- test:
24
- uv run --group dev pytest
25
-
26
- build:
27
- uv build
28
-
29
- publish: build
30
- @if [ -z "$${PYPI_API_TOKEN}" ]; then \
31
- echo "PYPI_API_TOKEN is not set"; \
32
- exit 1; \
33
- fi
34
- uv publish --token "$$PYPI_API_TOKEN"
35
-
36
- clean:
37
- rm -rf build dist *.egg-info .pytest_cache .mypy_cache .ruff_cache
File without changes
File without changes