https://github.com/cabralpinto/trevis
Python library for visualizing recursive function calls in the console
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.3%) to scientific vocabulary
Repository
Python library for visualizing recursive function calls in the console
Basic Info
Statistics
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Trevis
Easily visualize recursive functions in the console.
```python from trevis import recursion
@recursion def fib(n: int) -> int: if n < 2: return n return fib(n - 1) + fib(n - 2)
fib(4)
python
output
fib(4) → 3 ├╴fib(3) → 2 │ ├╴fib(2) → 1 │ │ ├╴fib(1) → 1 │ │ └╴fib(0) → 0 │ └╴fib(1) → 1 └╴fib(2) → 1 ├╴fib(1) → 1 └╴fib(0) → 0 ```
Features
- 🕹️ Interactive mode: Review each function execution interactively, advancing to the next step by pressing Enter. This mode enhances comprehension and debugging by providing a clear visual representation of each step. Enable with
recursion(interactive=True). - 🌈 Syntax highlighting (upcoming): Enable syntax highlighting in the tree for improved readability. Coming in a future version.
Installation
Ensure you have Python 3.6 or higher, then install Trevis using pip:
bash
pip install trevis
Contribution
Contributions are welcome! Feel free to submit an issue or pull request.
License
Trevis is licensed under the MIT License.
Owner
- Name: João Cabral Pinto
- Login: cabralpinto
- Kind: user
- Repositories: 1
- Profile: https://github.com/cabralpinto
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Issues and Pull Requests
Last synced: 10 months ago
Packages
- Total packages: 1
-
Total downloads:
- pypi 14 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: trevis
trevis
- Documentation: https://trevis.readthedocs.io/
- License: MIT License
-
Latest release: 0.0.1
published almost 2 years ago