Add version tracking via pyproject.toml
- Add pyproject.toml with project metadata and version 1.0.0 - Update config.py to load version from pyproject.toml - Update Dockerfile to include pyproject.toml in build - Add CHANGELOG.md documenting initial release - Update build workflow registry to internal domain 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ jobs:
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.schweitz.net
|
||||
registry: git.schweitz.internal
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
@@ -23,5 +23,5 @@ jobs:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
git.schweitz.net/jpmschweitzer/core-api:latest
|
||||
git.schweitz.net/jpmschweitzer/core-api:${{ github.ref_name }}
|
||||
git.schweitz.internal/jpmschweitzer/core-api:latest
|
||||
git.schweitz.internal/jpmschweitzer/core-api:${{ github.ref_name }}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.0.0] - 2024-12-14
|
||||
|
||||
### Added
|
||||
|
||||
- Initial release of Core Code API service extracted from portainer-core
|
||||
- Infrastructure management endpoints for Portainer, NPM, and Uptime Kuma
|
||||
- Web scraping service with content extraction
|
||||
- DNS management endpoints
|
||||
- Health check endpoints with diagnostics
|
||||
- OIDC authentication support via Authentik
|
||||
- Ollama integration for embeddings
|
||||
- OpenAPI documentation (Swagger UI and ReDoc)
|
||||
- Docker containerization with CI/CD workflow
|
||||
@@ -12,6 +12,7 @@ COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application
|
||||
COPY pyproject.toml .
|
||||
COPY src/ ./src/
|
||||
COPY static/ ./static/
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[project]
|
||||
name = "core-api"
|
||||
version = "1.0.0"
|
||||
description = "Core Code API - Infrastructure management and tools API"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
license = {text = "MIT"}
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["src"]
|
||||
+17
-1
@@ -1,9 +1,25 @@
|
||||
"""
|
||||
Global configuration for Core Code API
|
||||
"""
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
def _get_version_from_pyproject() -> str:
|
||||
"""Load version from pyproject.toml"""
|
||||
pyproject_path = Path(__file__).parent.parent / "pyproject.toml"
|
||||
try:
|
||||
with open(pyproject_path, "rb") as f:
|
||||
data = tomllib.load(f)
|
||||
return data.get("project", {}).get("version", "0.0.0")
|
||||
except FileNotFoundError:
|
||||
return "0.0.0"
|
||||
|
||||
|
||||
__version__ = _get_version_from_pyproject()
|
||||
|
||||
# Import infrastructure credentials from gitignored module
|
||||
try:
|
||||
from src.credentials import (
|
||||
@@ -35,7 +51,7 @@ class Settings(BaseSettings):
|
||||
|
||||
# Application
|
||||
app_name: str = "Core Code API"
|
||||
app_version: str = "1.0.0"
|
||||
app_version: str = __version__
|
||||
debug: bool = False
|
||||
|
||||
# Server
|
||||
|
||||
Reference in New Issue
Block a user