Skip to content

Releases: SyntaxArc/ArchiPy

4.3.4

24 Feb 12:47

Choose a tag to compare

Fixed

Models - Errors

  • BaseError __str__ Enhancement - Improved string representation to expose full error context
    • __str__ now returns a structured, human-readable string including class name, code, message, http_status, grpc_status, and additional_data
    • Previous output was a minimal [code] message format, making debugging difficult
    • New format: ClassName(code='...', message='...', http_status=..., grpc_status=..., additional_data=...)
    • Consistent with __repr__ behaviour — no information is hidden in logs or tracebacks

Changed

Dependencies

  • FastAPI bumped from >=0.131.0 to >=0.133.0
  • boto3 (minio extra) bumped from >=1.42.54 to >=1.42.55
  • mkdocs-material (docs group) bumped from >=9.7.2 to >=9.7.3

Internal

Developer Tooling

  • Cursor Rules Restructured - Replaced monolithic checks.mdc and CLAUDE.md with focused, single-responsibility rule files
    • Added python-code-style.mdc — string quoting, docstrings, line length, type hints, imports, error handling, complexity
    • Added architecture-patterns.mdc — Clean Architecture layer map, import direction, lazy import policy
    • Added typing-strict.mdc — strict type annotation conventions
    • Added testing-bdd.mdc — BDD/Behave test conventions
    • Added tooling-workflow.mdcuv, Make targets, pre-commit hooks, docs, version bumping
    • Added adapter-conventions.mdc — ports & adapters pattern, mock requirements, naming rules

Full Changelog: 4.3.3...4.3.4

4.3.1

22 Feb 14:20

Choose a tag to compare

Changed

Adapters - MinIO

  • Boto3 Migration - Migrated MinIO adapter from minio library to boto3
    • Replaced minio library with boto3 for S3-compatible object storage operations
    • Added new configuration fields to MinioConfig:
      • ADDRESSING_STYLE: S3 addressing style (auto, path, or virtual) - critical for CDN compatibility
      • SIGNATURE_VERSION: AWS signature version (default: s3v4)
      • CONNECT_TIMEOUT: Connection timeout in seconds (default: 60)
      • READ_TIMEOUT: Read timeout in seconds (default: 60)
      • MAX_POOL_CONNECTIONS: Maximum connections in the pool (default: 10)
      • RETRIES_MAX_ATTEMPTS: Maximum retry attempts for failed requests (default: 3)
      • RETRIES_MODE: Retry strategy - legacy, standard, or adaptive (default: standard)
      • USE_SSL: Explicit SSL usage control (overrides SECURE if set)
      • VERIFY_SSL: SSL certificate verification (default: true)
    • Improved presigned URL generation with better control over addressing styles
    • Enhanced exception handling using structured boto3 error codes instead of string parsing
    • All existing functionality preserved with zero breaking changes to the MinioPort interface
    • Resolves CDN and presigned URL compatibility issues
    • Custom MinIO test container implementation eliminates minio library dependency entirely

Full Changelog: 4.3.0...4.3.1

4.3.0

22 Feb 07:35

Choose a tag to compare

Added

Helpers - Utils

  • Prometheus Utilities - Added shared Prometheus server management module
    • Implemented prometheus_utils module with is_prometheus_server_running() helper
    • Added start_prometheus_server_if_needed() helper for automatic Prometheus server lifecycle management
    • Prevents duplicate Prometheus server starts across FastAPI, gRPC, and Temporal adapters
    • Supports port availability checking before starting Prometheus HTTP server

Adapters - Temporal

  • Prometheus Metrics Integration - Added Temporal metrics collection with Prometheus
    • Implemented TemporalRuntimeManager singleton for managing Runtime instances with telemetry
    • Integrated Runtime with PrometheusConfig into TemporalAdapter client and Worker
    • Added ENABLE_METRICS and METRICS_PORT configuration options to TemporalConfig
    • Temporal SDK metrics now exported to Prometheus when metrics are enabled
    • Metrics include workflow operations, activity executions, and task queue operations
    • Added BDD tests for Temporal metrics collection scenarios (temporal_metric_interceptor.feature)

Changed

Configs

  • Prometheus Configuration - Enhanced BaseConfig with Prometheus support
    • Added PROMETHEUS.IS_ENABLED flag for enabling/disabling Prometheus metrics globally
    • Added PROMETHEUS.SERVER_PORT configuration for Prometheus HTTP server port
    • Updated .env.test with Prometheus configuration for testing
    • Added Temporal metrics configuration (TEMPORAL.ENABLE_METRICS, TEMPORAL.METRICS_PORT)

