Skip to content

Commit 8f62c5f

Browse files
committed
Document all classes in the project.
1 parent 03f3784 commit 8f62c5f

17 files changed

Lines changed: 82 additions & 14 deletions

File tree

solid_node/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
]
1010

1111
def manage():
12+
"""
13+
Runs cli commands, available in managers.* namespace
14+
"""
1215
parser = argparse.ArgumentParser(description='Solid Node')
1316

1417
parser.add_argument(

solid_node/core/broker.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919

2020
class BrokerServer:
21-
22-
# This is not being used, because it does not work for the builder.
23-
# But for the assistant it probably will, so it was kept
21+
"""The broker is a persistent webserver process that
22+
implements locking to synchronize other processes and
23+
topics to exchange messages.
24+
"""
2425
topics = []
2526

2627
keys = [

solid_node/core/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class Builder(FileSystemEventHandler):
20-
"""Monitors .py files and generate STLs, and exit on any change"""
20+
"""Monitors .py files. On any change, generate STLs and exit"""
2121
def __init__(self, path):
2222
super().__init__()
2323
self.path = path

solid_node/core/git.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010

1111
class GitRepo:
12+
"""Manages a git repository for user's project. Every time
13+
user saves a file, the repository is commited, and if the
14+
build fails, it's rolled back."""
1215
def __init__(self, file_path):
1316
self.repo = _find_repo_root(file_path)
1417
self._lock = None

solid_node/exceptions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"""This is only being used by node/spatial.py, which is
2+
not being used. In quarantine too."""
3+
14
class MeshNotRendered(Exception):
25
pass
36

solid_node/manager/develop.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525

2626

2727
class Develop:
28-
"""Monitor filesystem and executes transpilations and compilations on background"""
28+
"""Runs all processes required for developing with solid-node.
29+
Monitors filesystem and executes transpilations and compilations on background,
30+
and runs servers to support a web frontend
31+
"""
2932

3033
def add_arguments(self, parser):
3134
parser.add_argument('--web', action='store_true',

solid_node/manager/test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
from solid_node.test import TestCase
99

1010
class Test:
11-
"""Run a node's tests"""
11+
"""Nodes may implement tests by inheriting solid_node.test.TestCaseMixin
12+
and creating test methods starting with test_.
13+
This command runs Run all tests from a node"""
1214

1315
def __init__(self):
1416
self.num_tests = 0

solid_node/node/assembly.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
class AssemblyNode(InternalNode):
66
"""
77
Represents a collection of components that can be moved relative to each other.
8-
98
This is an internal node that can contain instances of LeafNode or other internal nodes.
10-
119
The render method of this class returns a list of its child nodes.
1210
"""
1311

solid_node/node/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ def _build_uniq_id(args, kwargs):
2424
return ','.join(str(a) for a in all_args)
2525

2626
class AbstractBaseNode:
27+
"""A mechanical project in solid-node is represented by a
28+
tree, and this is the abstract base class for all nodes.
29+
Above this class, there are two other base classes:
30+
LeafNode and InternalNode.
31+
"""
2732

2833
fn = None
2934

solid_node/node/fusion.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
class FusionNode(InternalNode):
55
"""
66
Represents a fusion of components into a single, inseparable unit.
7-
87
This is an internal node that can contain instances of LeafNode or other internal nodes.
9-
108
The render method of this class returns a list of its child nodes.
119
"""
1210

0 commit comments

Comments
 (0)