Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8713576
Add test infrastructure and GitHub Actions workflow
inntran Nov 6, 2025
89ebee6
Fix formatting issue with black
inntran Nov 6, 2025
9eb20d6
Reorder import statements for consistency in test files
inntran Nov 6, 2025
4552437
Add source code to make tests pass
inntran Nov 6, 2025
cb28e7d
Add CertificatesResource and corresponding tests for managing share c…
inntran Nov 6, 2025
0c1b0b9
Add distributionresource and tests
inntran Nov 6, 2025
9a74a7d
Add account historyresource and tests
inntran Nov 6, 2025
0be23cb
Add partnerresource and tests
inntran Nov 6, 2025
3c4f78e
Refactor resource imports and initialization in The Mortgage Office A…
inntran Nov 6, 2025
6f3ba27
Add types-requests to dev dependencies
inntran Nov 6, 2025
5c8acb5
Add Pool data models with comprehensive test coverage
inntran Nov 6, 2025
34c734b
Add test coverage for Pool.SysTimeStamp date parsing
inntran Nov 6, 2025
0b193b2
Refactor class names to use TMO prefix for brevity
inntran Nov 6, 2025
0784e4e
Break too long lines into shorter ones
inntran Nov 6, 2025
f4594cb
Add comprehensive documentation with mkdocs-material and GitHub Pages…
inntran Nov 6, 2025
598a453
Add GitHub Actions workflow for publishing to TestPyPI and PyPI
inntran Nov 6, 2025
1a439e9
Add step to set default alias for missing documentation in develop br…
inntran Nov 6, 2025
00c7097
Add version information module and update imports in client tests
inntran Nov 7, 2025
167d3cc
Update TMOClient to accept custom User-Agent
inntran Nov 7, 2025
04f9556
Add TMO API tooling and recent TMO API specs
inntran Nov 7, 2025
dd5efc1
Increase raw body length limit in request display to 5000 characters
inntran Nov 7, 2025
15410e6
Docs workflow runs only when triggered by others.
inntran Nov 7, 2025
e1adc79
Fix Codecov upload condition and correct file parameter in CI workflow
inntran Nov 7, 2025
d977b57
Set package-ecosystem to 'pip' in dependabot config
inntran Nov 7, 2025
09e25cb
Potential fix for code scanning alert no. 2: Workflow does not contai…
inntran Nov 7, 2025
b1e42fb
Potential fix for code scanning alert no. 1: Workflow does not contai…
inntran Nov 7, 2025
4d26fcf
remove explict credentials for pypi
inntran Nov 8, 2025
ad980ec
Create shared base for TMO CLI tools
inntran Nov 8, 2025
27fdf41
Fix mypy typing issue, add CLI config tests
inntran Nov 8, 2025
490d4f1
Complete TMO Mortgage Pool Shares operations
inntran Nov 8, 2025
d63c5e4
Fix issues found by mypy
inntran Nov 9, 2025
7b3b4ce
Updated changed names in tests.
inntran Nov 9, 2025
874d4c1
Improve code coverage ratio.
inntran Nov 9, 2025
36e4e63
Add VScode Python pytest settings
inntran Nov 10, 2025
be2c153
feat: Add bumpversion configuration and release process documentation
inntran Nov 11, 2025
61f9add
Bump version: 0.0.1 → 0.1.0
inntran Nov 11, 2025
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
37 changes: 37 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[tool.bumpversion]
current_version = "0.1.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = ""

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""

[[tool.bumpversion.files]]
filename = "src/tmo_api/_version.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""

[[tool.bumpversion.files]]
filename = "docs/changelog.md"
search = "## [Unreleased]"
replace = "## [Unreleased]\n\n## [{new_version}] - {now:%Y-%m-%d}"

[[tool.bumpversion.files]]
filename = "docs/changelog.md"
search = "[{current_version}]: https://github.com/inntran/tmo-api-python/releases/tag/v{current_version}"
replace = "[{new_version}]: https://github.com/inntran/tmo-api-python/releases/tag/v{new_version}\n[{current_version}]: https://github.com/inntran/tmo-api-python/releases/tag/v{current_version}"
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
assets/postman_collection/tmo_api_collection_*.json binary
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
91 changes: 91 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Deploy Documentation

on:
workflow_run:
workflows:
- Tests
types:
- completed
workflow_dispatch:

permissions:
contents: write

jobs:
deploy:
if: >
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
(
github.event.workflow_run.head_branch == 'main' ||
github.event.workflow_run.head_branch == 'staging' ||
github.event.workflow_run.head_branch == 'develop' ||
github.event.workflow_run.head_branch == '' ||
github.event.workflow_run.head_branch == null
)
)
runs-on: ubuntu-latest
env:
TARGET_BRANCH: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_branch || github.ref_name }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for mike versioning

- name: Detect tag (workflow_run)
id: tag
if: env.TARGET_BRANCH == ''
run: |
TAG=$(git describe --tags --exact-match 2>/dev/null || true)
echo "value=$TAG" >> "$GITHUB_OUTPUT"

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[docs]"

- name: Deploy documentation (main branch)
if: env.TARGET_BRANCH == 'main'
run: |
mike deploy --push --update-aliases latest stable
mike set-default --push latest

- name: Deploy documentation (staging branch)
if: env.TARGET_BRANCH == 'staging'
run: |
mike deploy --push staging

- name: Deploy documentation (develop branch)
if: env.TARGET_BRANCH == 'develop'
run: |
mike deploy --push dev

- name: Set default alias when missing (develop)
if: env.TARGET_BRANCH == 'develop'
run: |
DEFAULT_ALIAS=$(mike list --remote 2>/dev/null | awk '/^\*/ {print $2}')
if [ -z "$DEFAULT_ALIAS" ]; then
mike set-default --push dev
fi

- name: Deploy documentation (version tag)
if: steps.tag.outputs.value != ''
run: |
VERSION=${{ steps.tag.outputs.value }}
VERSION=${VERSION#v}
mike deploy --push --update-aliases $VERSION stable
mike set-default --push $VERSION
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish
permissions:
contents: read
id-token: write

on:
push:
branches:
- main
- staging
workflow_dispatch:

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"

- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build

- name: Build distributions
run: |
rm -rf dist
python -m build

- name: Publish to TestPyPI
if: github.ref == 'refs/heads/staging'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish to PyPI
if: github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1

66 changes: 66 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Tests

on:
push:
branches: [ main, develop, staging ]
tags:
- 'v*'
pull_request:
branches: [ main, develop ]

permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.14", "3.12", "3.13", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 src/tmo_api --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 src/tmo_api --count --exit-zero --max-line-length=88 --extend-ignore=E203,W503 --statistics

- name: Check formatting with black
run: |
black --check src/tmo_api tests/

- name: Check import sorting with isort
run: |
isort --check-only src/tmo_api tests/

- name: Type check with mypy
run: |
mypy src/tmo_api --ignore-missing-imports
continue-on-error: true

- name: Run tests with pytest
run: |
pytest tests/ -v --cov=tmo_api --cov-report=xml --cov-report=term

- name: Upload coverage to Codecov
if: matrix.python-version == '3.13'
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.xml
fail_ci_if_error: false
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
Loading
Loading