Skip to content
Permalink
Browse files

Merge pull request #126 from Pyfa-fit/development

2017.06.08
  • Loading branch information...
Ebag333 committed Jun 9, 2017
2 parents 2ab231d + 8058039 commit 317eaffd7e371f7dda8a4ab1abde0ca7e0fd3192
Showing with 1,025 additions and 483 deletions.
  1. +18 −13 .travis.yml
  2. +1 −1 config.py
  3. +11 −3 dist_assets/mac/pyfa.spec
  4. +11 −3 dist_assets/mac/pyfa_debug.spec
  5. +9 −2 eos/db/saveddata/queries.py
  6. +2 −2 eos/graph/fitDps.py
  7. +2 −2 eos/saveddata/fit.py
  8. +2 −1 gui/PFListPane.py
  9. +6 −3 gui/PFSearchBox.py
  10. +3 −0 gui/additionsPane.py
  11. +4 −1 gui/boosterView.py
  12. +1 −0 gui/builtinPreferenceViews/__init__.py
  13. +1 −1 gui/builtinPreferenceViews/dummyView.py
  14. +2 −2 gui/builtinPreferenceViews/pyfaContextMenuPreferences.py
  15. +1 −1 gui/builtinPreferenceViews/pyfaCrestPreferences.py
  16. +13 −11 gui/builtinPreferenceViews/pyfaDatabasePreferences.py
  17. +5 −6 gui/builtinPreferenceViews/pyfaEnginePreferences.py
  18. +6 −6 gui/builtinPreferenceViews/pyfaGaugePreferences.py
  19. +192 −0 gui/builtinPreferenceViews/pyfaGeneral2Preferences.py
  20. +7 −69 gui/builtinPreferenceViews/pyfaGeneralPreferences.py
  21. +1 −1 gui/builtinPreferenceViews/pyfaHTMLExportPreferences.py
  22. +1 −1 gui/builtinPreferenceViews/pyfaLoggingPreferences.py
  23. +1 −1 gui/builtinPreferenceViews/pyfaNetworkPreferences.py
  24. +1 −1 gui/builtinPreferenceViews/pyfaStatViewPreferences.py
  25. +1 −1 gui/builtinPreferenceViews/pyfaUpdatePreferences.py
  26. +9 −4 gui/builtinStatsViews/firepowerViewFull.py
  27. +14 −3 gui/builtinStatsViews/rechargeViewFull.py
  28. +3 −3 gui/builtinStatsViews/rechargeViewMinimal.py
  29. +17 −6 gui/builtinStatsViews/resistancesViewFull.py
  30. +12 −6 gui/builtinStatsViews/resistancesViewMinimal.py
  31. +19 −8 gui/builtinStatsViews/resourcesViewFull.py
  32. +8 −0 gui/builtinViewColumns/baseName.py
  33. +4 −4 gui/builtinViews/emptyView.py
  34. +13 −0 gui/builtinViews/entityEditor.py
  35. +17 −11 gui/builtinViews/fittingView.py
  36. +6 −3 gui/builtinViews/implantEditor.py
  37. +6 −2 gui/cargoView.py
  38. +22 −4 gui/characterEditor.py
  39. +1 −1 gui/characterSelection.py
  40. +29 −8 gui/chromeTabs.py
  41. +6 −2 gui/commandView.py
  42. +10 −4 gui/crestFittings.py
  43. +3 −1 gui/display.py
  44. +6 −2 gui/droneView.py
  45. +19 −5 gui/errorDialog.py
  46. +7 −4 gui/fighterView.py
  47. +20 −7 gui/graphFrame.py
  48. +19 −8 gui/itemStats.py
  49. +89 −50 gui/mainFrame.py
  50. +8 −1 gui/marketBrowser.py
  51. +3 −1 gui/multiSwitch.py
  52. +13 −2 gui/patternEditor.py
  53. +30 −10 gui/preferenceDialog.py
  54. +1 −0 gui/preferenceView.py
  55. +11 −2 gui/projectedView.py
  56. +19 −2 gui/propertyEditor.py
  57. +6 −3 gui/pyfatogglepanel.py
  58. +1 −1 gui/pygauge.py
  59. +20 −23 gui/recentShipBrowser.py
  60. +7 −4 gui/resistsEditor.py
  61. +17 −2 gui/setEditor.py
  62. +2 −1 gui/sfBrowserItem.py
  63. +31 −35 gui/shipBrowser.py
  64. +3 −1 gui/statsPane.py
  65. +2 −2 gui/updateDialog.py
  66. +12 −10 gui/utils/{exportHtml.py → ExportHtml.py}
  67. +8 −8 gui/utils/animUtils.py
  68. +2 −1 gui/utils/colorUtils.py
  69. +1 −0 gui/utils/drawUtils.py
  70. +6 −6 gui/utils/floatspin.py
  71. +0 −74 gui/utils/fonts.py
  72. +128 −1 gui/utils/helpers_wxPython.py
  73. +12 −3 pyfa.py
  74. +2 −0 requirements_build.txt
  75. +3 −2 service/fit.py
  76. +1 −1 service/market.py
  77. +15 −9 service/settings.py
