Skip to content

Commit 9dca736

Browse files
committed
remove all d3 implication in docstring
1 parent 985d887 commit 9dca736

File tree

6 files changed

+21
-19
lines changed

6 files changed

+21
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Python Version](https://img.shields.io/pypi/pyversions/designer-plugin.svg)](https://pypi.org/project/designer-plugin/)
66
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
77

8-
A Python library for creating and managing plugins for Disguise Designer. This library provides:
8+
A Python library for creating and managing plugins for [Disguise Designer]( https://www.disguise.one/en/products/designer). This library provides:
99
- DNS-SD service publishing for plugin discovery
1010
- Remote Python execution on Designer instances
1111
- Multiple execution patterns (Client API, Functional API)

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ classifiers = [
2424
"Operating System :: OS Independent"
2525
]
2626
readme = "README.md"
27+
license = "MIT"
2728

2829
[tool.setuptools.package-data]
2930
designer_plugin = ["py.typed"]
@@ -33,6 +34,7 @@ where = ["src"]
3334

3435
[project.urls]
3536
Homepage = "https://github.com/disguise-one/python-plugin"
37+
Documentation = "https://developer.disguise.one/plugins/python-execution-api/"
3638
Issues = "https://github.com/disguise-one/python-plugin/issues"
3739

3840
# Package development

src/designer_plugin/d3sdk/ast_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def filter_base_classes(class_node: ast.ClassDef) -> None:
5050
"""Remove all base classes from a class definition for Python 2.7 compatibility.
5151
5252
This function modifies the class_node in-place by clearing its base class list.
53-
Inheritance is not supported in the current D3 Designer plugin system.
53+
Inheritance is not supported in the current Designer plugin system.
5454
5555
Args:
5656
class_node: The class definition node to process
@@ -368,7 +368,7 @@ def find_packages_in_current_file(caller_stack: int = 1) -> list[str]:
368368
369369
This function walks up the call stack to find the module where it was called from,
370370
then parses that module's source code to extract all import statements that are
371-
compatible with Python 2.7 and safe to send to D3 Designer.
371+
compatible with Python 2.7 and safe to send to Designer.
372372
373373
Args:
374374
caller_stack: Number of frames to go up the call stack. Default is 1 (immediate caller).

src/designer_plugin/d3sdk/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def __new__(cls, name: str, bases: tuple[type, ...], attrs: dict[str, Any]) -> t
259259
convert_class_to_py27(class_node)
260260
attrs["source_code_py27"] = f"{ast.unparse(class_node)}"
261261

262-
# Wrap all user-defined public methods to execute remotely via D3 API
262+
# Wrap all user-defined public methods to execute remotely via Designer API
263263
# Skip internal framework methods
264264
for attr_name, attr_value in attrs.items():
265265
if callable(attr_value) and not attr_name.startswith("__"):

src/designer_plugin/d3sdk/function.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __init__(self, func: Callable[P, T]):
130130
"""Initialise a D3PythonScript wrapper around a Python function.
131131
132132
Args:
133-
func: The Python function to wrap for D3 execution.
133+
func: The Python function to wrap for execution within Designer.
134134
"""
135135
self._function: Callable[P, T] = func
136136
self._function_info: FunctionInfo = extract_function_info(func)
@@ -246,7 +246,7 @@ def __init__(self, module_name: str, func: Callable[P, T]):
246246
247247
Args:
248248
module_name: Name of the module to register this function under.
249-
func: The Python function to wrap for D3 execution.
249+
func: The Python function to wrap for execution in Designer.
250250
"""
251251
# Add this function into available_d3_functions
252252
self._module_name: str = module_name
@@ -371,10 +371,10 @@ def payload(self, *args: P.args, **kwargs: P.kwargs) -> PluginPayload[T]:
371371
###############################################################################
372372
# d3function API
373373
def d3pythonscript(func: Callable[P, T]) -> D3PythonScript[P, T]:
374-
"""Decorator to wrap a Python function for standalone D3 Designer script execution.
374+
"""Decorator to wrap a Python function for standalone Designer script execution.
375375
376376
This decorator transforms a regular Python function into a D3PythonScript that generates
377-
execution payloads for direct script execution in D3 Designer. Unlike @d3function, this
377+
execution payloads for direct script execution in Designer. Unlike @d3function, this
378378
decorator does not register the function as a module and is intended for one-off script
379379
execution where the function body is inlined with the arguments.
380380
@@ -405,10 +405,10 @@ def my_add(a: int, b: int) -> int:
405405

406406
# Actual implementation
407407
def d3function(module_name: str = "") -> Callable[[Callable[P, T]], D3Function[P, T]]:
408-
"""Decorator to wrap a Python function for D3 Designer module registration and execution.
408+
"""Decorator to wrap a Python function for Designer module registration and execution.
409409
410410
This decorator transforms a regular Python function into a D3Function that can be registered
411-
as a reusable module in D3 Designer and executed remotely. The decorated function is added to
411+
as a reusable module in Designer and executed remotely. The decorated function is added to
412412
the module's function registry and can be called by name after module registration.
413413
414414
Unlike @d3pythonscript which inlines the function body, @d3function registers the complete
@@ -448,15 +448,15 @@ def decorator(func: Callable[P, T]) -> D3Function[P, T]:
448448

449449

450450
def add_packages_in_current_file(module_name: str) -> None:
451-
"""Add all import statements from the caller's file to a D3 module's package list.
451+
"""Add all import statements from the caller's file to a d3function module's package list.
452452
453453
This function scans the calling file's import statements and registers them with
454454
the specified module name, making those imports available when the module is
455455
registered with Designer. This is useful for ensuring all dependencies are included
456-
when deploying Python functions to D3 Designer.
456+
when deploying Python functions to Designer.
457457
458458
Args:
459-
module_name: The name of the D3 module to associate the packages with.
459+
module_name: The name of the d3function module to associate the packages with.
460460
Must match the module_name used in @d3function decorator.
461461
462462
Example:
@@ -483,7 +483,7 @@ def get_register_payload(module_name: str) -> RegisterPayload | None:
483483
module_name: The name of the module to get the payload for.
484484
485485
Returns:
486-
RegisterPayload for the module, or None if the module has no registered functions.
486+
RegisterPayload for the module, or None if the module has no registered d3function.
487487
"""
488488
return D3Function.get_module_register_payload(module_name)
489489

@@ -492,7 +492,7 @@ def get_all_d3functions() -> list[tuple[str, str]]:
492492
"""Retrieve all available d3function as module_name-function_name pairs.
493493
494494
Returns:
495-
List of tuples containing (module_name, function_name) for all registered D3 functions.
495+
List of tuples containing (module_name, function_name) for all registered d3function.
496496
"""
497497
module_function_pairs: list[tuple[str, str]] = []
498498
for module_name, funcs in D3Function._available_d3functions.items():
@@ -506,6 +506,6 @@ def get_all_modules() -> list[str]:
506506
"""Retrieve names of all modules registered with @d3function decorator.
507507
508508
Returns:
509-
List of module names that have registered D3 functions.
509+
List of module names that have registered d3function.
510510
"""
511511
return list(D3Function._available_d3functions.keys())

src/designer_plugin/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ class PluginResponse(BaseModel, Generic[RetType]):
4848
status: PluginStatus = Field(description="Status of plugin API call.")
4949
d3Log: str | None = Field(
5050
default=None,
51-
description="The D3 log field captures the console log for the time the Python script is executing, recording any output generated by running a Python command, including the time taken to execute the Python command. As this captures the Designer console output, it is possible other threads may write to this output during this period causing additional irrelevant output.",
51+
description="The d3Log field captures the Designer console log for the time the Python script is executing, recording any output generated by running a Python command, including the time taken to execute the Python command. As this captures the Designer console output, it is possible other threads may write to this output during this period causing additional irrelevant output.",
5252
)
5353
pythonLog: str | None = Field(
5454
default=None,
55-
description="This output field is the pure Python output, recording any print statements or warnings occurring during the execution of the script. This output will also appear in the d3Log field, however, it may be mixed with other application output.",
55+
description="This output field is the pure Python output, recording any print statements or warnings that occur during the execution of the script. This output will also appear in the d3Log field. However, in the d3Log field it will be mixed with other Designer log output.",
5656
)
5757
returnValue: RetType = Field(description="Return value of python plugin execution")
5858

@@ -112,7 +112,7 @@ class PluginException(Exception):
112112
113113
Attributes:
114114
status: The status information from the failed plugin call
115-
d3Log: D3 Designer console log output
115+
d3Log: Designer console log output
116116
pythonLog: Python-specific log output
117117
"""
118118

0 commit comments

Comments
 (0)