From 8b62f6b5b9063dc0ed3a6d6f09cc704109e59248 Mon Sep 17 00:00:00 2001 From: latentvector Date: Fri, 14 Jun 2024 16:39:46 -0400 Subject: [PATCH] commune --- commune/module/module.py | 5 ++--- commune/tree/tree.py | 5 +++-- test/README.md | 10 ++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/commune/module/module.py b/commune/module/module.py index 52d5caebb..b59609da6 100755 --- a/commune/module/module.py +++ b/commune/module/module.py @@ -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. @@ -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 diff --git a/commune/tree/tree.py b/commune/tree/tree.py index 07b85acd1..6c91d3488 100644 --- a/commune/tree/tree.py +++ b/commune/tree/tree.py @@ -74,7 +74,7 @@ def tree(cls, update = False, max_age = None, include_root = False, - verbose = True, + verbose = False, cache = True, save = True, **kwargs @@ -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: diff --git a/test/README.md b/test/README.md index 261bbdcd7..ba33dabd0 100644 --- a/test/README.md +++ b/test/README.md @@ -22,3 +22,13 @@ To test it ``` pytest test ``` + + +add your own tests to your repo + + +``` +c server/test/test.py +``` + +``` \ No newline at end of file