-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54877a7
commit 346f511
Showing
22 changed files
with
11,914 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import os | ||
import sys | ||
import shutil | ||
import pdoc | ||
from pathlib import Path | ||
|
||
# Add the src directory to the Python path | ||
sys.path.insert(0, os.path.abspath('src')) | ||
|
||
def create_docs_folder(): | ||
if os.path.exists('docs'): | ||
shutil.rmtree('docs') | ||
os.makedirs('docs') | ||
|
||
def copy_non_python_files(src_dir, dest_dir): | ||
for root, dirs, files in os.walk(src_dir): | ||
for file in files: | ||
if not file.endswith('.py'): | ||
src_path = os.path.join(root, file) | ||
rel_path = os.path.relpath(src_path, src_dir) | ||
dest_path = os.path.join(dest_dir, rel_path) | ||
os.makedirs(os.path.dirname(dest_path), exist_ok=True) | ||
shutil.copy2(src_path, dest_path) | ||
|
||
def generate_documentation(): | ||
# Specify the modules to document | ||
modules = [ | ||
'Tee', | ||
'ExecCommandDialog', | ||
'Edge', | ||
'NodeLayout', | ||
'CustomGraphicsView', | ||
'MainWindow', | ||
'WorkFlow', | ||
'file_operations', | ||
'MapView', | ||
'NodeData', | ||
'Node', | ||
'frontend', | ||
'backend' | ||
] | ||
|
||
# Generate the documentation | ||
pdoc.pdoc(*modules, output_directory=Path('docs')) | ||
|
||
def generate_main_readme(): | ||
with open('docs/index.html', 'w') as f: | ||
f.write(""" | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>CrewAI-GUI Documentation</title> | ||
<style> | ||
body { font-family: Arial, sans-serif; line-height: 1.6; padding: 20px; } | ||
h1 { color: #333; } | ||
ul { padding-left: 20px; } | ||
li { margin-bottom: 10px; } | ||
a { color: #0066cc; text-decoration: none; } | ||
a:hover { text-decoration: underline; } | ||
</style> | ||
</head> | ||
<body> | ||
<h1>CrewAI-GUI Documentation</h1> | ||
<p>This documentation provides an overview of the CrewAI-GUI project structure and components.</p> | ||
<h2>Project Structure</h2> | ||
<ul> | ||
<li><a href="Tee.html">Tee</a></li> | ||
<li><a href="ExecCommandDialog.html">ExecCommandDialog</a></li> | ||
<li><a href="Edge.html">Edge</a></li> | ||
<li><a href="NodeLayout.html">NodeLayout</a></li> | ||
<li><a href="CustomGraphicsView.html">CustomGraphicsView</a></li> | ||
<li><a href="MainWindow.html">MainWindow</a></li> | ||
<li><a href="WorkFlow.html">WorkFlow</a></li> | ||
<li><a href="file_operations.html">file_operations</a></li> | ||
<li><a href="MapView.html">MapView</a></li> | ||
<li><a href="NodeData.html">NodeData</a></li> | ||
<li><a href="Node.html">Node</a></li> | ||
<li><a href="frontend.html">frontend</a></li> | ||
<li><a href="backend.html">backend</a></li> | ||
</ul> | ||
</body> | ||
</html> | ||
""") | ||
|
||
# Main execution | ||
if __name__ == "__main__": | ||
create_docs_folder() | ||
generate_documentation() | ||
generate_main_readme() | ||
copy_non_python_files('src', 'docs/src') | ||
copy_non_python_files('example', 'docs/example') | ||
shutil.copy2('CHANGELOG.md', 'docs/CHANGELOG.md') | ||
shutil.copy2('README.md', 'docs/project_README.md') | ||
print("Enhanced HTML documentation generated successfully in the 'docs' folder.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [0.4.3] - 2024-06-01 | ||
### Feature | ||
- hierarchical with task after topological sort | ||
- red when cursor on item | ||
|
||
### Fixed | ||
- cannot remove node | ||
- remove process, use default | ||
|
||
## [0.3.2] - 2024-05-31 | ||
### Feature | ||
- Make space + left drag to right click drag | ||
|
||
### Fixed | ||
- Fixed an issue with node read/write JSON causing duplicate node IDs. | ||
|
||
## [0.2.0] - 2024-05-31 | ||
### Fixed | ||
- Fixed some syntax errors. |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[OpenAI] | ||
api_key = sk-proj-<your_key> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
{ | ||
"nodes": [ | ||
{ | ||
"type": "Start", | ||
"uniq_id": "uniq_id_1", | ||
"pos_x": -1250.0, | ||
"pos_y": -829.0, | ||
"width": 177.0, | ||
"height": 74.0, | ||
"name": "Node", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "", | ||
"arg": "", | ||
"output_var": "", | ||
"nexts": [ | ||
"uniq_id_4", | ||
"uniq_id_3" | ||
], | ||
"prevs": [] | ||
}, | ||
{ | ||
"type": "Start", | ||
"uniq_id": "uniq_id_2", | ||
"pos_x": -1179.0, | ||
"pos_y": 7.0, | ||
"width": 168.0, | ||
"height": 89.0, | ||
"name": "Node", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "", | ||
"arg": "", | ||
"output_var": "", | ||
"nexts": [], | ||
"prevs": [] | ||
}, | ||
{ | ||
"type": "Task", | ||
"uniq_id": "uniq_id_3", | ||
"pos_x": -667.0, | ||
"pos_y": -988.0, | ||
"width": 269.0, | ||
"height": 346.0, | ||
"name": "Node", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "researcher", | ||
"description": "Write and save an article about game design using the FileWriter tool.", | ||
"expected_output": "A file named 'game_design_article.md' with the article content more than 1000 words.", | ||
"tool": "", | ||
"arg": "", | ||
"output_var": "", | ||
"nexts": [ | ||
"uniq_id_6", | ||
"uniq_id_5" | ||
], | ||
"prevs": [ | ||
"uniq_id_1" | ||
] | ||
}, | ||
{ | ||
"type": "Team", | ||
"uniq_id": "uniq_id_4", | ||
"pos_x": -1057.0, | ||
"pos_y": -570.0, | ||
"width": 194.0, | ||
"height": 136.0, | ||
"name": "Company", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "", | ||
"arg": "", | ||
"output_var": "", | ||
"nexts": [ | ||
"uniq_id_7", | ||
"uniq_id_8" | ||
], | ||
"prevs": [ | ||
"uniq_id_1" | ||
] | ||
}, | ||
{ | ||
"type": "Step", | ||
"uniq_id": "uniq_id_5", | ||
"pos_x": -310.0, | ||
"pos_y": -595.0, | ||
"width": 219.0, | ||
"height": 340.0, | ||
"name": "Node", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "FileWriterTool()", | ||
"arg": "{'filename': 'game_design_article.md', 'content': 'Detailed content generated by LLM about game design.'}", | ||
"output_var": "", | ||
"nexts": [], | ||
"prevs": [ | ||
"uniq_id_3" | ||
] | ||
}, | ||
{ | ||
"type": "Task", | ||
"uniq_id": "uniq_id_6", | ||
"pos_x": -124.0, | ||
"pos_y": -984.0, | ||
"width": 224.0, | ||
"height": 350.0, | ||
"name": "Node", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "seo_specialist", | ||
"description": "Read 'game_design_article.md' and convert it into an SEO-optimized article. Save it as 'seo_game_design_article.md'.", | ||
"expected_output": "define keywords. and out A file named 'seo_game_design_article.md' with the SEO-optimized content.", | ||
"tool": "", | ||
"arg": "", | ||
"output_var": "", | ||
"nexts": [ | ||
"uniq_id_9" | ||
], | ||
"prevs": [ | ||
"uniq_id_3" | ||
] | ||
}, | ||
{ | ||
"type": "Agent", | ||
"uniq_id": "uniq_id_7", | ||
"pos_x": -817.0, | ||
"pos_y": -404.0, | ||
"width": 201.0, | ||
"height": 409.0, | ||
"name": "researcher", | ||
"role": "Knowledge Article Writer", | ||
"goal": "Create and save detailed content on professional domains to a file.", | ||
"backstory": "Passionate about crafting in-depth articles on Game Design.", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "", | ||
"arg": "", | ||
"output_var": "", | ||
"nexts": [], | ||
"prevs": [ | ||
"uniq_id_4" | ||
] | ||
}, | ||
{ | ||
"type": "Agent", | ||
"uniq_id": "uniq_id_8", | ||
"pos_x": -609.0, | ||
"pos_y": -463.0, | ||
"width": 201.0, | ||
"height": 397.0, | ||
"name": "seo_specialist", | ||
"role": "SEO Specialist", | ||
"goal": "Optimize content for search engines.", | ||
"backstory": "An expert in SEO, focused on enhancing content visibility on search engines.", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "", | ||
"arg": "", | ||
"output_var": "", | ||
"nexts": [], | ||
"prevs": [ | ||
"uniq_id_4" | ||
] | ||
}, | ||
{ | ||
"type": "Step", | ||
"uniq_id": "uniq_id_9", | ||
"pos_x": 158.0, | ||
"pos_y": -622.0, | ||
"width": 211.0, | ||
"height": 336.0, | ||
"name": "Node", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "FileReadTool()", | ||
"arg": "{'filename': 'game_design_article.md'},", | ||
"output_var": "'original_content'", | ||
"nexts": [ | ||
"uniq_id_10" | ||
], | ||
"prevs": [ | ||
"uniq_id_6" | ||
] | ||
}, | ||
{ | ||
"type": "Step", | ||
"uniq_id": "uniq_id_10", | ||
"pos_x": 467.0, | ||
"pos_y": -616.0, | ||
"width": 206.0, | ||
"height": 348.0, | ||
"name": "Node", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "", | ||
"arg": "{'text': '{original_content}', 'task': 'Optimize this content for SEO'},", | ||
"output_var": "'seo_content'", | ||
"nexts": [ | ||
"uniq_id_11" | ||
], | ||
"prevs": [ | ||
"uniq_id_9" | ||
] | ||
}, | ||
{ | ||
"type": "Step", | ||
"uniq_id": "uniq_id_11", | ||
"pos_x": 737.0, | ||
"pos_y": -615.0, | ||
"width": 205.0, | ||
"height": 352.0, | ||
"name": "Node", | ||
"role": "", | ||
"goal": "", | ||
"backstory": "", | ||
"agent": "", | ||
"description": "", | ||
"expected_output": "", | ||
"tool": "FileWriterTool()", | ||
"arg": "{'filename': 'seo_game_design_article.md', 'content': '{seo_content}'}", | ||
"output_var": "", | ||
"nexts": [], | ||
"prevs": [ | ||
"uniq_id_10" | ||
] | ||
} | ||
], | ||
"node_counter": 12 | ||
} |
Oops, something went wrong.