tradedangerous 11.0.2__tar.gz → 11.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tradedangerous might be problematic. Click here for more details.
- {tradedangerous-11.0.2/tradedangerous.egg-info → tradedangerous-11.0.4}/PKG-INFO +1 -1
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/cache.py +9 -9
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/cli.py +8 -7
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/parsing.py +4 -4
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/csvexport.py +1 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/formatting.py +7 -6
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/edsc.py +1 -13
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/edsm.py +1 -13
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/plugins/eddblink_plug.py +152 -158
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/plugins/spansh_plug.py +17 -14
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/submit-distances.py +1 -24
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/transfers.py +5 -75
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/version.py +1 -1
- {tradedangerous-11.0.2 → tradedangerous-11.0.4/tradedangerous.egg-info}/PKG-INFO +1 -1
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/LICENSE +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/README.md +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/pyproject.toml +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/setup.cfg +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/setup.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_bootstrap_commands.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_bootstrap_plugins.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_cache.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_commands.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_fs.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_peek.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_tools.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_trade.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_trade_run.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tests/test_utils.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/__init__.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/TEMPLATE.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/__init__.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/buildcache_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/buy_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/commandenv.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/exceptions.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/export_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/import_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/local_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/market_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/nav_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/olddata_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/rares_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/run_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/sell_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/shipvendor_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/station_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/trade_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/update_cmd.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/commands/update_gui.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/corrections.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/edscupdate.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/edsmupdate.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/fs.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/gui.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/jsonprices.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/mapping.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/mfd/__init__.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/mfd/saitek/__init__.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/mfd/saitek/directoutput.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/mfd/saitek/x52pro.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/checkpricebounds.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/clipboard.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/coord64.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/derp-sentinel.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/diff-system-csvs.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/eddb.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/eddn.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/importeddbstats.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/prices-json-exp.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/misc/progress.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/plugins/__init__.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/plugins/edapi_plug.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/plugins/edcd_plug.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/plugins/edmc_batch_plug.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/plugins/journal_plug.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/plugins/netlog_plug.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/prices.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/templates/Added.csv +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/templates/Category.csv +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/templates/RareItem.csv +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/templates/TradeDangerous.sql +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/tools.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/trade.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/tradecalc.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/tradedb.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/tradeenv.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/tradeexcept.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/tradegui.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous/utils.py +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous.egg-info/SOURCES.txt +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous.egg-info/dependency_links.txt +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous.egg-info/entry_points.txt +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous.egg-info/not-zip-safe +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous.egg-info/requires.txt +0 -0
- {tradedangerous-11.0.2 → tradedangerous-11.0.4}/tradedangerous.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 11.0.
|
|
3
|
+
Version: 11.0.4
|
|
4
4
|
Summary: Trade-Dangerous is a set of powerful trading tools for Elite Dangerous, organized around one of the most powerful trade run optimizers available.
|
|
5
5
|
Home-page: https://github.com/eyeonus/Trade-Dangerous
|
|
6
6
|
Author: eyeonus
|
|
@@ -206,7 +206,7 @@ class MultipleItemEntriesError(DuplicateKeyError):
|
|
|
206
206
|
super().__init__(fromFile, lineNo, 'item', item, prevLineNo)
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
class
|
|
209
|
+
class InvalidLineError(BuildCacheBaseException):
|
|
210
210
|
"""
|
|
211
211
|
Raised when an invalid line is read.
|
|
212
212
|
Attributes:
|
|
@@ -258,7 +258,7 @@ def parseSupply(pricesFile: Path, lineNo: int, category: str, reading: str) -> t
|
|
|
258
258
|
# High <- 'H';
|
|
259
259
|
if reading == '?':
|
|
260
260
|
return -1, -1
|
|
261
|
-
|
|
261
|
+
if reading == '-':
|
|
262
262
|
return 0, 0
|
|
263
263
|
|
|
264
264
|
# extract the left most digits into unit and the last character into the level reading.
|
|
@@ -604,13 +604,13 @@ def processPrices(tdenv: TradeEnv, priceFile: Path, db: sqlite3.Connection, defa
|
|
|
604
604
|
if text.startswith('@'):
|
|
605
605
|
matches = systemStationRe.match(text)
|
|
606
606
|
if not matches:
|
|
607
|
-
raise
|
|
607
|
+
raise InvalidLineError(priceFile, lineNo, "Unrecognized '@' line", text)
|
|
608
608
|
changeStation(matches)
|
|
609
609
|
continue
|
|
610
610
|
|
|
611
611
|
if not stationID:
|
|
612
612
|
# Need a station to process any other type of line.
|
|
613
|
-
raise
|
|
613
|
+
raise InvalidLineError(priceFile, lineNo, "Expecting '@ SYSTEM / Station' line", text)
|
|
614
614
|
if stationID == DELETED:
|
|
615
615
|
# Ignore all values from a deleted station/system.
|
|
616
616
|
continue
|
|
@@ -625,7 +625,7 @@ def processPrices(tdenv: TradeEnv, priceFile: Path, db: sqlite3.Connection, defa
|
|
|
625
625
|
# ## "Item sell buy ..." lines.
|
|
626
626
|
matches = newItemPriceRe.match(text)
|
|
627
627
|
if not matches:
|
|
628
|
-
raise
|
|
628
|
+
raise InvalidLineError(priceFile, lineNo, "Unrecognized line/syntax", text)
|
|
629
629
|
|
|
630
630
|
processItemLine(matches)
|
|
631
631
|
|
|
@@ -639,7 +639,7 @@ def processPrices(tdenv: TradeEnv, priceFile: Path, db: sqlite3.Connection, defa
|
|
|
639
639
|
"if you /need/ to persist them."
|
|
640
640
|
)
|
|
641
641
|
|
|
642
|
-
stations = tuple((ID,) for ID in processedStations
|
|
642
|
+
stations = tuple((ID,) for ID in processedStations)
|
|
643
643
|
return stations, items, zeros, newItems, updtItems, ignItems, numSys
|
|
644
644
|
|
|
645
645
|
|
|
@@ -649,9 +649,9 @@ def processPrices(tdenv: TradeEnv, priceFile: Path, db: sqlite3.Connection, defa
|
|
|
649
649
|
def processPricesFile(tdenv: TradeEnv, db: sqlite3.Connection, pricesPath: Path, pricesFh: Optional[TextIO] = None, defaultZero: bool = False) -> None:
|
|
650
650
|
tdenv.DEBUG0("Processing Prices file '{}'", pricesPath)
|
|
651
651
|
|
|
652
|
-
with pricesFh or pricesPath.open('r', encoding='utf-8') as
|
|
652
|
+
with (pricesFh or pricesPath.open('r', encoding='utf-8')) as fh:
|
|
653
653
|
stations, items, zeros, newItems, updtItems, ignItems, numSys = processPrices(
|
|
654
|
-
tdenv,
|
|
654
|
+
tdenv, fh, db, defaultZero
|
|
655
655
|
)
|
|
656
656
|
|
|
657
657
|
if not tdenv.mergeImport:
|
|
@@ -907,7 +907,7 @@ def processImportFile(tdenv, db, importPath, tableName):
|
|
|
907
907
|
try:
|
|
908
908
|
db.execute(sql_stmt, linein)
|
|
909
909
|
importCount += 1
|
|
910
|
-
except Exception as e:
|
|
910
|
+
except Exception as e: # pylint: disable=broad-exception-caught
|
|
911
911
|
tdenv.WARN(
|
|
912
912
|
"*** INTERNAL ERROR: {err}\n"
|
|
913
913
|
"CSV File: {file}:{line}\n"
|
|
@@ -32,34 +32,35 @@
|
|
|
32
32
|
# to empower other programmers to do cool stuff.
|
|
33
33
|
|
|
34
34
|
import os
|
|
35
|
+
import sys
|
|
35
36
|
import traceback
|
|
36
37
|
|
|
37
38
|
from . import commands
|
|
39
|
+
from . import tradeexcept
|
|
38
40
|
from .commands import exceptions
|
|
39
41
|
from .plugins import PluginException
|
|
40
42
|
|
|
41
|
-
|
|
42
43
|
from . import tradedb
|
|
43
44
|
|
|
45
|
+
if "CPROF" in os.environ:
|
|
46
|
+
import cProfile
|
|
47
|
+
|
|
44
48
|
|
|
45
49
|
def main(argv = None):
|
|
46
|
-
import sys
|
|
47
50
|
if not argv:
|
|
48
51
|
argv = sys.argv
|
|
49
|
-
if sys.hexversion <
|
|
52
|
+
if sys.hexversion < 0x03070000:
|
|
50
53
|
raise SystemExit(
|
|
51
|
-
"Sorry: TradeDangerous requires Python 3.
|
|
54
|
+
"Sorry: TradeDangerous requires Python 3.7 or higher.\n"
|
|
52
55
|
"For assistance, see:\n"
|
|
53
56
|
"\tBug Tracker: https://github.com/eyeonus/Trade-Dangerous/issues\n"
|
|
54
57
|
"\tDocumentation: https://github.com/eyeonus/Trade-Dangerous/wiki\n"
|
|
55
58
|
"\tEDForum Thread: https://forums.frontier.co.uk/showthread.php/441509\n"
|
|
56
59
|
)
|
|
57
|
-
from . import tradeexcept
|
|
58
60
|
|
|
59
61
|
try:
|
|
60
62
|
try:
|
|
61
63
|
if "CPROF" in os.environ:
|
|
62
|
-
import cProfile
|
|
63
64
|
cProfile.run("trade(argv)")
|
|
64
65
|
else:
|
|
65
66
|
trade(argv)
|
|
@@ -79,7 +80,7 @@ def main(argv = None):
|
|
|
79
80
|
print()
|
|
80
81
|
print(traceback.format_exc())
|
|
81
82
|
print(
|
|
82
|
-
"Please report this bug (http://
|
|
83
|
+
"Please report this bug (http://github.com/eyeonus/Trade-Dangerous/issues). You may be "
|
|
83
84
|
"able to work around it by using the '-q' parameter. Windows "
|
|
84
85
|
"users may be able to use 'chcp.com 65001' to tell the console "
|
|
85
86
|
"you want to support UTF-8 characters."
|
|
@@ -60,7 +60,7 @@ class PadSizeArgument(int):
|
|
|
60
60
|
'dest': 'padSize',
|
|
61
61
|
'metavar': 'PADSIZES',
|
|
62
62
|
'type': 'padsize',
|
|
63
|
-
'choices': '
|
|
63
|
+
'choices': 'SsMmLl?',
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
|
|
@@ -153,7 +153,7 @@ class PlanetaryArgument(int):
|
|
|
153
153
|
'dest': 'planetary',
|
|
154
154
|
'metavar': 'PLANETARY',
|
|
155
155
|
'type': 'planetary',
|
|
156
|
-
'choices': '
|
|
156
|
+
'choices': 'YyNn?',
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
|
|
@@ -181,7 +181,7 @@ class FleetCarrierArgument(int):
|
|
|
181
181
|
'dest': 'fleet',
|
|
182
182
|
'metavar': 'FLEET',
|
|
183
183
|
'type': 'fleet',
|
|
184
|
-
'choices': '
|
|
184
|
+
'choices': 'YyNn?',
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
class OdysseyArgument(int):
|
|
@@ -208,7 +208,7 @@ class OdysseyArgument(int):
|
|
|
208
208
|
'dest': 'odyssey',
|
|
209
209
|
'metavar': 'ODYSSEY',
|
|
210
210
|
'type': 'odyssey',
|
|
211
|
-
'choices': '
|
|
211
|
+
'choices': 'YyNn?',
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
|
|
@@ -8,7 +8,9 @@ import itertools
|
|
|
8
8
|
import typing
|
|
9
9
|
|
|
10
10
|
if typing.TYPE_CHECKING:
|
|
11
|
-
from typing import Any,
|
|
11
|
+
from typing import Any, Optional
|
|
12
|
+
from collections.abc import Callable
|
|
13
|
+
|
|
12
14
|
|
|
13
15
|
class ColumnFormat:
|
|
14
16
|
"""
|
|
@@ -197,8 +199,7 @@ if __name__ == '__main__':
|
|
|
197
199
|
print("Simple usage:")
|
|
198
200
|
present()
|
|
199
201
|
|
|
200
|
-
print()
|
|
201
|
-
print("Adding age ColumnFormat:")
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
present()
|
|
202
|
+
#print()
|
|
203
|
+
#print("Adding age ColumnFormat:")
|
|
204
|
+
#rowFmt.append(after='Name', col=ColumnFormat("Age", '>', 3, pre='|', post='|', key=lambda row: row['age']))
|
|
205
|
+
#present()
|
|
@@ -4,19 +4,7 @@ from collections import namedtuple
|
|
|
4
4
|
from urllib.request import Request, urlopen
|
|
5
5
|
|
|
6
6
|
import json
|
|
7
|
-
|
|
8
|
-
try:
|
|
9
|
-
import requests
|
|
10
|
-
except ImportError as e:
|
|
11
|
-
import pip
|
|
12
|
-
print("ERROR: Unable to load the Python 'requests' package.")
|
|
13
|
-
approval = input(
|
|
14
|
-
"Do you want me to try and install it with the package manager (y/n)? "
|
|
15
|
-
)
|
|
16
|
-
if approval.lower() != 'y':
|
|
17
|
-
raise e
|
|
18
|
-
pip.main(["install", "--upgrade", "requests"])
|
|
19
|
-
import requests
|
|
7
|
+
import requests
|
|
20
8
|
|
|
21
9
|
|
|
22
10
|
def edsc_log(apiCall, params, jsonData=None, error=None):
|
|
@@ -6,19 +6,7 @@ uses EDSM - https://www.edsm.net/api
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import json
|
|
9
|
-
|
|
10
|
-
try:
|
|
11
|
-
import requests
|
|
12
|
-
except ImportError as e:
|
|
13
|
-
import pip
|
|
14
|
-
print("ERROR: Unable to load the Python 'requests' package.")
|
|
15
|
-
approval = input(
|
|
16
|
-
"Do you want me to try and install it with the package manager (y/n)? "
|
|
17
|
-
)
|
|
18
|
-
if approval.lower() != 'y':
|
|
19
|
-
raise e
|
|
20
|
-
pip.main(["install", "--upgrade", "requests"])
|
|
21
|
-
import requests
|
|
9
|
+
import requests
|
|
22
10
|
|
|
23
11
|
|
|
24
12
|
def edsm_log(apiCall, url, params, jsonData=None, error=None):
|