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
35 changes: 18 additions & 17 deletions docs/_images/notebooks_hello_19_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
134 changes: 106 additions & 28 deletions docs/_sources/notebooks/hello.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand All @@ -267,36 +267,37 @@
"<!-- Generated by graphviz version 8.0.2 (20230410.1723)\n",
" -->\n",
"<!-- Title: root Pages: 1 -->\n",
"<svg width=\"167pt\" height=\"153pt\"\n",
" viewBox=\"0.00 0.00 167.39 153.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 149)\">\n",
"<svg width=\"418pt\" height=\"44pt\"\n",
" viewBox=\"0.00 0.00 418.37 44.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 40)\">\n",
"<title>root</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-149 163.39,-149 163.39,4 -4,4\"/>\n",
"<g id=\"clust1\" class=\"cluster\">\n",
"<title>cluster_0</title>\n",
"<polygon fill=\"none\" stroke=\"black\" points=\"8,-8 8,-137 151.39,-137 151.39,-8 8,-8\"/>\n",
"<text text-anchor=\"middle\" x=\"79.69\" y=\"-121.8\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">MyFolder</text>\n",
"</g>\n",
"<!-- MyFolder/MyFirstJob -->\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-40 414.37,-40 414.37,4 -4,4\"/>\n",
"<!-- my&#45;folder/sub&#45;folder&#45;1 -->\n",
"<g id=\"node1\" class=\"node\">\n",
"<title>MyFolder/MyFirstJob</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"79.69\" cy=\"-88\" rx=\"52.79\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"79.69\" y=\"-84.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">MyFirstJob</text>\n",
"<title>my&#45;folder/sub&#45;folder&#45;1</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"93.59\" cy=\"-18\" rx=\"93.68\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"93.59\" y=\"-14.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">my&#45;folder/sub&#45;folder&#45;1</text>\n",
"</g>\n",
"<!-- MyFolder/MySecondJob -->\n",
"<!-- my&#45;folder/sub&#45;folder&#45;2 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>MyFolder/MySecondJob</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"79.69\" cy=\"-34\" rx=\"63.89\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"79.69\" y=\"-30.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">MySecondJob</text>\n",
"<title>my&#45;folder/sub&#45;folder&#45;2</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"316.78\" cy=\"-18\" rx=\"93.68\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"316.78\" y=\"-14.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">my&#45;folder/sub&#45;folder&#45;2</text>\n",
"</g>\n",
"<!-- my&#45;folder/sub&#45;folder&#45;1&#45;&gt;my&#45;folder/sub&#45;folder&#45;2 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>my&#45;folder/sub&#45;folder&#45;1&#45;&gt;my&#45;folder/sub&#45;folder&#45;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M187.75,-18C195.71,-18 203.78,-18 211.82,-18\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"211.72,-21.5 221.72,-18 211.72,-14.5 211.72,-21.5\"/>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.graphs.Digraph at 0x28d6ba39e20>"
"<graphviz.graphs.Digraph at 0x28ca7a3d010>"
]
},
"execution_count": 27,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -398,6 +399,88 @@
"get_graph(workflow)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Connecting two SubFolders"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also connect SubFolders, not just Jobs or Folders.\n",
"To do this, use workflow.connect(src, dest, inpath=...) where src and dest are the names of the SubFolders (as strings), and inpath is the name of the parent Folder that contains them."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 8.0.2 (20230410.1723)\n",
" -->\n",
"<!-- Title: root Pages: 1 -->\n",
"<svg width=\"418pt\" height=\"44pt\"\n",
" viewBox=\"0.00 0.00 418.37 44.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 40)\">\n",
"<title>root</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-40 414.37,-40 414.37,4 -4,4\"/>\n",
"<!-- my&#45;folder/sub&#45;folder&#45;1 -->\n",
"<g id=\"node1\" class=\"node\">\n",
"<title>my&#45;folder/sub&#45;folder&#45;1</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"93.59\" cy=\"-18\" rx=\"93.68\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"93.59\" y=\"-14.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">my&#45;folder/sub&#45;folder&#45;1</text>\n",
"</g>\n",
"<!-- my&#45;folder/sub&#45;folder&#45;2 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>my&#45;folder/sub&#45;folder&#45;2</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"316.78\" cy=\"-18\" rx=\"93.68\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"316.78\" y=\"-14.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">my&#45;folder/sub&#45;folder&#45;2</text>\n",
"</g>\n",
"<!-- my&#45;folder/sub&#45;folder&#45;1&#45;&gt;my&#45;folder/sub&#45;folder&#45;2 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>my&#45;folder/sub&#45;folder&#45;1&#45;&gt;my&#45;folder/sub&#45;folder&#45;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M187.75,-18C195.71,-18 203.78,-18 211.82,-18\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"211.72,-21.5 221.72,-18 211.72,-14.5 211.72,-21.5\"/>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.graphs.Digraph at 0x28ca7aca990>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"workflow.clear_all()\n",
"\n",
"#FOLDER\n",
"folder = Folder(\"my-folder\")\n",
"\n",
"#Subfolders\n",
"subFolder1 = SubFolder(\"sub-folder-1\")\n",
"folder.sub_folder_list.append(subFolder1)\n",
"subFolder2 = SubFolder(\"sub-folder-2\")\n",
"folder.sub_folder_list.append(subFolder2)\n",
"\n",
"workflow.add(folder)\n",
"workflow.connect(\"sub-folder-1\", \"sub-folder-2\",inpath=\"my-folder\")\n",
"\n",
"get_graph(workflow)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -834,7 +917,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.4 ('venv': venv)",
"display_name": "venv",
"language": "python",
"name": "python3"
},
Expand All @@ -848,14 +931,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.9"
"version": "3.12.6"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "e36608863334e111ac1975278d851976534d4d97e80edd449207481e04c86242"
}
}
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
Expand Down
8 changes: 8 additions & 0 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,14 @@ abbr, acronym {
cursor: help;
}

.translated {
background-color: rgba(207, 255, 207, 0.2)
}

.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}

/* -- code displays --------------------------------------------------------- */

pre {
Expand Down
13 changes: 5 additions & 8 deletions docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,9 @@ const Search = {
// perform the search on the required terms
searchTerms.forEach((word) => {
const files = [];
// find documents, if any, containing the query word in their text/title term indices
// use Object.hasOwnProperty to avoid mismatching against prototype properties
const arr = [
{ files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term },
{ files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title },
{ files: terms[word], score: Scorer.term },
{ files: titleTerms[word], score: Scorer.title },
];
// add support for partial matches
if (word.length > 2) {
Expand Down Expand Up @@ -549,9 +547,8 @@ const Search = {

// set score for the word in each file
recordFiles.forEach((file) => {
if (!scoreMap.has(file)) scoreMap.set(file, new Map());
const fileScores = scoreMap.get(file);
fileScores.set(word, record.score);
if (!scoreMap.has(file)) scoreMap.set(file, {});
scoreMap.get(file)[word] = record.score;
});
});

Expand Down Expand Up @@ -590,7 +587,7 @@ const Search = {
break;

// select one (max) score for the file.
const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w)));
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
// add result to the result list
results.push([
docNames[file],
Expand Down
Loading