Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Kanegraffiti/Parslet
/ functions
Functions
437 in github.com/Kanegraffiti/Parslet
⨍
Functions
437
◇
Types & classes
46
↓ 42 callers
Method
run
Executes all tasks in the provided DAG according to their dependencies. The method first validates the DAG and gets a topological ex
parslet/core/runner.py:561
↓ 36 callers
Method
build_dag
Builds the DAG from a list of "entry" ParsletFuture objects. Entry futures are typically the terminal tasks of a workflow (t
parslet/core/dag.py:133
↓ 20 callers
Function
get_battery_level
Return the current battery percentage if available.
parslet/utils/resource_utils.py:122
↓ 18 callers
Method
result
(self)
tests/test_hybrid.py:14
↓ 16 callers
Function
get_available_ram_mb
Returns the available system RAM in Megabytes (MB). This function relies on the `psutil` library. If `psutil` is not installed or if an
parslet/utils/resource_utils.py:83
↓ 14 callers
Method
validate_dag
Validates the DAG structure, primarily checking for cycles. If the graph is empty, validation is considered successful (vacu
parslet/core/dag.py:196
↓ 9 callers
Method
set_exception
Records an exception that occurred during the task's execution. This method is typically called by the `DAGRunner` if the task
parslet/core/task.py:158
↓ 8 callers
Function
load_workflow_module
Load a workflow script or module reference. The ``path`` can either be a filesystem path to a Python file or a ``module:func`` reference. In
parslet/cli.py:42
↓ 8 callers
Function
set_allow_redefine
Globally allow redefining tasks regardless of decorator flags.
parslet/core/task.py:423
↓ 7 callers
Method
result
Retrieves the result of the task. If the task executed successfully, its return value is provided. If the task failed, the e
parslet/core/task.py:175
↓ 6 callers
Method
evaluate
Return ``True`` if *all* requirements are satisfied.
parslet/core/context.py:76
↓ 6 callers
Method
set_result
Sets the successful result of the task. This method is typically called by the `DAGRunner` once the task has completed succe
parslet/core/task.py:133
↓ 5 callers
Method
get_execution_order
Performs a topological sort on the DAG to get a valid execution order of task IDs. Tasks with no dependencies will appear ea
parslet/core/dag.py:252
↓ 5 callers
Method
mark_complete
Record a successfully finished task. Parameters ---------- task_id: The unique identifier of the task. st
parslet/utils/checkpointing.py:35
↓ 5 callers
Function
resolve_workflow_entry
Return the workflow entry function for a loaded module. Resolution order: 1) ``main`` function, for backwards compatibility. 2) A single
parslet/cli.py:12
↓ 4 callers
Method
_normalise_name
(name: str)
parslet/core/context.py:199
↓ 4 callers
Method
decide_pool_size
Return desired worker count given current resource probes.
parslet/core/policy.py:18
↓ 4 callers
Function
ensure_sample_image
Ensure the sample.png asset exists and return its path.
examples/utils.py:12
↓ 4 callers
Function
get_cpu_count
Returns the number of logical CPUs available to the system. This function uses `os.cpu_count()`. It is designed to always return a posit
parslet/utils/resource_utils.py:50
↓ 4 callers
Function
get_power_state
Return the best effort :class:`PowerState` for the system. Providers are tried in order and the first non-``None`` result is used. If every p
parslet/utils/power.py:115
↓ 4 callers
Method
get_task_future
Retrieves the `ParsletFuture` object for a given task ID. Args: task_id (str): The unique ID of the task. Retur
parslet/core/dag.py:290
↓ 4 callers
Function
offline_guard
Block network socket creation when ``enabled`` is :data:`True`.
parslet/security/__init__.py:79
↓ 4 callers
Function
save_dag_to_png
Saves the Parslet DAG as a PNG image file. This function requires both the `pydot` library and a functional Graphviz installation (speci
parslet/core/exporter.py:153
↓ 4 callers
Method
scan_code
DEFCON1: scan for dangerous calls.
parslet/security/defcon.py:24
↓ 4 callers
Method
verify_chain
DEFCON2: verify DAG hash against signature.
parslet/security/defcon.py:44
↓ 3 callers
Method
__init__
Initializes the DAGRunner. Args: max_workers (Optional[int]): The maximum number of worker threads for t
parslet/core/runner.py:138
↓ 3 callers
Method
_is_delayed
Return ``True`` if *expr* refers to ``dask.delayed``.
parslet/compat/dask_adapter.py:46
↓ 3 callers
Function
_make_image
(path: Path, color: int)
tests/test_rad_parslet.py:12
↓ 3 callers
Method
calculate_worker_count
Determine how many workers to use based on system resources.
parslet/core/scheduler.py:28
↓ 3 callers
Method
cleanup
(self)
tests/test_hybrid.py:44
↓ 3 callers
Function
convert_task_to_parsl
Wrap a Parslet task function as a Parsl ``python_app``. This requires the ``parsl`` package to be installed. The returned function behaves li
parslet/core/parsl_bridge.py:50
↓ 3 callers
Function
get_cache_dir
Return the directory used for storing cache files.
parslet/core/cache.py:63
↓ 3 callers
Method
get_task_benchmarks
Retrieves benchmark data for all tasks processed or known by the runner. The returned data includes the status of each task
parslet/core/runner.py:262
↓ 3 callers
Function
inc
(x)
tests/test_dask_adapter_runtime.py:7
↓ 3 callers
Function
needs_power
(x)
tests/test_battery_sensitive.py:6
↓ 3 callers
Method
result
(self)
tests/test_parsl_bridge.py:19
↓ 3 callers
Method
snapshot
Return the current view of all known detectors and overrides.
parslet/core/context.py:88
↓ 2 callers
Function
_compute_model_hash
(model: object)
examples/rad_parslet/rad_parslet.py:91
↓ 2 callers
Function
_deserialize_arg
(val: Any, task_map: Dict[str, ParsletFuture])
parslet/core/dag_io.py:47
↓ 2 callers
Function
_run_once
()
tests/test_cache.py:21
↓ 2 callers
Method
_run_task_serially
Execute a task synchronously in fallback mode.
parslet/core/runner.py:508
↓ 2 callers
Function
_safe_serialize
Serialize ``obj`` into JSON-friendly structures. Non-JSON-serializable objects fall back to ``repr`` strings. Collections are processed recur
parslet/core/cache.py:14
↓ 2 callers
Function
_serialize_arg
(arg: Any)
parslet/core/dag_io.py:17
↓ 2 callers
Function
add
A simple Parslet task that adds two integers. Simulates some work using `time.sleep()`. Args: a (int): The first integer.
examples/hello.py:74
↓ 2 callers
Function
add_one
(x)
tests/test_dask_bridge.py:47
↓ 2 callers
Function
analyze
Analyze an image with tiny models. Args: image_path: Path to input image. output_dir: Directory to store outputs. ignore_
examples/rad_parslet/rad_parslet.py:96
↓ 2 callers
Function
compute
Evaluate one or more ``ParsletFuture`` objects like ``dask.compute``.
parslet/compat/dask_adapter.py:230
↓ 2 callers
Function
dag_to_pydot
Converts a Parslet DAG to a `pydot.Dot` object using NetworkX. This function serves as the core conversion utility for generating visual
parslet/core/exporter.py:76
↓ 2 callers
Method
draw_dag
Return a simple visualisation of the DAG. If ``ascii_only`` is True or Graphviz is not available, an ASCII representation is returned
parslet/core/dag.py:347
↓ 2 callers
Function
execute_with_dask
Execute a Parslet workflow using Dask. Parameters ---------- entry_futures: Terminal futures from the workflow's ``main()`` funct
parslet/core/dask_bridge.py:17
↓ 2 callers
Function
export_parsl_dag
Export a Parslet DAG to a Parsl-style Python script.
parslet/compat/parsl_adapter.py:192
↓ 2 callers
Function
find_free_port
Finds an available port starting from ``start_port``. Args: start_port: Initial port to try. max_tries: Maximum number of increme
parslet/utils/diagnostics.py:9
↓ 2 callers
Function
gated_task
()
tests/test_context_oracle.py:32
↓ 2 callers
Method
get_dependencies
Returns a list of task IDs that are direct dependencies (predecessors) of the specified task. Args: task_id (str
parslet/core/dag.py:309
↓ 2 callers
Function
import_parsl_script
Convert a simple Parsl workflow file to Parslet syntax. Parameters ---------- src : str Path to the Parsl script. dest : str
parslet/compat/parsl_adapter.py:94
↓ 2 callers
Function
infer_edges_from_params
Derive graph edges by inspecting task parameter references. The helper assumes that if a parameter name matches another task name the latter
parslet/core/ir.py:42
↓ 2 callers
Function
is_network_available
Return True if we can reach the given host:port within ``timeout``.
parslet/utils/network_utils.py:15
↓ 2 callers
Function
is_running_in_termux
Checks if the script is currently running within a Termux environment. The detection is primarily based on the presence and specific values
termux/helpers.py:18
↓ 2 callers
Function
one
()
tests/test_dask_bridge.py:43
↓ 2 callers
Function
parslet_task
Decorator to define a Python function as a Parslet task. When a function decorated with `@parslet_task` is called, it does not execute i
parslet/core/task.py:225
↓ 2 callers
Method
render_prologue
Return a pre-flight briefing describing contexts and tasks.
parslet/core/concierge.py:44
↓ 2 callers
Function
save_to_cache
Persist ``value`` for ``key`` to the cache.
parslet/core/cache.py:80
↓ 2 callers
Function
square
A simple Parslet task that squares an integer. Simulates some work using `time.sleep()`. Args: x (int): The integer to square.
examples/hello.py:95
↓ 2 callers
Method
tamper_guard
DEFCON3: ensure files unchanged.
parslet/security/defcon.py:53
↓ 2 callers
Function
toposort
Topologically sort ``tasks`` given an iterable of ``edges``. A ``ValueError`` is raised if a cycle is detected. The algorithm is a tiny impl
parslet/core/ir.py:58
↓ 1 callers
Method
__init__
( self, message: str = ( "pydot library is not installed. Please install it to use
parslet/core/exporter.py:45
↓ 1 callers
Method
__init__
(self, ram_mb: float)
examples/rad_parslet/rad_parslet.py:42
↓ 1 callers
Function
_blocked
(*args: object, **kwargs: object)
parslet/security/__init__.py:53
↓ 1 callers
Method
_copy_file
(self, path: Path)
parslet/hybrid/relay.py:22
↓ 1 callers
Method
_energy_rank
(self, cost: str)
parslet/core/policy.py:41
↓ 1 callers
Function
_ensure_parsl_loaded
Lazily load Parsl with a small thread pool configuration.
parslet/core/parsl_bridge.py:25
↓ 1 callers
Method
_evaluate_single
(self, requirement: str)
parslet/core/context.py:126
↓ 1 callers
Method
_is_night
(self)
parslet/core/context.py:122
↓ 1 callers
Method
_maybe_resize_pool
Adjust executor worker count based on current policy.
parslet/core/runner.py:393
↓ 1 callers
Method
_qos_rank
(self, qos: str)
parslet/core/policy.py:44
↓ 1 callers
Method
_register_builtin_detectors
(self)
parslet/core/context.py:111
↓ 1 callers
Method
_remediation_hint
Provide a simple one-line remediation hint based on the exception.
parslet/core/runner.py:413
↓ 1 callers
Method
_resolve_context
(self, name: str)
parslet/core/context.py:153
↓ 1 callers
Method
_resolve_dynamic
(self, name: str)
parslet/core/context.py:174
↓ 1 callers
Method
_resolve_task_arguments
Resolves the arguments for a given ParsletFuture by obtaining results from its dependency ParsletFutures. This method iterat
parslet/core/runner.py:301
↓ 1 callers
Method
_task_context_rows
(self)
parslet/core/concierge.py:141
↓ 1 callers
Method
_task_done_callback
Callback executed when a task submitted to the ThreadPoolExecutor completes. This method retrieves the result (or exception)
parslet/core/runner.py:419
↓ 1 callers
Function
add
(x, y)
tests/test_parsl_adapter_runtime.py:47
↓ 1 callers
Function
add
(x: int, y: int)
tests/test_task.py:8
↓ 1 callers
Function
add
(x, y)
tests/test_parsl_bridge.py:98
↓ 1 callers
Function
add
(x, y)
tests/test_runner.py:5
↓ 1 callers
Function
add
(x: int, y: int)
examples/compat/dask_demo.py:7
↓ 1 callers
Function
add
(x: int, y: int)
examples/compat/parsl_demo.py:7
↓ 1 callers
Function
add_one
(x)
tests/test_parsl_bridge.py:115
↓ 1 callers
Function
add_one
(x)
tests/test_hybrid.py:94
↓ 1 callers
Function
analyze_power
(records: List[Dict[str, float]])
use_cases/telecom_power_monitor.py:80
↓ 1 callers
Function
apply_blur
Applies a Gaussian blur to a Pillow Image object.
examples/image_filter.py:38
↓ 1 callers
Function
apply_fallback
( result: Dict[str, object], threshold: float = 0.8 )
examples/mobile_edge_inference.py:95
↓ 1 callers
Function
archive_responses
( responses: List[Dict[str, str]], dest: Path, resources: Dict[str, bool] )
use_cases/offline_survey_flow.py:90
↓ 1 callers
Function
ascii_heatmap
(path: str)
examples/tools/plot_stats.py:8
↓ 1 callers
Function
boom
()
tests/test_fail_messages.py:13
↓ 1 callers
Method
build_runbook
Return a JSON-serialisable structure describing the run.
parslet/core/concierge.py:102
↓ 1 callers
Function
cheap
()
tests/test_energy_policy_ordering.py:12
↓ 1 callers
Function
check_resources
( min_ram_mb: int = 50, min_battery: int = 20 )
use_cases/offline_edu_content_builder.py:35
↓ 1 callers
Function
check_resources
( min_ram_mb: int = 30, min_battery: int = 20 )
use_cases/shared_hub_jobs.py:33
next →
1–100 of 437, ranked by callers