Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c765fa9
Use rhapsody for backends, maintain compatibility layer
mturilli Sep 27, 2025
5911079
Install rhapsody from GH@dev
mturilli Sep 27, 2025
3dbfc6d
Fix and extend linting
mturilli Sep 27, 2025
44e1c3e
Fix overeager ruff type fixing
mturilli Sep 27, 2025
5efc4aa
Fix pytest-asyncio scope mismatch error
mturilli Sep 27, 2025
229e9f3
RP init is very slow. Share async scope on for RP int tests
mturilli Sep 27, 2025
f490381
Crate a backends-specific scope
mturilli Sep 27, 2025
f104023
Add an explicit loop_scope. Got to love RP...
mturilli Sep 27, 2025
a18065b
Make it DRY!
mturilli Sep 27, 2025
b79a3d2
Implement a registry and factory for backends
mturilli Sep 28, 2025
d49ace2
Make rhapsody facultative and autoload backends
mturilli Sep 28, 2025
90441ff
Fix CI testing issues.
mturilli Sep 28, 2025
5775577
Fixing unit tests, still issues with the integration ones
mturilli Sep 28, 2025
8bb6ab9
Use patch targets for 3.9/10, worked with 3.11+
mturilli Sep 28, 2025
a1655da
Knowing more than I wanted to about 3.9
mturilli Sep 28, 2025
eff3819
Address Gemini review
mturilli Sep 28, 2025
5f98a11
Address Gemini review: remove obsolete register_optional_backends()
mturilli Sep 28, 2025
84c640d
Update documentation with new backend factory
mturilli Sep 28, 2025
2f60d8d
Update and test examples
mturilli Sep 28, 2025
1c22351
Export to JSON...
mturilli Sep 28, 2025
785814e
Well, maybe better we use the work we did...
mturilli Sep 28, 2025
d43814c
From inheritance to duck-typing validation. We may review this in the…
mturilli Sep 28, 2025
d36b073
Using a protocol-based type system to use rhapsody different type system
mturilli Sep 28, 2025
a5d2af9
Unit tests now use the type protocol
mturilli Sep 28, 2025
36622b0
Use protocol for tests
mturilli Sep 29, 2025
d5c1314
Use an available backend for unit tests
mturilli Sep 29, 2025
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
21 changes: 21 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Configuration for actionlint
# https://github.com/rhysd/actionlint/blob/main/docs/config.md

# Disable specific checks if needed
# self-hosted-runner:
# # Labels of self-hosted runner in array of strings
# labels:
# - linux.2xlarge
# - windows-latest-xl
# # Repository path of self-hosted runner configurations
# config-file: path/to/runner-config.json

# Schema validation config
# config-variables:
# # Array of known custom configuration variable names
# vars: []

# Format configuration
# format:
# # Available formats: sarif, json
# output-format: ""
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
python-version: 3.x

- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV

- uses: actions/cache@v4
with:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: tests
on:
push:
branches: [main, test-me-*]
tags:
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -39,12 +38,12 @@ jobs:
python-version: ${{ matrix.python }}
- name: Get pip cache dir
id: pip-cache-dir
run: echo "PIP_CACHE_DIR=$(pip cache dir)" >> $GITHUB_ENV
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Use pip cache
id: pip-cache
uses: actions/cache@v4
with:
path: ${{ env.PIP_CACHE_DIR }}
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: tests-unit-${{ matrix.os }}-pip-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
tests-unit-${{ matrix.os }}-pip-${{ matrix.python }}-
Expand Down Expand Up @@ -84,12 +83,12 @@ jobs:
python-version: ${{ matrix.python }}
- name: Get pip cache dir
id: pip-cache-dir
run: echo "PIP_CACHE_DIR=$(pip cache dir)" >> $GITHUB_ENV
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Use pip cache
id: pip-cache
uses: actions/cache@v4
with:
path: ${{ env.PIP_CACHE_DIR }}
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: tests-integration-${{ matrix.os }}-pip-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
tests-integration-${{ matrix.os }}-pip-${{ matrix.python }}-
Expand Down
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,21 @@ cython_debug/
# PyPI configuration file
.pypirc
asyncflow.session.*

# Ignore vscode settings
.vscode/

# Ignore GH instructions
.github/instructions

# Ignore codacy settings
.codacy/

# Ignore devcontainer settings
.devcontainer/

# Ignore direnv settings
.direnv/

# Ignore dotenv settings
.envrc
70 changes: 70 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# .pre-commit-config.yaml

default_language_version:
python: python3

