Skip to content

Commit

Permalink
commune
Browse files Browse the repository at this point in the history
  • Loading branch information
latentvector committed Jun 14, 2024
1 parent e940167 commit 8b62f6b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 2 additions & 3 deletions commune/module/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -6184,7 +6184,7 @@ def docker_compose_file(self, *args, **kwargs):


@classmethod
def enable_routes(cls, verbose=True):
def enable_routes(cls, verbose=False):
"""
This ties other modules into the current module.
The way it works is that it takes the module name and the function name and creates a partial function that is bound to the module.
Expand Down Expand Up @@ -6218,8 +6218,7 @@ def fn_generator(*args, fn, module, **kwargs):

t1 = c.time()

if verbose:
c.print(f'enabled routes in {t1-t0} seconds', verbose=verbose)
c.print(f'enabled routes in {t1-t0} seconds', verbose=verbose)
cls.routes_enabled = True


Expand Down
5 changes: 3 additions & 2 deletions commune/tree/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def tree(cls,
update = False,
max_age = None,
include_root = False,
verbose = True,
verbose = False,
cache = True,
save = True,
**kwargs
Expand Down Expand Up @@ -106,7 +106,8 @@ def tree(cls,
mode = 'build'
tree = cls.build_tree(path)
cls.tree_cache[cache_path] = {'data': tree, 'timestamp': timestamp}
cls.put(cache_path, tree)
if save: # we want to save the tree to storage
cls.put(cache_path, tree)

assert mode != None, 'Invalid mode'
if search != None:
Expand Down
10 changes: 10 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ To test it
```
pytest test
```


add your own tests to your repo


```
c server/test/test.py
```

```

0 comments on commit 8b62f6b

Please sign in to comment.