Fixed

Adapters - Redis

  • Type Safety - Fixed Redis adapter type handling
    • Added type check for unexpected awaitable results from sync Redis client in spop() method
    • Prevents async/sync mismatch errors in Redis operations

Full Changelog: 4.2.0...4.3.0

4.1.0

09 Feb 11:57

Choose a tag to compare

Added

Adapters - Keycloak

  • Organization Management - Implemented comprehensive organization management functionality

    • Added create_organization() method for creating new organizations
    • Added update_organization() method for updating existing organizations
    • Added delete_organization() method for removing organizations
    • Added add_organization_member() method for adding members to organizations
    • Added remove_organization_member() method for removing members from organizations
    • Added get_organization_members() method for retrieving organization member lists
    • Implemented both sync (KeycloakAdapter) and async (AsyncKeycloakAdapter) versions
    • Enhanced feature tests to cover all organization operations
  • Realm Configuration - Added realm update functionality

    • Implemented update_realm() method to enable organization support
    • Added configuration options for organization features in realms
    • Updated test containers to support organization feature in Keycloak

Tests

  • StarRocks TestContainer - Added TestContainer support for StarRocks database

    • Integrated StarRocks container for integration testing
    • Enhanced test coverage for StarRocks adapter functionality
  • Atomic Transaction Tests - Expanded test coverage for atomic decorators

    • Added PostgreSQL support for atomic transaction tests
    • Added SQLite support for atomic transaction tests
    • Improved test reliability across different database backends

Changed

Development Tools

  • Formatter Migration - Replaced Black with Ruff formatter
    • Migrated from Black to Ruff formatter for code formatting
    • Applied Ruff formatting fixes across entire codebase
    • Updated CI/CD workflows to use Ruff formatter
    • Maintained 120 character line length standard

CI/CD

  • Workflow Improvements - Enhanced GitHub Actions workflows
    • Separated Ruff and Ty linting into dedicated workflows
    • Refactored Ty workflow for better performance
    • Bumped actions/cache from version 4 to 5
    • Improved workflow reliability and execution speed

Fixed

Configuration

  • Type Safety - Resolved type checker errors
    • Fixed type errors in base_config.py
    • Fixed type errors in keycloak_utils.py
    • Improved type hint accuracy across configuration modules

Documentation

  • Module References - Fixed documentation issues
    • Removed reference to non-existent error_message_types module
    • Updated documentation to reflect current module structure

Chore

Dependencies

  • Python Version - Updated to Python 3.14

    • Added .python-version file with Python 3.14
    • Updated all Python version references to 3.14
    • Ensured compatibility with Python 3.14 features
  • Core Dependencies - Updated multiple dependencies to latest versions

    • Updated cachetools from >=6.2.6 to >=7.0.0 (cache, keycloak, minio, scylladb extras)
    • Updated elasticsearch from >=9.2.1 to >=9.3.0 (elasticsearch and elasticsearch-async extras)
    • Updated fastapi from >=0.128.0 to >=0.128.5 (fastapi extra)
    • Updated grpcio from >=1.76.0 to >=1.78.0 (grpc extra)
    • Updated grpcio-health-checking from >=1.76.0 to >=1.78.0 (grpc extra)
    • Updated sentry-sdk from >=2.51.0 to >=2.52.0 (sentry extra)
    • Updated temporalio from >=1.21.1 to >=1.22.0 (temporalio extra)
    • Updated testcontainers from >=4.14.0 to >=4.14.1 (testcontainers extra)
  • Development Dependencies - Updated development tools

    • Updated ty from >=0.0.14 to >=0.0.15 (type checker)
    • Updated ruff from >=0.14.14 to >=0.15.0 (linter and formatter)
    • Updated validate-pyproject from >=0.24.1 to >=0.25
  • Documentation Dependencies - Updated documentation tools

    • Updated mkdocstrings from >=1.0.2 to >=1.0.3
  • Test Environment - Updated test configuration

    • Updated Elasticsearch test image from 9.2.1 to 9.3.0 in .env.test

New Contributors

Full Changelog: 4.0.4...4.1.0

4.0.4

31 Jan 08:37

Choose a tag to compare

Changed

