Skip to content

Commit

Permalink
fixed freezing and NSIS installer build
Browse files Browse the repository at this point in the history
  • Loading branch information
scullionw committed Aug 17, 2019
1 parent 87053ce commit 559b590
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 49 deletions.
3 changes: 3 additions & 0 deletions iracing_pace/credentials.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import keyring
import getpass
import keyring.backends.Windows

keyring.set_keyring(keyring.backends.Windows.WinVaultKeyring())

def query(namespace):
print("Username: ", end='')
Expand Down
3 changes: 2 additions & 1 deletion iracing_pace/gui/src/build/settings/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"app_name": "iracing-pace-gui",
"author": "scullionw",
"main_module": "src/main/python/main.py",
"version": "0.0.0"
"version": "0.0.0",
"hidden_imports": ["win32timezone"]
}
25 changes: 13 additions & 12 deletions iracing_pace/gui/src/main/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from iracing_pace import credentials
import sys
import os
from dataclasses import dataclass

def main():
appctxt = ApplicationContext()
Expand Down Expand Up @@ -206,18 +205,20 @@ def show_plot(self, config, results):



@dataclass
class WorkerConfig:
subsession: str
email: str
password: str
max_drivers: int
outlier_delta: int
yaxis_delta: int
interactive: bool
violin: bool
title: str
save_location: Path

def __init__(self, subsession, email, password, max_drivers, outlier_delta, yaxis_delta, interactive, violin, title, save_location):
self.subsession = subsession
self.email = email
self.password = password
self.max_drivers = max_drivers
self.outlier_delta = outlier_delta
self.yaxis_delta = yaxis_delta
self.interactive = interactive
self.violin = violin
self.title = title
self.save_location = save_location


class Worker(QThread):

Expand Down
10 changes: 5 additions & 5 deletions iracing_pace/lapswarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.ticker import (AutoMinorLocator, MultipleLocator, FuncFormatter)
import pendulum

class EmptyResults(Exception):
pass
Expand Down Expand Up @@ -51,10 +50,11 @@ def create_plot(self, title, violin=False, y_delta=None):
return ax

def format_laptime(t):
it = pendulum.duration(seconds=t)
minutes = it.minutes
seconds = it.remaining_seconds
milliseconds = it.microseconds // 1000
minutes, remaining_seconds = divmod(t, 60)
minutes = int(minutes)
seconds, fractional_seconds = divmod(remaining_seconds, 1)
seconds = int(seconds)
milliseconds = int(1000 * fractional_seconds)
return f"{minutes}:{seconds:02}.{milliseconds:03}"


Expand Down
50 changes: 24 additions & 26 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ description = ""
authors = ["scullionw <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.7"
requests = "^2.22"
python = "^3.6"
pandas = "^0.25.0"
seaborn = "^0.9.0"
iracing-web-api = { git = "https://github.com/scullionw/iracing-web-api.git" }
keyring = "^19.0"
# For freezing
fbs = "^0.8.3"
PyQt5 = "=5.9.2"
sip = "^4.19"
pywin32-ctypes = "^0.2.0"
pefile = "^2019.4"
iracing-web-api = { git = "https://github.com/scullionw/iracing-web-api.git" }
keyring = "^19.0"
pendulum = "^2.0"
pypiwin32 = "^223.0"
# To fix freezing incompatibility with 1.17.0
numpy = "=1.16.4"

[tool.poetry.dev-dependencies]
pytest = "^3.0"
Expand Down

0 comments on commit 559b590

Please sign in to comment.