Skip to content

Centralize Apprise API version for runtime and package metadata - #376

Merged
caronc merged 2 commits into
caronc:masterfrom
brokentokin:fix/single-source-api-version
Oct 24, 2026
Merged

caronc merged 2 commits into
caronc:masterfrom
brokentokin:fix/single-source-api-version

Conversation

@brokentokin

@brokentokin brokentokin commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Apprise API v2.0.1 declared version 2.0.1 in Python project metadata while its UI still reported 2.0.0. The immediate label is already corrected on master, but separate API version literals can drift again.

Define Apprise API's own version once in a dependency-free core/version.py module and use it for Django settings, setuptools metadata, and the TerraMaster builder's default version. Existing UI labels, API asset cache keys, and webhook user agents continue to follow the Django setting. Document the new release-version location and add three regression tests.

The Apprise library remains independently versioned: its dependency requirements and separately displayed installed version are unchanged. The module also supports Docker and native source deployments that rename the application directory to webapp/ without installing the API distribution. TerraMaster's explicit --version override remains supported.

Packaging note: the API distribution now uses setuptools dynamic version metadata. External tooling that parses a literal [project].version must adapt; the known in-repository consumer, TerraMaster's builder, is updated here.

Checklist

  • Documentation ticket created, if applicable: none opened; contribution and TerraMaster instructions are updated in this PR.
  • The change is tested and works locally.
  • No commented-out code in this PR.
  • No lint errors (tox -e lint).
  • Test coverage added or updated (tox -e test).

Testing

Validated on Linux:

  • Python 3.14.8: tox -e lint,test passed with 816 passed, 9 skipped, 319 subtests passed. Lint includes Ruff, Python formatting, Django template checks, and OpenAPI validation.
  • Isolated sdist and wheel builds report API version 2.0.1 and include the version module.
  • Python 3.12.3: a renamed webapp/ source deployment with runtime dependencies but no installed apprise-api distribution returned HTTP 200 and rendered the expected API footer and asset version.
  • TerraMaster package generation and explicit version override passed.
  • A temporary export with only the API version changed to synthetic 9.9.9 built and served successfully while retaining the Apprise 2.0.1 dependency and reporting the installed library version separately. This also passed with setuptools 77.0.3.

A Docker image was not built or started; source-layout compatibility was checked with the renamed-source smoke test. No running homelab service was changed for this contribution.

To reproduce:

git clone -b fix/single-source-api-version https://github.com/brokentokin/apprise-api.git
cd apprise-api
tox -e lint,test
python -m pip install build
python -m build
tox -e runserver

Requires Python 3.14 and tox. Open http://localhost:8000/ and confirm the API footer reports 2.0.1 and the library version is displayed separately.

@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f24db3f) to head (d6be17e).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #376   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        27    +1     
  Lines         3848      3900   +52     
  Branches       676       684    +8     
=========================================
+ Hits          3848      3900   +52     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@caronc
caronc merged commit 8ab878d into caronc:master Oct 24, 2026
4 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