repos:
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.7
hooks:
- id: docformatter
args: ["--in-place", "--wrap-summaries=88", "--wrap-descriptions=88"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.1
hooks:
- id: ruff
args: ["--fix"]
exclude: '\.ipynb$'
- id: ruff-format
exclude: '\.ipynb$'

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.14.0
# hooks:
# - id: mypy
# additional_dependencies: [types-requests]
# args: ["--config-file=pyproject.toml"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^mkdocs\.yml$
- id: check-toml
- id: debug-statements
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=500"]

- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
hooks:
- id: actionlint
args: ["-config-file", ".github/actionlint.yaml"]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.34.0
hooks:
- id: check-github-workflows
files: ^\.github/workflows/.*\.ya?ml$

- repo: https://github.com/crate-ci/typos
rev: v1.36.2
hooks:
- id: typos
args: ["--config", "_typos.toml"]

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args:
- --baseline
- .secrets.baseline
- --exclude-files
- (?i)(^\.?venv/|^\.direnv/|^\.mypy_cache/|^\.ruff_cache/|^\.pytest_cache/|^\.tox/|^\.cache/|^dist/|^build/|^site/|^htmlcov/|^node_modules/|^docs/_build/|^\.ipynb_checkpoints/|\.(png|jpe?g|gif|svg|pdf|zip|tar|gz|tgz|xz|bz2|zst|woff2?)$)
- --exclude-lines
- (?i)(^\s*POSTGRES_PASSWORD:\s*postgres$|postgresql://postgres:postgres@localhost(:\d+)?/|(user|username|password)\s*=\s*(test|example|dummy))
153 changes: 153 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"version": "1.5.0",
"plugins_used": [
{
"name": "ArtifactoryDetector"
},
{
"name": "AWSKeyDetector"
},
{
"name": "AzureStorageKeyDetector"
},
{
"name": "Base64HighEntropyString",
"limit": 4.5
},
{
"name": "BasicAuthDetector"
},
{
"name": "CloudantDetector"
},
{
"name": "DiscordBotTokenDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"name": "GitLabTokenDetector"
},
{
"name": "HexHighEntropyString",
"limit": 3.0
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "IPPublicDetector"
},
{
"name": "JwtTokenDetector"
},
{
"name": "KeywordDetector",
"keyword_exclude": ""
},
{
"name": "MailchimpDetector"
},
{
"name": "NpmDetector"
},
{
"name": "OpenAIDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "PypiTokenDetector"
},
{
"name": "SendGridDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "SquareOAuthDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TelegramBotTokenDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"filters_used": [
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": ".secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
{
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
},
{
"path": "detect_secrets.filters.heuristic.is_lock_file"
},
{
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
},
{
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
},
{
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
},
{
"path": "detect_secrets.filters.heuristic.is_sequential_string"
},
{
"path": "detect_secrets.filters.heuristic.is_swagger_file"
},
{
"path": "detect_secrets.filters.heuristic.is_templated_secret"
},
{
"path": "detect_secrets.filters.regex.should_exclude_file",
"pattern": [
"(?i)(^\\.?venv/|^\\.direnv/|^\\.mypy_cache/|^\\.ruff_cache/|^\\.pytest_cache/|^\\.tox/|^\\.cache/|^dist/|^build/|^site/|^htmlcov/|^node_modules/|^docs/_build/|^\\.ipynb_checkpoints/|\\.(png|jpe?g|gif|svg|pdf|zip|tar|gz|tgz|xz|bz2|zst|woff2?)$)"
]
},
{
"path": "detect_secrets.filters.regex.should_exclude_line",
"pattern": [
"(?i)(^\\s*POSTGRES_PASSWORD:\\s*postgres$|postgresql://postgres:postgres@localhost(:\\d+)?/|(user|username|password)\\s*=\\s*(test|example|dummy))"
]
}
],
"results": {
"examples/tutorials/build_async_workflows.ipynb": [
{
"type": "Base64 High Entropy String",
"filename": "examples/tutorials/build_async_workflows.ipynb",
"hashed_secret": "627076ecb044ca925ea922ff9189c83fd6178cf6",
"is_verified": false,
"line_number": 6
}
]
},
"generated_at": "2025-09-27T17:50:40Z"
}
11 changes: 5 additions & 6 deletions .wci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: RADICAL-AsyncFlow
icon: https://radical-cybertools.github.io/assets/radical-logo-transparent.png
headline: High Performance Asynchronous Workflow Scripting Library
description: |
RADICAL-AsyncFlow (RAF) is an asynchronous scripting library for building
high-performance, scalable workflows that run on HPC systems, clusters,
and local machines. Designed for flexibility and speed, it allows users
to compose complex workflows from async and sync tasks with clear
dependencies, while ensuring efficient execution at any scale with
RADICAL-AsyncFlow (RAF) is an asynchronous scripting library for building
high-performance, scalable workflows that run on HPC systems, clusters,
and local machines. Designed for flexibility and speed, it allows users
to compose complex workflows from async and sync tasks with clear
dependencies, while ensuring efficient execution at any scale with
different execution backends.

language: Python
Expand All @@ -20,4 +20,3 @@ documentation:
general: https://radical-cybertools.github.io/radical.asyncflow/
installation: https://radical-cybertools.github.io/radical.asyncflow/install/
tutorial: https://radical-cybertools.github.io/radical.asyncflow/basic/index.html

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</p>


RADICAL AsyncFlow (RAF) is a fast asynchronous scripting library built on top of [asyncio](https://docs.python.org/3/library/asyncio.html) for building powerful async/sync workflows on HPC, clusters, and local machines. It supports pluggable execution backends with intuitive task dependencies and workflow composition.
RADICAL AsyncFlow (RAF) is a fast asynchronous scripting library built on top of [asyncio](https://docs.python.org/3/library/asyncio.html) for building powerful async/sync workflows on HPC, clusters, and local machines. It supports pluggable execution backends with intuitive task dependencies and workflow composition.

- ⚡ Powerful asynchronous workflows — Compose complex async and sync workflows easily, with intuitive task dependencies and campaign orchestration.

Expand Down Expand Up @@ -79,7 +79,7 @@ async def main():
# create the workflow
t1_fut = task1()
t2_result = await task2(t1_fut) # t2 depends on t1 (waits for it)

print(t2_result)
# shutdown the execution backend
await flow.shutdown()
Expand Down
Loading