Skip to content

Commit

Permalink
reworked new docs structure
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Dec 18, 2024
1 parent 8c08f9e commit 718e42a
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 23 deletions.
4 changes: 4 additions & 0 deletions docs/source/explanation/conditional-lazy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Conditional construction and lazy evaluation
=====================================================

Work in progress...
4 changes: 0 additions & 4 deletions docs/source/explanation/conditional-logic.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/source/explanation/lazy-evaluation.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Creating a task package
Splitting and combining
=======================

Work in progress....
23 changes: 23 additions & 0 deletions docs/source/howto/create-task-package.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Creating a task package"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
93 changes: 93 additions & 0 deletions docs/source/howto/install.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Installation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Pydra is a pure Python package, which only depends on two packages `attrs` and `fileformats`. Therefore, it is straightforward to install via pip"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [],
"source": [
"pip install pydra"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To install a development version use the `dev` install option"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"zsh:1: no matches found: pydra[dev]\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"git clone [email protected]:nipype/pydra.git\n",
"pip install -e ./pydra[dev]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "wf12",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
8 changes: 0 additions & 8 deletions docs/source/howto/install.rst

This file was deleted.

23 changes: 23 additions & 0 deletions docs/source/howto/port-from-nipype.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Port interfaces from Nipype"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
4 changes: 0 additions & 4 deletions docs/source/howto/port-from-nipype.rst

This file was deleted.

5 changes: 3 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ Indices and tables
:caption: Explanation
:hidden:

explanation/conditional-logic
explanation/splitting-combining
explanation/typing
explanation/hashing-caching
explanation/conditional-lazy
explanation/provenance
explanation/lazy-evaluation


.. toctree::
:maxdepth: 2
Expand Down
5 changes: 5 additions & 0 deletions pydra/engine/workflow/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ def construct(

return wf

@classmethod
def clear_cache(cls):
"""Clear the cache of constructed workflows"""
cls._constructed.clear()

def add(self, task_spec: TaskSpec[OutputsType], name=None) -> OutputsType:
"""Add a node to the workflow
Expand Down

0 comments on commit 718e42a

Please sign in to comment.