-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare project for pip packaging (#45)
- use relative imports - use pkg_ressource for paths - move tests inside package - update setup.py - bump version
- Loading branch information
Showing
48 changed files
with
223 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,4 @@ jobs: | |
|
||
- name: Test with pytest | ||
run: | | ||
python -m pytest tests/unit/ | ||
python -m pytest labelCloud/tests/unit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
if __name__ == "__main__": | ||
|
||
import sys | ||
from labelCloud.__main__ import main | ||
|
||
sys.path.insert(0, "labelCloud") | ||
from labelCloud import app | ||
if __name__ == "__main__": | ||
|
||
app.run() | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.5.0" | ||
__version__ = "0.6.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,34 @@ | ||
import sys | ||
|
||
sys.path.insert(0, "labelCloud") | ||
from PyQt5.QtWidgets import QApplication, QDesktopWidget | ||
|
||
if __name__ == "__main__": | ||
import app | ||
|
||
app.run() | ||
from labelCloud.view.gui import GUI | ||
from labelCloud.control.controller import Controller | ||
|
||
|
||
def main(): | ||
app = QApplication(sys.argv) | ||
|
||
# Setup Model-View-Control structure | ||
control = Controller() | ||
view = GUI(control) | ||
|
||
# Install event filter to catch user interventions | ||
app.installEventFilter(view) | ||
|
||
# Start GUI | ||
view.show() | ||
|
||
app.setStyle("Fusion") | ||
desktop = QDesktopWidget().availableGeometry() | ||
width = (desktop.width() - view.width()) / 2 | ||
height = (desktop.height() - view.height()) / 2 | ||
view.move(width, height) | ||
|
||
print("Showing GUI...") | ||
sys.exit(app.exec_()) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .bbox import BBOX_EDGES, BBOX_SIDES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# order in which the bounding box edges are drawn | ||
BBOX_EDGES = [ | ||
(0, 1), | ||
(0, 3), | ||
(0, 4), | ||
(2, 1), | ||
(2, 3), | ||
(2, 6), | ||
(5, 1), | ||
(5, 4), | ||
(5, 6), | ||
(7, 3), | ||
(7, 4), | ||
(7, 6), | ||
] | ||
|
||
|
||
# vertices of each side | ||
BBOX_SIDES = { | ||
"top": [4, 5, 6, 7], | ||
"bottom": [0, 1, 2, 3], | ||
"right": [2, 3, 7, 6], | ||
"back": [0, 3, 7, 4], | ||
"left": [0, 1, 5, 4], | ||
"front": [1, 2, 6, 5], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.