@@ -27,11 +27,16 @@ before_install:
sudo apt-get install fonts-cantarell lmodern ttf-aenigma ttf-georgewilliams ttf-bitstream-vera ttf-sjfonts ttf-tuffy tv-fonts;
sudo apt-get install ubuntustudio-font-meta;
sudo apt-get update && sudo apt-get --reinstall install -qq language-pack-en language-pack-ru language-pack-he language-pack-zh-hans;
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install graphviz;
# Disabling brew for now to try and trim down build time
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# brew update;
# brew install graphviz;
# fi

# Conda Install
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
@@ -42,10 +47,17 @@ before_install:
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# - conda info -a

install:
# install wxPython 3.0.0.0
- conda install -c https://conda.anaconda.org/travis wxpython
# - conda install -c https://conda.anaconda.org/travis wxpython
- conda install -c anaconda wxpython=3.0.0.0
# Not sure why this only works on OS X, but it fixes an issue with matplotlib
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
conda install matplotlib;
fi

before_script:
- pip install -r requirements.txt
- pip install -r requirements_test.txt
@@ -67,13 +79,6 @@ after_success:
cp $TRAVIS_BUILD_DIR/dist_assets/mac/pyfa.spec $TRAVIS_BUILD_DIR/pyfa.spec;
cp $TRAVIS_BUILD_DIR/dist_assets/mac/pyfa_debug.spec $TRAVIS_BUILD_DIR/pyfa_debug.spec;
fi
- ls $TRAVIS_BUILD_DIR
- if [[ "$TRAVIS_OS_NAME" == "mac" ]]; then
cp ~/dist_assets/mac/pyfa.spec ~/pyfa.spec;
cp ~/dist_assets/mac/pyfa_debug.spec ~/pyfa_debug.spec;
fi
- ls $TRAVIS_BUILD_DIR
- ls $TRAVIS_BUILD_DIR/dist_assets/mac/

# Run build
- cd $TRAVIS_BUILD_DIR
@@ -25,7 +25,7 @@
saveInRoot = False

# Version data
version = "2017.05.27"
version = "2017.06.08"
if hasattr(sys, 'frozen'):
tag = ""
else:
@@ -11,6 +11,9 @@
# pathex=['C:\\Users\\Ebag333\\Documents\\GitHub\\Ebag333\\Pyfa'],

import os
import sys

sys.path.append(os.path.realpath(os.getcwd()))

block_cipher = None

@@ -38,6 +41,11 @@ for root, folders, files in os.walk("eos/effects"):
)
import_these.append(mod_name)

excluded_modules = [
'setup',
'setup-osx',
]

