Skip to main content

Core business logic and infrastructure for Taskdog

Project description

taskdog-core

Core business logic and infrastructure for Taskdog task management system.

Overview

This package contains the core components shared by both the Taskdog server and UI:

  • Domain Layer: Business entities, domain services, and interfaces
  • Application Layer: Use cases, queries, DTOs, and business logic orchestration
  • Infrastructure Layer: Persistence implementations, external service integrations
  • Controllers: Business logic orchestrators used by presentation layers

Installation

pip install taskdog-core

For development:

pip install -e ".[dev]"

Architecture

Follows Clean Architecture principles:

Domain (entities, services, repositories)
  ↑
Application (use cases, queries, DTOs)
  ↑
Infrastructure (SQLite, file storage)
  ↑
Controllers (orchestration layer)

Key Components

Domain Layer (taskdog_core/domain/):

  • Task - Core entity with status, priority, deadlines, dependencies
  • TaskStatus - PENDING, IN_PROGRESS, COMPLETED, CANCELED
  • TimeTracker - Records actual_start/actual_end timestamps
  • TaskNotFoundException, TaskValidationError - Domain exceptions

Application Layer (taskdog_core/application/):

  • Use Cases: CreateTaskUseCase, StartTaskUseCase, OptimizeScheduleUseCase, etc.
  • Validators: TaskFieldValidatorRegistry with Status and Dependency validators
  • Services: WorkloadAllocator, OptimizationSummaryBuilder, TaskQueryService
  • Optimization: 9 scheduling strategies (greedy, balanced, backward, priority_first, earliest_deadline, round_robin, dependency_aware, genetic, monte_carlo)

Infrastructure Layer (taskdog_core/infrastructure/):

  • SqliteTaskRepository - SQLite persistence with transactional writes
  • SqliteNotesRepository - Database-based notes storage
  • ConfigManager - TOML configuration loading

Controllers (taskdog_core/controllers/):

  • TaskCrudController - Create, update, delete operations
  • TaskLifecycleController - Start, complete, pause, cancel, reopen
  • TaskRelationshipController - Dependencies and tags
  • TaskAnalyticsController - Statistics and optimization
  • QueryController - Read-only operations

Usage Example

from taskdog_core.domain.entities.task import Task, TaskStatus
from taskdog_core.infrastructure.persistence.database.sqlite_task_repository import SqliteTaskRepository
from taskdog_core.controllers.task_crud_controller import TaskCrudController
from taskdog_core.infrastructure.config.config_manager import ConfigManager
# Setup
repository = SqliteTaskRepository("sqlite:///tasks.db")
config = ConfigManager()

# Create controller
crud_controller = TaskCrudController(repository, notes_repository, config)

# Create a task
from taskdog_core.application.dto.task_request import CreateTaskRequest
request = CreateTaskRequest(name="My Task", priority=100)
task = crud_controller.create_task(request)

Dependencies

  • holidays: Holiday checking for scheduling
  • python-dateutil: Date/time utilities
  • sqlalchemy: Database ORM

Related Packages

For detailed architecture documentation, see CLAUDE.md.

Testing

pytest tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taskdog_core-0.18.6.tar.gz (119.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taskdog_core-0.18.6-py3-none-any.whl (199.3 kB view details)

Uploaded Python 3

File details

Details for the file taskdog_core-0.18.6.tar.gz.

File metadata

  • Download URL: taskdog_core-0.18.6.tar.gz
  • Upload date:
  • Size: 119.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for taskdog_core-0.18.6.tar.gz
Algorithm Hash digest
SHA256 010b0141da308721a9665cf70f459e84872ee56e8d026f334cbc5a68ed4ae82b
MD5 0772cdb9f7f304ce2dee0c90a9fdae87
BLAKE2b-256 2f5fad55d01186b6755e0e97c5e2552d04a37f84f4426a5b2b7e8774834edbb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskdog_core-0.18.6.tar.gz:

Publisher: release.yml on Kohei-Wada/taskdog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskdog_core-0.18.6-py3-none-any.whl.

File metadata

  • Download URL: taskdog_core-0.18.6-py3-none-any.whl
  • Upload date:
  • Size: 199.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for taskdog_core-0.18.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6ce2bba0aca04c7dcdb61ebf9a4d4ed6aa79f7d3f8e60056033cd0356f63f6f1
MD5 20d946df7afc95b789f0f05478eeda06
BLAKE2b-256 1a63244bb4cf2c3de7df25d6b425b7b01842472d545e8ff27b092cbaebd1021f

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskdog_core-0.18.6-py3-none-any.whl:

Publisher: release.yml on Kohei-Wada/taskdog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page