Skip to content

Release 0.2.0: refactor, robustness, packaging, CI#18

Merged
mjstealey merged 5 commits into
mainfrom
develop
Apr 25, 2026
Merged

Release 0.2.0: refactor, robustness, packaging, CI#18
mjstealey merged 5 commits into
mainfrom
develop

Conversation

@mjstealey
Copy link
Copy Markdown
Member

Summary

Prepares the 0.2.0 release. Substantial refactor focused on robustness, testability, and packaging modernization. Public API is fully preserved — all method names, signatures, and return types from 0.1.5 are unchanged.

See CHANGELOG.md for the full per-section breakdown.

Highlights since 0.1.5

  • Robustness: configurable HTTP timeout (default 30s), automatic retry with exponential backoff on 429/500/502/503/504, structured logging under the comanage_api logger (no credentials/bodies logged), NullHandler registered.
  • Refactor: mixin architecture — each _*.py module exports a mixin class; ComanageApi inherits from all 9. Eliminates the 60-method passthrough wrapper layer. Centralized HTTP helpers (_get, _post, _put, _delete, _get_by_entity).
  • Bug fixes: cous_edit() parent_id=0 now correctly clears parent vs. keeps existing; ssh_keys_add() no longer sends literal "None" for missing comments; invalid enum values now raise ValueError instead of TypeError.
  • Testing: 138 pytest tests across 10 files using requests-mock, covering all 9 endpoint modules.
  • Packaging: consolidated to pyproject.toml (PEP 621); removed setup.cfg, requirements.txt, MANIFEST.in; min Python bumped to 3.9; uv adopted as the dev package manager.
  • CI: GitHub Actions workflow (ci.yml) runs ruff + pytest matrix (3.9–3.12) on push and PR. New release.yml publishes to PyPI on tag push via Trusted Publishing (OIDC, no API tokens).

Release process after merge

  1. Register the trusted publisher on PyPI (Project → Publishing → repo fabric-testbed/python-comanage-api, workflow release.yml, environment pypi).
  2. Create the pypi GitHub Environment in repo settings.
  3. Tag from main:
    git checkout main && git pull
    git tag -a v0.2.0 -m "Release 0.2.0"
    git push origin v0.2.0
    
  4. The release.yml workflow builds, tests, and publishes to PyPI automatically.

Test plan

  • uv run ruff check . — clean
  • uv run pytest -v — 138 passed
  • uv build — produces sdist + wheel for 0.2.0
  • uvx twine check dist/* — both artifacts PASSED
  • CI passes on this PR (lint + test matrix 3.9–3.12)

🤖 Generated with Claude Code

mjstealey and others added 5 commits April 21, 2026 19:19
- Bump __VERSION__ to 0.2.0 and update version-pinned test
- Add CHANGELOG.md documenting Phase 1-6 changes since 0.1.5
- Add .github/workflows/release.yml for PyPI Trusted Publishing on tag push
- Remove legacy setup.cfg, requirements.txt, MANIFEST.in (superseded by pyproject.toml)
- Add CLAUDE.md project guidance
- Ignore development_plan.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mjstealey mjstealey merged commit 6bdcdef into main Apr 25, 2026
14 checks passed
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