Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Commit

Permalink
dev: add test case for .tree.yml (file sections)
Browse files Browse the repository at this point in the history
  • Loading branch information
doomspec committed Oct 9, 2023
1 parent da07d0f commit 5267e53
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc_in_py/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def extract_module_tree_without_comment(module, root_path):
member_path = inspect.getfile(member)
except:
continue
if not member_path.startswith(root_path):
if member_path != root_path:
continue
true_members.append(member)
true_member_names.append(name)
Expand Down
10 changes: 10 additions & 0 deletions doc_in_py/test/testing_module_multi/.tree.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sections:
first section:
- a
- b
second section:
- c
- another section:
- d
- e
default section: other section
1 change: 1 addition & 0 deletions doc_in_py/test/testing_module_multi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .a import A
2 changes: 2 additions & 0 deletions doc_in_py/test/testing_module_multi/a.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class A:
pass
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
6 changes: 6 additions & 0 deletions evonote/.tree.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sections:
core:
- notetree
- indexing
- file_helper
- model
2 changes: 1 addition & 1 deletion evonote/notetree/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def analyze_notetree_sparsity(notetree: Tree):
print("Content:", note.content)
print("")

def get_children_heavy_notes(notetree: Tree, min_children=10):
def get_children_heavy_notes(notetree: Tree, min_children=8):
"""
Return a list of notes with at least min_children children.
"""
Expand Down

0 comments on commit 5267e53

Please sign in to comment.