Skip to main content

A simple task management package

Project description

Supertask

A simple, lightweight Python package for managing tasks with support for prioritization, reminders, and rewards. Supertask provides a clean API for organizing your tasks, reminding you of upcoming deadlines, and rewarding your accomplishments.

Features

  • Task Management: Add, update, and remove tasks with customizable time and value parameters
  • Task Listing: List tasks with various sorting options (upcoming, by priority, etc.)
  • Task Completion: Mark tasks as completed and track your progress
  • Reminder System: Get email reminders for upcoming tasks to stay on track
  • Reward System: Receive motivational rewards when completing tasks of sufficient value

Installation

From PyPI (Recommended)

pip install supertask

From Source

# Clone the repository
git clone https://github.com/software-students-spring2025/3-python-package-super-package.git
cd supertask

# Install in development mode
pip install -e .

Usage

Core Task Management

import datetime
from supertask.tasks import add_task, update_task, remove_task

# Add a task with a string time (ISO format)
add_task("2023-06-15T09:00:00", "Morning meeting", 5)

# Add a task with a datetime object
tomorrow = datetime.datetime.now() + datetime.timedelta(days=1)
add_task(tomorrow, "Lunch with team", 3)

# Update a task's value
update_task("2023-06-15T09:00:00", "Morning meeting", 10)

# Remove a task
remove_task("2023-06-15T09:00:00", "Morning meeting")

Task Listing (To be implemented by Lan)

from supertask.list import list_tasks, mark_completed

# List all tasks sorted by time
tasks = list_tasks(sort_by="time")

# List tasks before a specific date
upcoming_tasks = list_tasks(before="2023-07-01T00:00:00")

# Mark a task as completed
mark_completed("2023-06-15T09:00:00", "Morning meeting")

Reminder System (To be implemented by Yuquan)

from supertask.reminder import reminder_mail

# Configure email reminders
reminder_mail("your_email@example.com", days_ahead=1)

Reward System (To be implemented by Yilei)

from supertask.reward import reward

# Check rewards when reaching a value threshold
motivational_message = reward(20)
print(motivational_message)  # Prints a joke or congratulatory message

For Contributors

Development Setup

# Clone the repository
git clone https://github.com/software-students-spring2025/3-python-package-super-package.git
cd supertask

# Create and activate a virtual environment
pipenv --python 3.9
pipenv shell

# Install package in development mode
pipenv install -e .

# Install development dependencies
pipenv install pytest build twine

# Run tests
pytest

Development Workflow

  1. Create a feature branch for your work

  2. Implement your changes and add tests

  3. Make sure tests pass

    python -m pytest
    
  4. Create a pull request to the main branch

Project Structure

supertask/                         # Root project directory
├── supertask/                     # Main package source code
│   ├── __init__.py                # Package initialization and exports
│   ├── tasks.py                   # Core task management; Task listing and completion tracking; Email reminder system; Motivational reward system
│   ├── utils/                     # Utility modules
│   │   ├── __init__.py            # Package initialization
│   │   ├── date_utils.py          # Date/time handling utilities
│   │   ├── storage.py             # Data storage abstractions
│   │   └── validators.py          # Input validation functions
│   └── config.py                  # Configuration management
│
├── tests/                         # Test directory
│   ├── __init__.py                # Test package initialization
│   ├── conftest.py                # Pytest fixtures and configuration
│   ├── test_tasks.py              # Tests for tasks module
│   ├── test_list.py               # Tests for list module
│   ├── test_reminder.py           # Tests for reminder module
│   ├── test_reward.py             # Tests for reward module
│   └── utils/                     # Tests for utility modules
│       ├── test_date_utils.py     # Tests for date utilities
│       ├── test_storage.py        # Tests for storage utilities
│       └── test_validators.py     # Tests for validation functions
│
├── examples/                      # Example scripts
│   ├── basic_usage.py             # Basic package usage examples
│   ├── advanced_usage.py          # Advanced features demonstration
│   ├── integration_example.py     # Example integrating all features
│   └── custom_configuration.py    # Customizing package configuration
│
├── docs/                          # Documentation
│   ├── conf.py                    # Sphinx configuration
│   ├── index.rst                  # Documentation home page
│   ├── installation.rst           # Installation guide
│   ├── usage.rst                  # Usage documentation
│   ├── api/                       # API documentation
│   │   ├── tasks.rst              # Tasks API docs
│   │   ├── list.rst               # List API docs
│   │   ├── reminder.rst           # Reminder API docs
│   │   └── reward.rst             # Reward API docs
│   └── _build/                    # Built documentation (not in version control)
│
├── .github/                       # GitHub specific files
│   └── workflows/                 # GitHub Actions workflows
│       ├── python-package.yml     # CI workflow for testing and building
│       └── publish.yml            # Workflow for publishing to PyPI
│
├── .venv/                         # Virtual environment (not in version control)
├── supertask.egg-info/            # Package metadata (not in version control)
├── .pytest_cache/                 # Pytest cache (not in version control)
│
├── pyproject.toml                 # Project configuration (PEP 517/518)
├── Pipfile                        # Pipenv dependency management
├── Pipfile.lock                   # Locked dependencies (ensure reproducibility)
├── README.md                      # Project documentation
├── LICENSE                        # License information
└── .gitignore                     # Git ignore patterns

Key Modules

  • tasks.py:

  • Core module for adding, updating, and removing tasks. Tasks are stored as JSON with timestamps, descriptions, values, and completion status.

  • Module for listing tasks with various sorting and filtering options, and for marking tasks as completed.

  • Module for setting up and sending email reminders for upcoming tasks.

  • Module for providing motivational rewards when users complete tasks of sufficient value.

Data Storage

By default, tasks are stored in a JSON file at ~/.supertask_data.json. Each task has the following structure:

{
  "time": "2023-06-15T09:00:00",
  "event": "Morning meeting",
  "value": 5,
  "completed": false
}

You can specify a custom file path when using the API functions.

Contributors

  • Xingjian - Core Task Management
  • Lan - Task Listing and Completion
  • Yuquan - Email Reminders
  • Yilei - Reward System

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

shadderdtask-0.1.3.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

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

shadderdtask-0.1.3-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file shadderdtask-0.1.3.tar.gz.

File metadata

  • Download URL: shadderdtask-0.1.3.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for shadderdtask-0.1.3.tar.gz
Algorithm Hash digest
SHA256 380cf8492b748d9d6363c82a58488a2dc0d24b723570728068d102686499bd1f
MD5 9042e7e7529e5141fbba116944f1bb14
BLAKE2b-256 6e92423f17948121f4bb07dea05b2eb5f76bb566354d65a14143e90c7f54e603

See more details on using hashes here.

File details

Details for the file shadderdtask-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: shadderdtask-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for shadderdtask-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e46c819455e9ba8f2f7f59d2f65530ef247717cdfb737a9cf890ba6154872b
MD5 b5619bb4dd71d4676fcb72ef2ba84e11
BLAKE2b-256 ab1174aa854da830f4fd42d8c4f97b578b01d8fc6b81911758d37519ff0c6aee

See more details on using hashes here.

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