Skip to content

feat: Expose configurable version & health check API for Django integration #143

@ywatanabe1989

Description

@ywatanabe1989

Summary

Expose version checking and health status APIs from scitex package for reuse in Django (scitex-cloud) and other integrations. Single source of truth for ecosystem health monitoring.

Motivation

  • scitex-cloud currently duplicates version checking logic
  • Dashboard already has version checking in scitex._dev._versions
  • Docker container health checks needed for dev/staging/prod monitoring
  • Should be configurable for different deployment environments

Proposed API

1. Version Checking (already exists, needs public exposure)

from scitex.dev import get_ecosystem_versions

# Returns dict with installed versions for configured packages
versions = get_ecosystem_versions()
# {"scitex": "2.17.5", "figrecipe": "0.21.0", ...}

2. Docker Health Checker (new)

from scitex.dev import check_docker_health

# Check versions in Docker containers via HTTP endpoints
health = check_docker_health(endpoints={
    "dev": "http://127.0.0.1:8000/api/versions/",
    "staging": "http://staging.scitex.ai/api/versions/",
    "prod": "https://scitex.ai/api/versions/",
})

3. Configuration File Support

# ~/.scitex/health.yaml or pyproject.toml [tool.scitex.health]
ecosystem_packages:
  - scitex
  - figrecipe
  - crossref-local
  - openalex-local
  - scitex-writer
  - socialia

docker_endpoints:
  dev: http://127.0.0.1:8000/api/versions/
  staging: http://staging.scitex.ai/api/versions/
  prod: https://scitex.ai/api/versions/

Dashboard Integration

  • Add DOCKER columns: dev | staging | prod
  • Fetch from configured endpoints
  • Show version alignment across all environments

Priority

Medium - Useful for deployment monitoring but not blocking

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions