Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Aug 16, 2023
1 parent 6c9b19a commit f926c35
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 112 deletions.
46 changes: 0 additions & 46 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/documentation.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/feature_request.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
interval: "monthly"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "monthly"
9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[build-system]
build-backend = 'mesonpy'
requires = ['meson-python', "wheel", "ninja", "pybind11", "numpy"]
# requires = ["setuptools", "wheel", "pybind11", "numpy"]
# build-backend = "setuptools.build_meta"

[project]
name = "simplextree"
Expand Down Expand Up @@ -38,7 +36,6 @@ dev = [
"black>=23.0,<24.0",
"isort>=5.12,<5.13",
"pytest",
"pytest-sphinx",
"pytest-cov",
"twine>=1.11.0",
"build",
Expand All @@ -64,10 +61,10 @@ include-package-data = true
simplextree = ["py.typed"]

[tool.setuptools.dynamic]
version = {attr = "simplextree.VERSION"}
version = { attr = "simplextree.VERSION" }

[tool.black]
line-length = 100
line-length = 180
include = '\.pyi?$'
exclude = '''
(
Expand All @@ -91,7 +88,7 @@ multi_line_output = 3
reportPrivateImportUsage = false

[tool.ruff]
line-length = 115
line-length = 140
target-version = "py39"

[tool.ruff.per-file-ignores]
Expand Down
22 changes: 11 additions & 11 deletions src/simplextree/SimplexTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,20 @@ def traverse(self, order: str = "preorder", f: Callable = print, sigma: Collecti
Supported traversals:
- breadth-first / level order ("bfs", "levelorder")
- depth-first / prefix ("dfs", "preorder")
- faces ("faces")
- cofaces ("cofaces")
- coface roots
- faces
- cofaces
- coface roots ("coface_roots")
- p-skeleton
- p-simplices
- maximal simplices
- maximal simplices ("maximal")
- link
To select one of these options, set order to one of ["bfs", "levelorder", "dfs", "preorder"]
Parameters:
order : the type of traversal to do
f : a function to evaluate on every simplex in the traversal. Defaults to print.
sigma : simplex to start the traversal at, where applicable. Defaults to the root node (empty set)
p : dimension of simplices to restrict to, where applicable.
order: the type of traversal of the simplex tree to execute.
f: a function to evaluate on every simplex in the traversal. Defaults to print.
sigma: simplex to start the traversal at, where applicable. Defaults to the root node (empty set).
p: dimension of simplices to restrict to, where applicable. Defaults to 0.
"""
# todo: handle kwargs
assert isinstance(order, str)
Expand Down Expand Up @@ -253,9 +253,9 @@ def simplices(self, p: int = None) -> Iterable[Collection]:
self._traverse(6, lambda s: F.append(s), [], p) # order, f, init, k
return F

def faces(self, p: int = None, **kwargs) -> Iterable[Collection]:
def faces(self, p: int = None, sigma: Collection = [], **kwargs) -> Iterable[Collection]:
"""Wrapper for simplices function."""
return self.simplices(p)
return self.skeleton(p, sigma)

def maximal(self) -> Iterable[Collection]:
"""Returns the maximal simplices in the complex."""
Expand All @@ -279,7 +279,7 @@ def expand(self, k: int) -> None:
Examples:
from splex import SimplexTree
from simplextree import SimplexTree
from itertools import combinations
st = SimplexTree(combinations(range(8), 2))
print(st)
Expand Down

0 comments on commit f926c35

Please sign in to comment.