Skip to content

Conversation

@inntran
Copy link
Owner

@inntran inntran commented Nov 11, 2025

No description provided.

inntran and others added 30 commits November 10, 2025 22:03
This commit adds comprehensive test suite and CI/CD setup:

- Add GitHub Actions workflow for automated testing
  - Tests on Python 3.9-3.13 (ordered by real-world likelihood)
  - Includes linting (flake8), formatting (black), import sorting (isort), and type checking (mypy)
  - Uploads coverage to Codecov

- Add comprehensive test suite covering:
  - Client initialization and HTTP methods
  - Error handling (auth, network, API errors)
  - Environment configurations
  - Custom exception classes
  - Data models (BaseModel, BaseResponse)
  - Pools resource operations

- Update pyproject.toml:
  - Switch to Hatchling build backend
  - Add requests dependency
  - Add dev dependencies (pytest, black, flake8, isort, mypy)
  - Configure tool settings for linting and testing
  - Fix TOML syntax for project URLs

Tests are expected to fail until source code is added.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit adds the core SDK implementation:

- Add client.py: Main API client with HTTP methods and error handling
- Add environments.py: Environment enum for US, Canada, Australia
- Add exceptions.py: Custom exception classes
- Add models: BaseModel and BaseResponse for data handling
- Add resources/pools.py: PoolsResource for managing mortgage pools
- Update __init__.py: Export main classes and set version

All 51 tests now pass with 84% code coverage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add types-requests package to dev dependencies to fix mypy type checking
in GitHub Actions workflow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add OtherAsset model with DateLastEvaluated date parsing
- Add OtherLiability model with MaturityDate and PaymentNextDue parsing
- Add Pool model with nested objects and multiple date field support
- Add PoolResponse wrapper for single pool API responses
- Add PoolsResponse wrapper handling both list and single pool responses
- Update PoolsResource to return typed Pool objects instead of dicts
- Add 14 comprehensive tests covering all Pool model classes
- Fix PoolsResponse to handle empty dict edge case correctly
- All 111 tests passing with 91% code coverage maintained

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add SysTimeStamp field to test_pool_initialization test data
- Add assertions to verify SysTimeStamp is parsed correctly
- Improves code coverage from 91% to 92%
- Fixes codecov missing line 44 in pool.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Renamed Classes:
- TheMortgageOfficeClient → TMOClient
- TheMortgageOfficeError → TMOException

Changes:
- Updated client class name in src/tmo_api/client.py
- Updated exception base class in src/tmo_api/exceptions.py
- Updated all imports in src/tmo_api/__init__.py
- Updated all TYPE_CHECKING imports in resources
- Updated all test files to use new names
- All 111 tests passing with 92% coverage

Benefits:
- Shorter, more convenient class names
- Follows common SDK naming conventions (AWS, Stripe, etc.)
- Maintains full functionality and API compatibility
- TMO clearly identifies the SDK while being concise

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
… deployment

Documentation Structure:
- Getting Started: Installation, Quick Start, Authentication
- User Guide: Client, Pools, Partners, Distributions, Certificates, History
- API Reference: Client, Models, Resources, Exceptions
- Contributing: Development Setup, Testing, Code Style
- Changelog

Features:
- mkdocs-material theme with dark/light mode
- mike for multi-version documentation
- GitHub Actions workflow for automatic deployment
- Deploys to GitHub Pages on push to main/staging/develop
- Version tagging support (v*)
- Comprehensive code examples matching actual API
- Search functionality and navigation tabs

Dependencies Added:
- mkdocs>=1.6.0
- mkdocs-material>=9.6.0
- mike>=2.1.0

Deployment:
- main branch → latest + stable aliases
- staging branch → staging version
- develop branch → dev version
- version tags → versioned deployment
- Auto-deploys to https://inntran.github.io/tmo-api-python/

API Documentation:
- Uses TMOClient and TMOException naming
- Documents actual token/database parameters
- Shows shares_pools/capital_pools structure
- Includes all resource types and methods

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Use tmorc as profile config.
Handle common input/output scenarios.
@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 90.83969% with 72 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/tmo_api/cli/__init__.py 78.97% 37 Missing ⚠️
src/tmo_api/client.py 74.28% 27 Missing ⚠️
src/tmo_api/resources/pools.py 84.61% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

@inntran inntran merged commit 483d510 into main Nov 11, 2025
17 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.

2 participants