Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b489ee3
refactor: improve docstring formatting and add validation check in No…
srijanpatel Mar 14, 2025
8cf6aba
docs: refine docstring in get_node_types function for clarity
srijanpatel Mar 15, 2025
c5bb754
feat: enhance NodeRegistry to discover and register tool function nodes
srijanpatel Mar 15, 2025
897c04c
feat: update tool_function decorator to dynamically set class name an…
srijanpatel Mar 15, 2025
6d49ac7
fix: update module path retrieval in NodeRegistry to use project_root
srijanpatel Mar 15, 2025
2f6975c
feat: bind tool function class to module namespace and set module att…
srijanpatel Mar 15, 2025
b9d310b
fix: update docstrings in node_types.py for consistency in tense
srijanpatel Mar 15, 2025
cd85554
refactor: simplify tool function discovery to support only Python pac…
srijanpatel Mar 15, 2025
15ea741
feat: add default values for name, display_name, and category in Base…
srijanpatel Mar 15, 2025
a762c02
feat: create __init__.py file in project directory if it doesn't exist
srijanpatel Mar 15, 2025
8844250
refactor: move FunctionToolNode class outside
srijanpatel Mar 16, 2025
799c932
fix: cast return type of tool_function to ToolFunction for type safety
srijanpatel Mar 16, 2025
d0bf5e9
feat: introduce NodeInfo schema for node registration and enhance too…
srijanpatel Mar 16, 2025
88625e9
feat: add func_name attribute to ToolFunction for improved node ident…
srijanpatel Mar 16, 2025
d7f4f48
feat: enhance node_class property to support nested class attribute t…
srijanpatel Mar 16, 2025
346e4fe
refactor: update NodeFactory to use dot notation for accessing node a…
srijanpatel Mar 16, 2025
2ad77cc
fix: update config_model type to BaseNodeConfig for improved type con…
srijanpatel Mar 16, 2025
ea35a1b
Merge remote-tracking branch 'origin/main' into feat/custom-nodes-sup…
srijanpatel Mar 16, 2025
f5828dd
fix: change category type to Optional[str] for better flexibility
srijanpatel Mar 16, 2025
05c0a7b
fix: set default category to "Custom Tools" when registering tool fun…
srijanpatel Mar 16, 2025
931dcf1
feat: enhance MessageCard to support Markdown in messages
srijanpatel Mar 16, 2025
0b02eed
refactor: replace NodeInfo schema with NodeTypeSchema for improved co…
srijanpatel Mar 16, 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
Prev Previous commit
Next Next commit
feat: create __init__.py file in project directory if it doesn't exist
  • Loading branch information
srijanpatel committed Mar 15, 2025
commit a762c028e34838c2324eb4d6471a55ab3d66bb56
7 changes: 7 additions & 0 deletions backend/pyspur/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ def init(
f.write("\n# ================================")
f.write("\nPROJECT_ROOT=" + str(target_dir) + "\n")

# add __init__.py to the project directory
init_file_path = target_dir / "__init__.py"
if not init_file_path.exists():
with open(init_file_path, "w") as f:
f.write("# This is an empty __init__.py file")
print("[green]✓[/green] Created __init__.py")

custom_dirs = {
"data": target_dir / "data",
"tools": target_dir / "tools",
Expand Down