Taylor Bockman
5 years ago
commit
dc77bff181
9 changed files with 467 additions and 0 deletions
@ -0,0 +1,176 @@
|
||||
# Byte-compiled / optimized / DLL files |
||||
__pycache__/ |
||||
*.py[cod] |
||||
*$py.class |
||||
|
||||
# C extensions |
||||
*.so |
||||
|
||||
# Distribution / packaging |
||||
.Python |
||||
build/ |
||||
develop-eggs/ |
||||
dist/ |
||||
downloads/ |
||||
eggs/ |
||||
.eggs/ |
||||
lib/ |
||||
lib64/ |
||||
parts/ |
||||
sdist/ |
||||
var/ |
||||
wheels/ |
||||
pip-wheel-metadata/ |
||||
share/python-wheels/ |
||||
*.egg-info/ |
||||
.installed.cfg |
||||
*.egg |
||||
MANIFEST |
||||
|
||||
# PyInstaller |
||||
# Usually these files are written by a python script from a template |
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it. |
||||
*.manifest |
||||
*.spec |
||||
|
||||
# Installer logs |
||||
pip-log.txt |
||||
pip-delete-this-directory.txt |
||||
|
||||
# Unit test / coverage reports |
||||
htmlcov/ |
||||
.tox/ |
||||
.nox/ |
||||
.coverage |
||||
.coverage.* |
||||
.cache |
||||
nosetests.xml |
||||
coverage.xml |
||||
*.cover |
||||
.hypothesis/ |
||||
.pytest_cache/ |
||||
|
||||
# Translations |
||||
*.mo |
||||
*.pot |
||||
|
||||
# Django stuff: |
||||
*.log |
||||
local_settings.py |
||||
db.sqlite3 |
||||
db.sqlite3-journal |
||||
|
||||
# Flask stuff: |
||||
instance/ |
||||
.webassets-cache |
||||
|
||||
# Scrapy stuff: |
||||
.scrapy |
||||
|
||||
# Sphinx documentation |
||||
docs/_build/ |
||||
|
||||
# PyBuilder |
||||
target/ |
||||
|
||||
# Jupyter Notebook |
||||
.ipynb_checkpoints |
||||
|
||||
# IPython |
||||
profile_default/ |
||||
ipython_config.py |
||||
|
||||
# pyenv |
||||
.python-version |
||||
|
||||
# pipenv |
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. |
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies |
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not |
||||
# install all needed dependencies. |
||||
#Pipfile.lock |
||||
|
||||
# celery beat schedule file |
||||
celerybeat-schedule |
||||
|
||||
# SageMath parsed files |
||||
*.sage.py |
||||
|
||||
# Environments |
||||
.env |
||||
.venv |
||||
env/ |
||||
venv/ |
||||
ENV/ |
||||
env.bak/ |
||||
venv.bak/ |
||||
|
||||
# Spyder project settings |
||||
.spyderproject |
||||
.spyproject |
||||
|
||||
# Rope project settings |
||||
.ropeproject |
||||
|
||||
# mkdocs documentation |
||||
/site |
||||
|
||||
# mypy |
||||
.mypy_cache/ |
||||
.dmypy.json |
||||
dmypy.json |
||||
|
||||
# Pyre type checker |
||||
.pyre/ |
||||
|
||||
|
||||
### Emacs |
||||
|
||||
# -*- mode: gitignore; -*- |
||||
*~ |
||||
\#*\# |
||||
/.emacs.desktop |
||||
/.emacs.desktop.lock |
||||
*.elc |
||||
auto-save-list |
||||
tramp |
||||
.\#* |
||||
|
||||
# Org-mode |
||||
.org-id-locations |
||||
*_archive |
||||
|
||||
# flymake-mode |
||||
*_flymake.* |
||||
|
||||
# eshell files |
||||
/eshell/history |
||||
/eshell/lastdir |
||||
|
||||
# elpa packages |
||||
/elpa/ |
||||
|
||||
# reftex files |
||||
*.rel |
||||
|
||||
# AUCTeX auto folder |
||||
/auto/ |
||||
|
||||
# cask packages |
||||
.cask/ |
||||
dist/ |
||||
|
||||
# Flycheck |
||||
flycheck_*.el |
||||
|
||||
# server auth directory |
||||
/server/ |
||||
|
||||
# projectiles files |
||||
.projectile |
||||
|
||||
# directory configuration |
||||
.dir-locals.el |
||||
|
||||
# network security |
||||
/network-security.data |
@ -0,0 +1,53 @@
|
||||
# Contributing to ClusterView |
||||
|
||||
## PR Requirements |
||||
|
||||
Before a PR is accepted it must pass the following requirements in CircleCI: |
||||
|
||||
- [ ] All tests must pass |
||||
- [ ] The code must be lint free as determined by `flake8` |
||||
|
||||
Additionally, any new code included in the PR must be tested fully. |
||||
|
||||
## Developer Requirements |
||||
|
||||
You will want to make sure that all developer requirements are installed. To |
||||
do this after creating a new `virtualenv` environment: |
||||
|
||||
|
||||
```sh |
||||
pip3 install -r requirements-dev.txt |
||||
``` |
||||
|
||||
This will install all normal requirements as well as testing requirements. |
||||
|
||||
## Linting |
||||
|
||||
We use `flake8` for linting. |
||||
|
||||
## Running Tests |
||||
|
||||
We use `pytest` as our testing framework. |
||||
|
||||
|
||||
TODO |
||||
|
||||
## Style |
||||
|
||||
### Import Organization |
||||
|
||||
Import organization is a critical part of good software engineering. In large |
||||
projects considerable time can be wasted looking for a specific import. |
||||
The imports must be organized as follows: |
||||
|
||||
```python |
||||
|
||||
# System imports first |
||||
|
||||
# Third party imports second |
||||
|
||||
# UNLV/ClusterView modules external to the current module third |
||||
|
||||
# Modules local to the current module last |
||||
``` |
||||
|
@ -0,0 +1,42 @@
|
||||
# ClusterView |
||||
|
||||
A project for viewing, manipulating, and learning clustering algorithms in Computational Geometry. |
||||
|
||||
|
||||
## Running |
||||
|
||||
First, make sure you have python installed. If not, follow the installation instructions for your |
||||
distribution. |
||||
|
||||
First: |
||||
|
||||
```sh |
||||
sudo pip3 install virtualenv |
||||
``` |
||||
|
||||
To make sure you have a working `virtualenv`. |
||||
|
||||
Now, start `virtualenv`: |
||||
|
||||
```sh |
||||
virtualenv venv |
||||
source venv/bin/activate |
||||
``` |
||||
|
||||
You should see `(venv)` prefixing your command line. |
||||
|
||||
Now, install the requirements: |
||||
|
||||
```sh |
||||
pip3 install -r requirements.txt |
||||
``` |
||||
|
||||
This will insure all pre-requisites are installed. You will need the [Qt Framework](https://www.qt.io/) installed as well. |
||||
|
||||
Finally, run: |
||||
|
||||
```sh |
||||
python3 clusterview.py |
||||
``` |
||||
|
||||
To start the software. |
@ -0,0 +1,17 @@
|
||||
import sys |
||||
|
||||
from PyQt5.QtWidgets import QApplication |
||||
|
||||
from main_window import MainWindow |
||||
|
||||
|
||||
def main(): |
||||
app = QApplication(sys.argv) |
||||
|
||||
window = MainWindow() |
||||
|
||||
sys.exit(app.exec_()) |
||||
|
||||
|
||||
if __name__ == '__main__': |
||||
main() |
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>MainWindow</class> |
||||
<widget class="QMainWindow" name="MainWindow"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>1280</width> |
||||
<height>720</height> |
||||
</rect> |
||||
</property> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>1280</width> |
||||
<height>720</height> |
||||
</size> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>ClusterView</string> |
||||
</property> |
||||
<widget class="QWidget" name="centralwidget"> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<widget class="QOpenGLWidget" name="opengl_widget"/> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QMenuBar" name="menubar"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>1280</width> |
||||
<height>28</height> |
||||
</rect> |
||||
</property> |
||||
<property name="nativeMenuBar"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<widget class="QMenu" name="menu_file"> |
||||
<property name="title"> |
||||
<string>File</string> |
||||
</property> |
||||
</widget> |
||||
<widget class="QMenu" name="menu_help"> |
||||
<property name="title"> |
||||
<string>Help</string> |
||||
</property> |
||||
</widget> |
||||
<addaction name="menu_file"/> |
||||
<addaction name="menu_help"/> |
||||
</widget> |
||||
<widget class="QStatusBar" name="status_bar"/> |
||||
<widget class="QToolBar" name="tool_bar"> |
||||
<property name="windowTitle"> |
||||
<string>toolBar</string> |
||||
</property> |
||||
<attribute name="toolBarArea"> |
||||
<enum>TopToolBarArea</enum> |
||||
</attribute> |
||||
<attribute name="toolBarBreak"> |
||||
<bool>false</bool> |
||||
</attribute> |
||||
<addaction name="action_add_points"/> |
||||
<addaction name="action_edit_points"/> |
||||
<addaction name="action_delete_points"/> |
||||
<addaction name="action_solve"/> |
||||
</widget> |
||||
<action name="action_add_points"> |
||||
<property name="text"> |
||||
<string>Add Points</string> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Enables point adding mode.</string> |
||||
</property> |
||||
<property name="shortcut"> |
||||
<string>Ctrl+A</string> |
||||
</property> |
||||
</action> |
||||
<action name="action_edit_points"> |
||||
<property name="text"> |
||||
<string>Edit Points</string> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Enables point editing mode.</string> |
||||
</property> |
||||
<property name="shortcut"> |
||||
<string>Ctrl+E</string> |
||||
</property> |
||||
</action> |
||||
<action name="action_delete_points"> |
||||
<property name="text"> |
||||
<string>Delete Points</string> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Enables point deletion mode.</string> |
||||
</property> |
||||
<property name="shortcut"> |
||||
<string>Ctrl+D</string> |
||||
</property> |
||||
</action> |
||||
<action name="action_solve"> |
||||
<property name="text"> |
||||
<string>Solve</string> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Opens the solve dialog to choose a solving solution.</string> |
||||
</property> |
||||
<property name="shortcut"> |
||||
<string>Ctrl+S</string> |
||||
</property> |
||||
</action> |
||||
</widget> |
||||
<resources/> |
||||
<connections/> |
||||
</ui> |
@ -0,0 +1,14 @@
|
||||
\title{ClusterView Documentation} |
||||
|
||||
Taylor Bockman <bockmant@unlv.nevada.edu> |
||||
|
||||
|
||||
|
||||
Right now this is just notes for things below: |
||||
|
||||
|
||||
All hotkeys (add, delete, edit, solve, etc) |
||||
|
||||
Overview of the various supported algorithms in the solve system. |
||||
|
||||
Etc |
@ -0,0 +1,26 @@
|
||||
import os |
||||
|
||||
from PyQt5 import QtWidgets, uic |
||||
|
||||
class MainWindow(QtWidgets.QMainWindow): |
||||
""" |
||||
A wrapper class for handling creating a window based |
||||
on a Qt Designer *.ui file. |
||||
""" |
||||
|
||||
# This file will always live in the root so we can yank |
||||
# the root directory from it's location safely. |
||||
__ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) |
||||
|
||||
__UI_FILE_NAME = "clusterview.ui" |
||||
|
||||
def __init__(self): |
||||
""" |
||||
Initializes and launches the UI in one shot. |
||||
""" |
||||
|
||||
# Assumption: The UI file will be in the project root. |
||||
|
||||
super(MainWindow, self).__init__() |
||||
uic.loadUi("{}/{}".format(self.__ROOT_DIR,self. __UI_FILE_NAME)) |
||||
self.show() |
@ -0,0 +1,16 @@
|
||||
backcall==0.1.0 |
||||
decorator==4.4.0 |
||||
ipython==7.7.0 |
||||
ipython-genutils==0.2.0 |
||||
jedi==0.14.1 |
||||
parso==0.5.1 |
||||
pexpect==4.7.0 |
||||
pickleshare==0.7.5 |
||||
prompt-toolkit==2.0.9 |
||||
ptyprocess==0.6.0 |
||||
Pygments==2.4.2 |
||||
PyQt5==5.13.0 |
||||
PyQt5-sip==4.19.18 |
||||
six==1.12.0 |
||||
traitlets==4.3.2 |
||||
wcwidth==0.1.7 |
Loading…
Reference in new issue