Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tasks:
desc: Lint Python code
cmds:
- uv run mypy src
- uv run pylint src
- uv run pylint src tests

build:
desc: Build Python package
Expand Down Expand Up @@ -75,6 +75,7 @@ tasks:
prompt: Bump Python package version from {{.CURRENT}} to {{.NEXT}}?
cmds:
- uv version --bump minor
- uv sync
- git add pyproject.toml uv.lock
- git commit -m "bump version"

Expand All @@ -101,3 +102,8 @@ tasks:
desc: Run Redis Service
cmds:
- docker run --rm -p 127.0.0.1:6379:6379 docker.io/redis:8

rq-info:
desc: Show RQ information
cmds:
- uv run rq info --interval 5
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

templates_path = ["_templates"]
exclude_patterns = []

add_module_names = True

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand Down
96 changes: 96 additions & 0 deletions docs/source/getting-started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Getting Started with Tasktronaut
=================================

Welcome to Tasktronaut!

This guide will help you install the library, set up your first process, and run it successfully.

Installation
------------

Prerequisites
~~~~~~~~~~~~~

Tasktronaut requires:

- Python 3.7 or higher
- pip (Python package manager)

Installing from PyPI
~~~~~~~~~~~~~~~~~~~~

The easiest way to install Tasktronaut is using pip:

.. code-block:: bash

pip install tasktronaut[rq]

For a specific version:

.. code-block:: bash

pip install tasktronaut[rq]==0.3.0

Installing with Optional Dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Tasktronaut may offer optional extras for extended functionality. Install them as follows:

.. code-block:: bash

pip install tasktronaut[dev]
pip install tasktronaut[docs]

Installing from Source
~~~~~~~~~~~~~~~~~~~~~~

To install the development version from the repository:

.. code-block:: bash

git clone https://github.com/virtualstaticvoid/tasktronaut.git
cd tasktronaut
uv sync

Verifying Your Installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Verify the installation was successful by importing Tasktronaut in a Python shell:

.. code-block:: python

>>> import tasktronaut
>>> print(tasktronaut.__version__)
x.x.x

If you see the version number without errors, you're ready to go!


Your First Process
------------------

Creating a Simple Process
~~~~~~~~~~~~~~~~~~~~~~~~~~

Let's create a basic process with three sequential tasks. Create a file called ``my_first_process.py``:

.. code-block:: python

from tasktronaut import ProcessDefinition, Builder

class GreetingProcess(ProcessDefinition):
"""A simple process that greets the user."""

def define_process(self, builder: Builder):
builder.task(self.say_hello)
builder.task(self.say_name)
builder.task(self.say_goodbye)

def say_hello(self):
print("Hello!")

def say_name(self, name: str = "World", **kwargs):
print(f"Nice to meet you, {name}.")

def say_goodbye(self):
print("Goodbye!")
5 changes: 4 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
``tasktronaut`` Documentation
=============================

Welcome to Tasktronaut!

.. toctree::
:maxdepth: 1
:caption: Contents:

user_guide
getting-started
user-guide
advanced
api/modules

Expand Down
Loading