update docs for release 0.8.0 (#1419)

### What problem does this PR solve?

update docs for release 0.8.0

### Type of change

- [x] Documentation Update

---------

Co-authored-by: writinwaters <93570324+writinwaters@users.noreply.github.com>
This commit is contained in:
KevinHuSh
2024-07-08 17:06:33 +08:00
committed by GitHub
parent fce3f6df8e
commit 593c20889d
9 changed files with 36 additions and 29 deletions

View File

@ -204,7 +204,8 @@ class Canvas(ABC):
cpn = self.get_component(cpn_id)
if not cpn["downstream"]: break
if self._find_loop(): raise OverflowError("Too much loops!")
loop = self._find_loop()
if loop: raise OverflowError(f"Too much loops: {loop}")
if cpn["obj"].component_name.lower() in ["switch", "categorize", "relevant"]:
switch_out = cpn["obj"].output()[1].iloc[0, 0]
@ -277,15 +278,18 @@ class Canvas(ABC):
if len(path) < 2: return False
for l in range(1, len(path) // 2):
for l in range(2, len(path) // 2):
pat = ",".join(path[0:l])
path_str = ",".join(path)
if len(pat) >= len(path_str): return False
path_str = path_str[len(pat):]
loop = max_loops
while path_str.find(pat) >= 0 and loop >= 0:
while path_str.find(pat) == 0 and loop >= 0:
loop -= 1
path_str = path_str[len(pat):]
if loop < 0: return True
if len(pat)+1 >= len(path_str):
return False
path_str = path_str[len(pat)+1:]
if loop < 0:
pat = " => ".join([p.split(":")[0] for p in path[0:l]])
return pat + " => " + pat
return False