Reorganize graph folder structure
This commit is contained in:
0
graphs/__init__.py
Normal file
0
graphs/__init__.py
Normal file
25
graphs/data/__init__.py
Normal file
25
graphs/data/__init__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from . import fitDamageStats
|
||||
from . import fitShieldRegen
|
||||
from . import fitCapRegen
|
||||
from . import fitMobility
|
||||
from . import fitWarpTime
|
||||
@@ -21,6 +21,3 @@ from .cache import FitDataCache
|
||||
from .defs import XDef, YDef, VectorDef, Input
|
||||
from .getter import PointGetter, SmoothPointGetter
|
||||
from .graph import FitGraph
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
from gui.builtinGraphs import *
|
||||
24
graphs/data/fitCapRegen/__init__.py
Normal file
24
graphs/data/fitCapRegen/__init__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from .graph import FitCapRegenGraph
|
||||
|
||||
|
||||
FitCapRegenGraph.register()
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
import math
|
||||
|
||||
from gui.builtinGraphs.base import SmoothPointGetter
|
||||
from graphs.data.base import SmoothPointGetter
|
||||
|
||||
|
||||
class Time2CapAmountGetter(SmoothPointGetter):
|
||||
@@ -18,8 +18,8 @@
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from gui.builtinGraphs.base import FitGraph, XDef, YDef, Input
|
||||
from .getter import Time2CapAmountGetter, Time2CapRegenGetter, CapAmount2CapAmountGetter, CapAmount2CapRegenGetter
|
||||
from graphs.data.base import FitGraph, Input, XDef, YDef
|
||||
from .getter import CapAmount2CapAmountGetter, CapAmount2CapRegenGetter, Time2CapAmountGetter, Time2CapRegenGetter
|
||||
|
||||
|
||||
class FitCapRegenGraph(FitGraph):
|
||||
@@ -51,6 +51,3 @@ class FitCapRegenGraph(FitGraph):
|
||||
('capAmount', 'capRegen'): CapAmount2CapRegenGetter}
|
||||
_denormalizers = {
|
||||
('capAmount', '%'): lambda v, fit, tgt: v * 100 / fit.ship.getModifiedItemAttr('capacitorCapacity')}
|
||||
|
||||
|
||||
FitCapRegenGraph.register()
|
||||
24
graphs/data/fitDamageStats/__init__.py
Normal file
24
graphs/data/fitDamageStats/__init__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from .graph import FitDamageStatsGraph
|
||||
|
||||
|
||||
FitDamageStatsGraph.register()
|
||||
@@ -20,9 +20,9 @@
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
from gui.builtinGraphs.base import FitDataCache
|
||||
from eos.const import FittingModuleState
|
||||
from eos.modifiedAttributeDict import getResistanceAttrID
|
||||
from graphs.data.base import FitDataCache
|
||||
|
||||
|
||||
ModProjData = namedtuple('ModProjData', ('boost', 'optimal', 'falloff', 'stackingGroup', 'resAttrID'))
|
||||
@@ -21,9 +21,9 @@
|
||||
from copy import copy
|
||||
|
||||
from eos.utils.float import floatUnerr
|
||||
from eos.utils.spoolSupport import SpoolType, SpoolOptions
|
||||
from eos.utils.spoolSupport import SpoolOptions, SpoolType
|
||||
from eos.utils.stats import DmgTypes
|
||||
from gui.builtinGraphs.base import FitDataCache
|
||||
from graphs.data.base import FitDataCache
|
||||
|
||||
|
||||
class TimeCache(FitDataCache):
|
||||
@@ -24,7 +24,7 @@ from functools import lru_cache
|
||||
from eos.const import FittingHardpoint
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.utils.float import floatUnerr
|
||||
from gui.builtinGraphs.fitDamageStats.helper import getTgtRadius
|
||||
from graphs.data.fitDamageStats.helper import getTgtRadius
|
||||
from service.const import GraphDpsDroneMode
|
||||
from service.settings import GraphSettings
|
||||
|
||||
@@ -22,7 +22,7 @@ import math
|
||||
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.utils.float import floatUnerr
|
||||
from gui.builtinGraphs.fitDamageStats.helper import getTgtMaxVelocity, getTgtSigRadius
|
||||
from graphs.data.fitDamageStats.helper import getTgtMaxVelocity, getTgtSigRadius
|
||||
from service.const import GraphDpsDroneMode
|
||||
from service.settings import GraphSettings
|
||||
from .application import _calcRangeFactor
|
||||
@@ -19,12 +19,12 @@
|
||||
|
||||
|
||||
import eos.config
|
||||
from eos.utils.spoolSupport import SpoolType, SpoolOptions
|
||||
from eos.utils.spoolSupport import SpoolOptions, SpoolType
|
||||
from eos.utils.stats import DmgTypes
|
||||
from gui.builtinGraphs.base import PointGetter, SmoothPointGetter
|
||||
from graphs.data.base import PointGetter, SmoothPointGetter
|
||||
from service.settings import GraphSettings
|
||||
from .calc.application import getApplicationPerKey
|
||||
from .calc.projected import getWebbedSpeed, getTpMult
|
||||
from .calc.projected import getTpMult, getWebbedSpeed
|
||||
from .helper import getTgtSigRadius
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from gui.builtinGraphs.base import FitGraph, XDef, YDef, Input, VectorDef
|
||||
from graphs.data.base import FitGraph, XDef, YDef, Input, VectorDef
|
||||
from service.const import GraphCacheCleanupReason
|
||||
from .cache import ProjectedDataCache, TimeCache
|
||||
from .getter import (
|
||||
Distance2DpsGetter, Distance2VolleyGetter, Distance2InflictedDamageGetter,
|
||||
Time2DpsGetter, Time2VolleyGetter, Time2InflictedDamageGetter,
|
||||
TgtSpeed2DpsGetter, TgtSpeed2VolleyGetter, TgtSpeed2InflictedDamageGetter,
|
||||
TgtSigRadius2DpsGetter, TgtSigRadius2VolleyGetter, TgtSigRadius2InflictedDamageGetter)
|
||||
from .helper import getTgtMaxVelocity, getTgtSigRadius
|
||||
from .cache import ProjectedDataCache, TimeCache
|
||||
|
||||
|
||||
class FitDamageStatsGraph(FitGraph):
|
||||
@@ -99,6 +99,3 @@ class FitDamageStatsGraph(FitGraph):
|
||||
('distance', 'km'): lambda v, fit, tgt: None if v is None else v / 1000,
|
||||
('tgtSpeed', '%'): lambda v, fit, tgt: v * 100 / getTgtMaxVelocity(tgt),
|
||||
('tgtSigRad', '%'): lambda v, fit, tgt: v * 100 / getTgtSigRadius(tgt)}
|
||||
|
||||
|
||||
FitDamageStatsGraph.register()
|
||||
24
graphs/data/fitMobility/__init__.py
Normal file
24
graphs/data/fitMobility/__init__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from .graph import FitMobilityVsTimeGraph
|
||||
|
||||
|
||||
FitMobilityVsTimeGraph.register()
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
import math
|
||||
|
||||
from gui.builtinGraphs.base import SmoothPointGetter
|
||||
from graphs.data.base import SmoothPointGetter
|
||||
|
||||
|
||||
class Time2SpeedGetter(SmoothPointGetter):
|
||||
@@ -18,7 +18,7 @@
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from gui.builtinGraphs.base import FitGraph, XDef, YDef, Input
|
||||
from graphs.data.base import FitGraph, XDef, YDef, Input
|
||||
from .getter import Time2SpeedGetter, Time2DistanceGetter
|
||||
|
||||
|
||||
@@ -42,6 +42,3 @@ class FitMobilityVsTimeGraph(FitGraph):
|
||||
('time', 'distance'): Time2DistanceGetter}
|
||||
_denormalizers = {
|
||||
('distance', 'km'): lambda v, fit, tgt: v / 1000}
|
||||
|
||||
|
||||
FitMobilityVsTimeGraph.register()
|
||||
24
graphs/data/fitShieldRegen/__init__.py
Normal file
24
graphs/data/fitShieldRegen/__init__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from .graph import FitShieldRegenGraph
|
||||
|
||||
|
||||
FitShieldRegenGraph.register()
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
import math
|
||||
|
||||
from gui.builtinGraphs.base import SmoothPointGetter
|
||||
from graphs.data.base import SmoothPointGetter
|
||||
|
||||
|
||||
class Time2ShieldAmountGetter(SmoothPointGetter):
|
||||
@@ -18,7 +18,7 @@
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from gui.builtinGraphs.base import FitGraph, XDef, YDef, Input
|
||||
from graphs.data.base import FitGraph, XDef, YDef, Input
|
||||
from .getter import (
|
||||
Time2ShieldAmountGetter, Time2ShieldRegenGetter,
|
||||
ShieldAmount2ShieldAmountGetter, ShieldAmount2ShieldRegenGetter)
|
||||
@@ -58,6 +58,3 @@ class FitShieldRegenGraph(FitGraph):
|
||||
('shieldAmount', '%'): lambda v, fit, tgt: v * 100 / fit.ship.getModifiedItemAttr('shieldCapacity'),
|
||||
('shieldAmount', 'EHP'): lambda v, fit, tgt: fit.damagePattern.effectivify(fit, v, 'shield'),
|
||||
('shieldRegen', 'EHP/s'): lambda v, fit, tgt: fit.damagePattern.effectivify(fit, v, 'shield')}
|
||||
|
||||
|
||||
FitShieldRegenGraph.register()
|
||||
24
graphs/data/fitWarpTime/__init__.py
Normal file
24
graphs/data/fitWarpTime/__init__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from .graph import FitWarpTimeGraph
|
||||
|
||||
|
||||
FitWarpTimeGraph.register()
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
from eos.const import FittingModuleState
|
||||
from gui.builtinGraphs.base import FitDataCache
|
||||
from graphs.data.base import FitDataCache
|
||||
|
||||
|
||||
class SubwarpSpeedCache(FitDataCache):
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
import math
|
||||
|
||||
from gui.builtinGraphs.base import SmoothPointGetter
|
||||
from graphs.data.base import SmoothPointGetter
|
||||
|
||||
|
||||
AU_METERS = 149597870700
|
||||
@@ -18,10 +18,10 @@
|
||||
# =============================================================================
|
||||
|
||||
|
||||
from graphs.data.base import FitGraph, Input, XDef, YDef
|
||||
from service.const import GraphCacheCleanupReason
|
||||
from gui.builtinGraphs.base import FitGraph, XDef, YDef, Input
|
||||
from .getter import Distance2TimeGetter, AU_METERS
|
||||
from .cache import SubwarpSpeedCache
|
||||
from .getter import AU_METERS, Distance2TimeGetter
|
||||
|
||||
|
||||
class FitWarpTimeGraph(FitGraph):
|
||||
@@ -60,6 +60,3 @@ class FitWarpTimeGraph(FitGraph):
|
||||
_denormalizers = {
|
||||
('distance', 'AU'): lambda v, fit, tgt: v / AU_METERS,
|
||||
('distance', 'km'): lambda v, fit, tgt: v / 1000}
|
||||
|
||||
|
||||
FitWarpTimeGraph.register()
|
||||
@@ -31,8 +31,8 @@ import gui.globalEvents as GE
|
||||
import gui.mainFrame
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.saveddata.targetProfile import TargetProfile
|
||||
from graphs.data.base import FitGraph
|
||||
from gui.bitmap_loader import BitmapLoader
|
||||
from gui.builtinGraphs.base import FitGraph
|
||||
from service.const import GraphCacheCleanupReason
|
||||
from service.settings import GraphSettings
|
||||
from .panel import GraphControlPanel
|
||||
@@ -25,9 +25,9 @@ import wx
|
||||
|
||||
from gui.bitmap_loader import BitmapLoader
|
||||
from gui.contextMenu import ContextMenu
|
||||
from gui.utils.inputs import FloatBox, FloatRangeBox
|
||||
from service.const import GraphCacheCleanupReason
|
||||
from service.fit import Fit
|
||||
from gui.utils.inputs import FloatBox, FloatRangeBox
|
||||
from .lists import FitList, TargetList
|
||||
from .vector import VectorPicker
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# noinspection PyUnresolvedReferences
|
||||
from gui.builtinGraphs import ( # noqa: E402,F401
|
||||
fitDamageStats,
|
||||
fitShieldRegen,
|
||||
fitCapRegen,
|
||||
fitMobility,
|
||||
fitWarpTime)
|
||||
@@ -1 +0,0 @@
|
||||
import gui.builtinGraphs.fitCapRegen.graph # noqa: E402,F401
|
||||
@@ -1 +0,0 @@
|
||||
import gui.builtinGraphs.fitDamageStats.graph # noqa: E402,F401
|
||||
@@ -1 +0,0 @@
|
||||
import gui.builtinGraphs.fitMobility.graph # noqa: E402,F401
|
||||
@@ -1 +0,0 @@
|
||||
import gui.builtinGraphs.fitShieldRegen.graph # noqa: E402,F401
|
||||
@@ -1 +0,0 @@
|
||||
import gui.builtinGraphs.fitWarpTime.graph # noqa: E402,F401
|
||||
@@ -34,11 +34,12 @@ from logbook import Logger
|
||||
from wx.lib.inspection import InspectionTool
|
||||
|
||||
import config
|
||||
import gui.fitCommands as cmd
|
||||
import gui.globalEvents as GE
|
||||
from eos.config import gamedata_date, gamedata_version
|
||||
# import this to access override setting
|
||||
from eos.modifiedAttributeDict import ModifiedAttributeDict
|
||||
from gui import graphFrame
|
||||
from graphs.gui import GraphFrame, frame as graphFrame
|
||||
from gui.additionsPane import AdditionsPane
|
||||
from gui.bitmap_loader import BitmapLoader
|
||||
from gui.builtinMarketBrowser.events import ItemSelected
|
||||
@@ -51,16 +52,15 @@ from gui.chrome_tabs import ChromeNotebook
|
||||
from gui.copySelectDialog import CopySelectDialog
|
||||
from gui.devTools import DevTools
|
||||
from gui.esiFittings import EveFittings, ExportToEve, SsoCharacterMgmt
|
||||
from gui.graphFrame import GraphFrame
|
||||
from gui.mainMenuBar import MainMenuBar
|
||||
from gui.marketBrowser import MarketBrowser
|
||||
from gui.multiSwitch import MultiSwitch
|
||||
from gui.patternEditor import DmgPatternEditorDlg
|
||||
from gui.preferenceDialog import PreferenceDialog
|
||||
from gui.targetProfileEditor import TargetProfileEditorDlg
|
||||
from gui.setEditor import ImplantSetEditorDlg
|
||||
from gui.shipBrowser import ShipBrowser
|
||||
from gui.statsPane import StatsPane
|
||||
from gui.targetProfileEditor import TargetProfileEditorDlg
|
||||
from gui.updateDialog import UpdateDialog
|
||||
from gui.utils.clipboard import fromClipboard
|
||||
from service.character import Character
|
||||
@@ -70,7 +70,6 @@ from service.port import IPortUser, Port
|
||||
from service.price import Price
|
||||
from service.settings import HTMLExportSettings, SettingsProvider
|
||||
from service.update import Update
|
||||
import gui.fitCommands as cmd
|
||||
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
@@ -963,9 +962,9 @@ class MainFrame(wx.Frame):
|
||||
if not self.graphFrame:
|
||||
self.graphFrame = GraphFrame(self)
|
||||
|
||||
if graphFrame.frame.graphFrame_enabled:
|
||||
if graphFrame.graphFrame_enabled:
|
||||
self.graphFrame.Show()
|
||||
elif graphFrame.frame.graphFrame_enabled:
|
||||
elif graphFrame.graphFrame_enabled:
|
||||
self.graphFrame.SetFocus()
|
||||
|
||||
def openWXInspectTool(self, event):
|
||||
|
||||
@@ -23,7 +23,7 @@ import wx
|
||||
import config
|
||||
from service.character import Character
|
||||
from service.fit import Fit
|
||||
import gui.graphFrame
|
||||
from graphs.gui import GraphFrame, frame as graphFrame
|
||||
import gui.globalEvents as GE
|
||||
from gui.bitmap_loader import BitmapLoader
|
||||
|
||||
@@ -101,7 +101,7 @@ class MainMenuBar(wx.MenuBar):
|
||||
graphFrameItem = wx.MenuItem(fitMenu, self.graphFrameId, "&Graphs\tCTRL+G")
|
||||
graphFrameItem.SetBitmap(BitmapLoader.getBitmap("graphs_small", "gui"))
|
||||
fitMenu.Append(graphFrameItem)
|
||||
if not gui.graphFrame.frame.graphFrame_enabled:
|
||||
if not graphFrame.graphFrame_enabled:
|
||||
self.Enable(self.graphFrameId, False)
|
||||
self.ignoreRestrictionItem = fitMenu.Append(self.toggleIgnoreRestrictionID, "Disable Fitting Re&strictions")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user