Skip to content

Commit cdb71ae

Browse files
Merge pull request #6 from UTAustin-SwarmLab/refactoring
Refactoring | Packaging
2 parents 8f8feb1 + 3a99f5a commit cdb71ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+823
-704
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,8 @@ dmypy.json
131131

132132
# customized
133133
.vscode/
134+
135+
# Images
136+
*.jpg
137+
*.jpeg
138+
*.png

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 UTAustin-SwarmLab
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
1-
# plotting_utils
2-
Please use these plotting utilities for all papers, plots in lab slides, etc. If you find errors or need a new utility, feel free to push new functions.
1+
# Swarm Visualizer
2+
This is a plotting visualizer packaged developed by UT Austin Swarm Lab. Please use these plotting package for all papers, plots in lab slides, etc. If you find errors or need a new utility, feel free to push new functions.
33

44
## Usage
5-
For example usage, see the code in the `examples` folder.
5+
For example usage, see the code in the `tests` folder. If you want to see example plots, run `pytest` in your terminal. All example plots will be available in `tests/example_plots`
66

7-
The plotting utilities are in the `plotting_utils` folder, which is a Python package. To use the plotting utilities, you must add the `plotting_utils` folder to your `PYTHONPATH`. For example, if you are using a bash shell, you can add the following line to your `.bashrc` file:
8-
```bash
9-
export PYTHONPATH=$PYTHONPATH:/path/to/plotting_utils
7+
8+
If you are a user:
9+
```
10+
Option 1:
11+
pip install git+https://github.com/UTAustin-SwarmLab/Swarm-Visualization
12+
13+
Option 2:
14+
pip install -e .
15+
```
16+
17+
If you are a developer:
18+
```
19+
python -m venv .venv
20+
source .venv/bin/activate
21+
python -m pip install --upgrade pip build
22+
python -m pip install --editable ."[dev, test]"
1023
```
11-
where `/path/to/plotting_utils` is the path to the `plotting_utils` folder on your machine.
12-
Then you can use the plotting utilities in your Python code as follows:
24+
Please make sure to write unit test for every method that you are developing.
25+
26+
Here's example import
27+
1328
```python
14-
from plotting_utils import *
29+
from swarm_visualizer.violinplot import plot_grouped_violinplot
30+
from swarm_visualizer.boxplot import plot_grouped_boxplot
31+
from swarm_visualizer.gridplot import plot_grid
1532
```
1633

create_examples.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.
-201 KB
Binary file not shown.
-215 KB
Binary file not shown.

example_plots/histograms/pdf.png

-365 KB
Binary file not shown.
-218 KB
Binary file not shown.
-247 KB
Binary file not shown.

example_plots/legends/legend.png

-26.4 KB
Binary file not shown.
-345 KB
Binary file not shown.
-631 KB
Binary file not shown.
-326 KB
Binary file not shown.
-295 KB
Binary file not shown.
-435 KB
Binary file not shown.
-522 KB
Binary file not shown.

examples/boxplot_examples.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

examples/histogram_examples.py

Lines changed: 0 additions & 108 deletions
This file was deleted.

examples/legend_examples.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)