Helpers - Decorators

  • Enhanced Exception Handling - Improved exception handling in SQLAlchemy atomic decorators
    • Changed exception handling from Exception to BaseException for comprehensive error catching
    • Updated _handle_db_exception() function signature to accept BaseException instead of Exception
    • Enhanced error handling in both sync and async atomic decorator implementations
    • Ensures all exceptions (including system exceptions) are properly caught and handled

Models - Types

  • Enum Value Standardization - Standardized all enum values to uppercase format for consistency
    • SortOrderType: Changed ASCENDING and DESCENDING from lowercase to uppercase
    • FilterOperationType: Changed all 15 operation types to uppercase (EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, GREATER_THAN, GREATER_THAN_OR_EQUAL, IN_LIST, NOT_IN_LIST, LIKE, ILIKE, STARTS_WITH, ENDS_WITH, CONTAINS, IS_NULL, IS_NOT_NULL)
    • EmailAttachmentDispositionType: Changed ATTACHMENT and INLINE from lowercase to uppercase
    • TimeIntervalUnitType: Changed all 7 unit types to uppercase (SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEAR)
    • Improved consistency with other enum patterns in the codebase
    • Enhanced code readability and standardization across all type definitions

Fixed

Adapters - StarRocks

  • Docstring Formatting - Fixed docstring formatting in StarRocks session manager
    • Corrected docstring formatting in get_connection_args() method
    • Improved code documentation consistency

Chore

Dependencies

  • Comprehensive Dependency Updates - Updated multiple dependencies to latest versions
    • Updated cachetools from >=6.2.4 to >=6.2.6 (cache, keycloak, minio, scylladb extras)
    • Updated cryptography from 46.0.3 to 46.0.4 for enhanced security
    • Updated protobuf from >=6.33.4 to >=6.33.5 (grpc extra)
    • Updated pyjwt from >=2.10.1 to >=2.11.0 (jwt extra)
    • Updated python-keycloak from >=7.0.2 to >=7.0.3 (keycloak extra)
    • Updated python-multipart from 0.0.21 to 0.0.22
    • Updated rich from 14.3.0 to 14.3.1
    • Updated rich-toolkit from 0.17.1 to 0.17.2
    • Updated sentry-sdk from >=2.50.0 to >=2.51.0 (sentry extra)
    • Updated ty from >=0.0.13 to >=0.0.14 (dev dependency)
    • Updated mkdocstrings from >=1.0.1 to >=1.0.2 (docs dependency)
    • Updated pathspec from 1.0.3 to 1.0.4
    • Updated orjson from 3.11.5 to 3.11.6

Full Changelog: 4.0.3...4.0.4

4.0.3

24 Jan 15:14

Choose a tag to compare

Added

Tests

  • Add PostgreSQL and SQLite support for atomic transaction tests
  • Add Starrocks TestContainer support

Changed

  • Replace Black with Ruff formatter

Fixed

Configs

  • Resolve type errors in base_config and keycloak_utils

  • Remove reference to non-existent error_message_types module

Chore

Configs

  • Configure Ruff to respect pyproject.toml in CI lint workflow

  • Apply Ruff formatting fixes

  • Merge branch 'master' of github.com:SyntaxArc/ArchiPy

  • Merge pull request #102 from SyntaxArc/dependabot/github_actions/actions/cache-5

  • Update dependencies

CI

  • Bump actions/cache from 4 to 5
  • Refactor ty workflow
  • Separate ruff and ty linting into dedicated workflows

Full Changelog: 4.0.2...4.0.3

testing async capture span

13 Dec 17:55
d9c122f

Choose a tag to compare

What's Changed

Full Changelog: 3.15.3...3.16.0-beta

4.0.2

11 Dec 09:05

Choose a tag to compare

Changed

Development Tools

  • Broadened Ruff configuration (additional ignores, per-file overrides, relaxed limits) and expanded type-checking/lint sections for optional dependency handling (lazy imports, optional extras).
  • Raised Pylint branch/statement limits to accommodate complex decorator and interceptor flows; added explicit flake8 config blocks for comprehensions, errmsg, type-checking, and unused-arguments.

Adapters

  • SQLAlchemy base adapters: tightened filtering/exception handling helpers and optional dependency guards in session managers.
  • Email/Kafka/ScyllaDB/Temporal adapters: improved lazy import behavior, tracing hooks, and error handling consistency to match optional extras.