a = Analysis(
['pyfa.py'],
pathex=['$TRAVIS_BUILD_DIR'],
@@ -46,7 +54,7 @@ a = Analysis(
hiddenimports=import_these,
hookspath=[],
runtime_hooks=[],
excludes=[],
excludes=excluded_modules,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
@@ -64,7 +72,7 @@ exe = EXE(pyz,
debug=False,
console=False,
strip=False,
upx=True,
upx=False,
name='pyfa',
icon='dist_assets/mac/pyfa.icns',
onefile=False,
@@ -76,7 +84,7 @@ coll = COLLECT(
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx=False,
onefile=False,
name='pyfa',
icon='dist_assets/mac/pyfa.icns',
@@ -11,6 +11,9 @@
# pathex=['C:\\Users\\Ebag333\\Documents\\GitHub\\Ebag333\\Pyfa'],

import os
import sys

sys.path.append(os.path.realpath(os.getcwd()))

block_cipher = None

@@ -38,6 +41,11 @@ for root, folders, files in os.walk("eos/effects"):
)
import_these.append(mod_name)

excluded_modules = [
'setup',
'setup-osx',
]

a = Analysis(
['pyfa.py'],
pathex=['$TRAVIS_BUILD_DIR'],
@@ -46,7 +54,7 @@ a = Analysis(
hiddenimports=import_these,
hookspath=[],
runtime_hooks=[],
excludes=[],
excludes=excluded_modules,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
@@ -64,7 +72,7 @@ exe = EXE(pyz,
debug=True,
console=True,
strip=False,
upx=True,
upx=False,
name='pyfa_debug',
icon='dist_assets/mac/pyfa.icns',
onefile=False,
@@ -76,7 +84,7 @@ coll = COLLECT(
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx=False,
onefile=False,
name='pyfa_debug',
icon='dist_assets/mac/pyfa.icns',
@@ -17,6 +17,8 @@
# along with eos. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================

import sys

from sqlalchemy.sql import and_
from sqlalchemy import desc, select

@@ -541,5 +543,10 @@ def remove(stuff):

def commit():
with sd_lock:
saveddata_session.commit()
saveddata_session.flush()
try:
saveddata_session.commit()
saveddata_session.flush()
except Exception:
saveddata_session.rollback()
exc_info = sys.exc_info()
raise exc_info[0], exc_info[1], exc_info[2]
@@ -47,11 +47,11 @@ def calcDps(self, data):

for mod in fit.modules:
if not mod.isEmpty and mod.state >= State.ACTIVE:
if "remoteTargetPaintFalloff" in mod.item.effects:
if "remoteTargetPaintFalloff" in mod.item.effects or "structureModuleEffectTargetPainter" in mod.item.effects:
ew['signatureRadius'].append(
1 + (mod.getModifiedItemAttr("signatureRadiusBonus") / 100) * self.calculateModuleMultiplier(
mod, data))
if "remoteWebifierFalloff" in mod.item.effects:
if "remoteWebifierFalloff" in mod.item.effects or "structureModuleEffectStasisWebifier" in mod.item.effects:
if distance <= mod.getModifiedItemAttr("maxRange"):
ew['velocity'].append(1 + (mod.getModifiedItemAttr("speedFactor") / 100))
elif mod.getModifiedItemAttr("falloffEffectiveness") > 0:
@@ -495,7 +495,7 @@ def __runCommandBoosts(self, runTime="normal"):

if warfareBuffID == 10: # Shield Burst: Shield Harmonizing: Shield Resistance
for damageType in ("Em", "Explosive", "Thermal", "Kinetic"):
self.ship.boostItemAttr("shield%sDamageResonance" % damageType, value)
self.ship.boostItemAttr("shield%sDamageResonance" % damageType, value, stackingPenalties=True)

if warfareBuffID == 11: # Shield Burst: Active Shielding: Repair Duration/Capacitor
self.modules.filteredItemBoost(
@@ -510,7 +510,7 @@ def __runCommandBoosts(self, runTime="normal"):

if warfareBuffID == 13: # Armor Burst: Armor Energizing: Armor Resistance
for damageType in ("Em", "Thermal", "Explosive", "Kinetic"):
self.ship.boostItemAttr("armor%sDamageResonance" % damageType, value)
self.ship.boostItemAttr("armor%sDamageResonance" % damageType, value, stackingPenalties=True)

if warfareBuffID == 14: # Armor Burst: Rapid Repair: Repair Duration/Capacitor
self.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems") or
@@ -19,6 +19,7 @@

# noinspection PyPackageRequirements
import wx
from gui.utils.helpers_wxPython import Frame


class PFListPane(wx.ScrolledWindow):
@@ -30,7 +31,7 @@ def __init__(self, parent):
self._wCount = 0
self.itemsHeight = 1

self.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW))
self.SetBackgroundColour(Frame.getBackgroundColor())

self.SetVirtualSize((1, 1))
self.SetScrollRate(0, 1)
@@ -2,6 +2,7 @@
import wx
import gui.utils.colorUtils as colorUtils
import gui.utils.drawUtils as drawUtils
from gui.utils.helpers_wxPython import Frame

SearchButton, EVT_SEARCH_BTN = wx.lib.newevent.NewEvent()
CancelButton, EVT_CANCEL_BTN = wx.lib.newevent.NewEvent()
@@ -10,8 +11,8 @@


class PFSearchBox(wx.Window):
def __init__(self, parent, id=wx.ID_ANY, value="", pos=wx.DefaultPosition, size=wx.Size(-1, 24), style=0):
wx.Window.__init__(self, parent, id, pos, size, style=style)
def __init__(self, parent, init_id=wx.ID_ANY, value="", pos=wx.DefaultPosition, size=wx.Size(-1, 24), style=0):
wx.Window.__init__(self, parent, init_id, pos, size, style=style)

self.isSearchButtonVisible = False
self.isCancelButtonVisible = False
@@ -222,11 +223,13 @@ def UpdateElementsPos(self, dc):
self.editY = (cheight - editHeight) / 2
self.EditBox.SetPosition((self.editX, self.editY))
self.EditBox.SetSize((self.cancelButtonX - self.padding - self.editX, -1))
self.EditBox.SetBackgroundColour(Frame.getBackgroundColorOffset())
self.EditBox.SetForegroundColour(Frame.getForegroundColor())

def OnPaint(self, event):
dc = wx.BufferedPaintDC(self)

bkColor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW)
bkColor = Frame.getBackgroundColor()
sepColor = colorUtils.GetSuitableColor(bkColor, 0.2)
rect = self.GetRect()

@@ -32,12 +32,15 @@
from gui.bitmapLoader import BitmapLoader

from gui.chromeTabs import PFNotebook
from gui.utils.helpers_wxPython import Frame


class AdditionsPane(TogglePanel):
def __init__(self, parent):

TogglePanel.__init__(self, parent, forceLayout=1)
self.SetBackgroundColour(Frame.getBackgroundColor())
self.SetForegroundColour(Frame.getForegroundColor())

self.SetLabel("Additions")
pane = self.GetContentPane()
@@ -19,11 +19,13 @@

# noinspection PyPackageRequirements
import wx

import gui.display as d
import gui.globalEvents as GE
import gui.marketBrowser as marketBrowser
from gui.builtinViewColumns.state import State
from gui.contextMenu import ContextMenu
from gui.utils.helpers_wxPython import DragDropHelper
from service.fit import Fit


@@ -37,7 +39,8 @@ def __init__(self, dropFn, *args, **kwargs):

def OnData(self, x, y, t):
if self.GetData():
data = self.dropData.GetText().split(':')
dragged_data = DragDropHelper.data
data = dragged_data.split(':')
self.dropFn(x, y, data)
return t

@@ -3,6 +3,7 @@

__all__ = [
"pyfaGeneralPreferences",
"pyfaGeneral2Preferences",
"pyfaHTMLExportPreferences",
"pyfaUpdatePreferences",
"pyfaNetworkPreferences",
@@ -20,7 +20,7 @@
# noinspection PyPackageRequirements
import wx
from gui.preferenceView import PreferenceView
from gui.utils.fonts import Fonts
from gui.utils.helpers_wxPython import Fonts


class DummyView(PreferenceView):
@@ -4,11 +4,11 @@
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
from service.settings import ContextMenuSettings
from gui.utils.fonts import Fonts
from gui.utils.helpers_wxPython import Fonts


class PFContextMenuPref(PreferenceView):
title = "Context Menu Panel"
title = "Context Menu"

def populatePrefPanel(self, panel):
self.settings = ContextMenuSettings.getInstance()
@@ -7,7 +7,7 @@
import gui.mainFrame

from service.settings import CRESTSettings
from gui.utils.fonts import Fonts
from gui.utils.helpers_wxPython import Fonts

# noinspection PyPackageRequirements
from wx.lib.intctrl import IntCtrl

0 comments on commit 317eaff

Please sign in to comment.
You can’t perform that action at this time.