Skip to content

Commit

Permalink
📝 [Doc] README: update example with latest feature, and upgrade to v1…
Browse files Browse the repository at this point in the history
….2.1
  • Loading branch information
Hansimov committed Nov 9, 2024
1 parent a16226d commit 1ce5d47
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,22 @@ def test_logbar_group():
epoch_bar.update(1, desc=f"[{epoch+1}/{epochs}]", flush=True)


def test_logbar_total():
total = 500

logbar = TCLogbar()
for i in range(total):
logbar.update(1)
time.sleep(0.001)
logbar.flush()
print()

logbar = TCLogbar(total=total)
for i in range(total + 250):
logbar.update(1)
time.sleep(0.01)


def test_decorations():
text = "Hello World"
logger.note(f"Brackets: {logstr.mesg(brk(text))}")
Expand All @@ -257,5 +273,6 @@ if __name__ == "__main__":
test_file_logger()
test_logbar()
test_logbar_group()
test_logbar_total()
test_decorations()
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "tclogger"
version = "1.2"
version = "1.2.1"
authors = [
{ name="Hansimov" },
]
Expand Down

0 comments on commit 1ce5d47

Please sign in to comment.