Helpers

  • Decorators (cache/retry/timing/tracing/sqlalchemy_atomic): clarified lazy-import paths, kept TYPE_CHECKING stubs, and aligned getattr caching.
  • gRPC interceptors (trace/metric, client/server): better Sentry span management, traceparent propagation, and guard rails when APM extras are disabled.
  • Utility helpers (app/error/file/keycloak): safer optional imports for HTTP/gRPC/Keycloak, clearer exception logging, and minor robustness fixes.

Testing

  • BDD updates for cache decorator (TTL, clearing, bound method identity), Elastic adapter, Keycloak adapter, ScyllaDB adapter, and error utils to match revised behaviors and lazy-import handling.

Dependencies

  • Optional Dependencies
    • Updated starrocks extra from >=1.3.1 to >=1.3.2 (includes starrocks-async)

Full Changelog: 4.0.1...4.0.2

4.0.1

10 Dec 12:49

Choose a tag to compare

Added

Helpers - Decorators

  • Comprehensive Cache Decorator BDD Tests - Added extensive BDD test suite for cache decorators
    • Test scenarios for function caching with TTL expiration
    • Test scenarios for async function caching
    • Test scenarios for method caching (both sync and async)
    • Test scenarios for bound method caching with instance isolation
    • Test scenarios for cache key generation with different argument types
    • Test scenarios for cache invalidation and clearing
    • Test scenarios for cache statistics and monitoring
    • Test scenarios for error handling and edge cases

Fixed

Helpers - Decorators

  • Bound Method Caching - Fixed cache decorator to properly handle bound methods

    • Fixed cache key generation for bound methods to include instance identity
    • Ensures each instance has its own cache namespace
    • Prevents cache collisions between different instances of the same class
    • Improved cache statistics tracking for bound methods
  • Type Checker Errors - Resolved all Ty type checker errors (22 fixes)

    • Refactored decorators with ParamSpec for proper type preservation
    • Implemented descriptor protocol for cache decorator
    • Updated port interfaces with correct type annotations
    • Added TYPE_CHECKING imports for better type checking
    • No cast() usage - all types properly inferred

Changed

Development Tools

  • Type Checker Migration - Migrated from MyPy to Ty type checker
    • Replaced MyPy with Ty for Python 3.14 type checking
    • Updated all type hints to use Python 3.14 syntax (| for unions, lowercase built-ins)
    • Updated Makefile to use ty check instead of mypy
    • Changed cache directory from .mypy_cache/ to .ty_cache/
    • Updated pre-commit hooks to use Ty
    • Updated documentation and contributing guides

Dependencies

  • Optional Dependencies

    • Updated fastapi from >=0.124.0 to >=0.124.2
    • Updated sqlalchemy from >=2.0.44 to >=2.0.45
  • Development Dependencies

    • Removed mypy>=1.19.0
    • Added ty (Ty type checker)
    • Updated types-protobuf from >=6.32.1.20251105 to >=6.32.1.20251210

Full Changelog: 4.0.0...4.0.1

4.0.0

08 Dec 12:05

Choose a tag to compare

Changed

Models - Errors

  • Error System Migration to T-Strings - Refactored error system to use t-string template formatting with inline context variables
    • Removed ErrorDetailDTO and ErrorMessageType dependencies
    • Added class attributes (code, message_en, message_fa, http_status, grpc_status) to BaseError
    • Implemented t-string template formatting with context variables in error messages
    • Override get_message() in error classes with explicit variable passing
    • Applied Persian number conversion for FA language messages
    • Removed deprecated http_status_code_value and grpc_status_code_value properties
    • Removed _get_grpc_status_code method, use _convert_int_to_grpc_status directly
    • Updated all error classes (validation, auth, resource, database, business, network, system, keycloak, temporal)
    • Updated FastAPI integration, adapters, and utilities
    • Fixed MyPy type errors in BaseError.to_dict() and gRPC metadata handling

Tests

  • Comprehensive Error Handling Tests - Added comprehensive error handling tests for FastAPI and gRPC
    • Added BDD test scenarios for FastAPI error handling (fastapi_error_handling.feature)
    • Added BDD test scenarios for gRPC error handling (grpc_error_handling.feature)
    • Implemented test step definitions for error handling scenarios
    • Added test servers and utilities for FastAPI and gRPC error testing
    • Renamed "exception" to "error" in behave test files and features for consistency

Chore

  • Python Version References - Updated all Python version references to 3.14
    • Updated documentation and configuration files to reflect Python 3.14 requirement
    • Aligned version references across the codebase

Full Changelog: 3.15.3...4.0.0