https://github.com/anty-filidor/tree-ranking
CLI app that analyses trees with good pythonic practices
https://github.com/anty-filidor/tree-ranking
design-patterns graphs networkx python software-engineering
Last synced: 3 months ago
JSON representation
CLI app that analyses trees with good pythonic practices
- Host: GitHub
- URL: https://github.com/anty-filidor/tree-ranking
- Owner: anty-filidor
- Created: 2021-09-02T19:09:31.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T19:16:10.000Z (over 3 years ago)
- Last Synced: 2025-01-01T19:44:32.092Z (5 months ago)
- Topics: design-patterns, graphs, networkx, python, software-engineering
- Language: Python
- Homepage:
- Size: 571 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tree Ranking
This repository contains implementation of task described in 'TASK.md'Author: Michał Czuba
Date: 16.08.2021## Manual
### Set up python environment
```
conda create -y --name tree_ranking python=3.8
conda activate tree_ranking
pip install -r requirements.txt
```In order to see visualisations please install graphviz library on your machine (use terminal):
* for MacOS: `brew install graphviz`,
* for Linux: `sudo apt-get install graphviz`,
* for Windows: just switch to Unix ;),
then uncomment lines 68-69 in src/tree.py.### Run the code
This command runs the solution: `python color_ranking.py --criteria --file `You can select criteria from following options: `subtree-count`, `subtree-maxdepth`, `subtree-average-value`.
Path to the file should be a string like: `examples/tree_02.csv`### Run tests
You can run tests via pre-commit (`pre-commit install`, `pre-commit run`) or with CLI (`python -m pytest -v src/tests`).