tradedangerous 10.16.15__tar.gz → 10.16.17__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-10.16.15 → tradedangerous-10.16.17}/PKG-INFO +1 -1
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/eddblink_plug.py +35 -20
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/version.py +1 -1
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/PKG-INFO +1 -1
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/LICENSE +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/README.md +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/pyproject.toml +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/setup.cfg +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/setup.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_bootstrap_commands.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_bootstrap_plugins.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_cache.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_commands.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_fs.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_peek.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_tools.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_trade.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_trade_run.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tests/test_utils.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/__init__.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/cache.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/cli.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/TEMPLATE.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/__init__.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/buildcache_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/buy_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/commandenv.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/exceptions.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/export_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/import_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/local_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/market_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/nav_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/olddata_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/parsing.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/rares_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/run_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/sell_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/shipvendor_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/station_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/trade_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/update_cmd.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/update_gui.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/corrections.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/csvexport.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/edscupdate.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/edsmupdate.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/formatting.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/fs.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/gui.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/jsonprices.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/mapping.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/mfd/__init__.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/mfd/saitek/__init__.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/mfd/saitek/directoutput.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/mfd/saitek/x52pro.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/checkpricebounds.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/clipboard.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/coord64.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/derp-sentinel.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/diff-system-csvs.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/eddb.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/eddn.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/edsc.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/edsm.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/importeddbstats.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/prices-json-exp.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/misc/progress.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/__init__.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/edapi_plug.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/edcd_plug.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/edmc_batch_plug.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/journal_plug.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/netlog_plug.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/spansh_plug.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/prices.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/submit-distances.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/templates/Added.csv +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/templates/Category.csv +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/templates/RareItem.csv +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/templates/TradeDangerous.sql +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/tools.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/trade.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/tradecalc.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/tradedb.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/tradeenv.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/tradeexcept.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/tradegui.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/transfers.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/utils.py +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/SOURCES.txt +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/dependency_links.txt +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/entry_points.txt +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/not-zip-safe +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/requires.txt +0 -0
- {tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 10.16.
|
|
3
|
+
Version: 10.16.17
|
|
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
|
|
@@ -40,6 +40,34 @@ class DecodingError(PluginException):
|
|
|
40
40
|
pass
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
def file_line_count(from_file: Path, bufsize: int = 128 * 1024) -> int:
|
|
44
|
+
""" counts the number of newline characters in a given file. """
|
|
45
|
+
# Pre-allocate a buffer so we're not putting pressure on the garbage collector,
|
|
46
|
+
# capture it's counting method so we don't have to keep looking that up on
|
|
47
|
+
# large files.
|
|
48
|
+
buf = bytearray(bufsize)
|
|
49
|
+
counter = buf.count
|
|
50
|
+
|
|
51
|
+
total = 0
|
|
52
|
+
|
|
53
|
+
with from_file.open("rb") as fh:
|
|
54
|
+
# Capture the 'readinto' method to avoid lookups.
|
|
55
|
+
reader = fh.readinto
|
|
56
|
+
|
|
57
|
+
# read into the buffer and capture the number of bytes fetched,
|
|
58
|
+
# which will be 'size' until the last read from the file.
|
|
59
|
+
read = reader(buf)
|
|
60
|
+
while read == bufsize: # nominal case for large files
|
|
61
|
+
total += counter(b'\n')
|
|
62
|
+
read = reader(buf)
|
|
63
|
+
|
|
64
|
+
# when 0 <= read < bufsize we're on the last page of the
|
|
65
|
+
# file, so we need to take a slice of the buffer, which creates
|
|
66
|
+
# a new object and thus we also have to lookup count. it's trivial
|
|
67
|
+
# but if you have to do it 10,000x it's definitly not a rounding error.
|
|
68
|
+
return total + buf[:read].count(b'\n')
|
|
69
|
+
|
|
70
|
+
|
|
43
71
|
class ImportPlugin(plugins.ImportPluginBase):
|
|
44
72
|
"""
|
|
45
73
|
Plugin that downloads data from eddb.
|
|
@@ -123,14 +151,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
123
151
|
for result in results:
|
|
124
152
|
yield result
|
|
125
153
|
|
|
126
|
-
|
|
127
|
-
def blocks(f, size = 65536):
|
|
128
|
-
while True:
|
|
129
|
-
b = f.read(size)
|
|
130
|
-
if not b:
|
|
131
|
-
break
|
|
132
|
-
yield b
|
|
133
|
-
|
|
154
|
+
|
|
134
155
|
def downloadFile(self, path):
|
|
135
156
|
"""
|
|
136
157
|
Fetch the latest dumpfile from the website if newer than local copy.
|
|
@@ -219,18 +240,15 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
219
240
|
from_live = 0 if listings_file == self.listingsPath else 1
|
|
220
241
|
|
|
221
242
|
self.tdenv.DEBUG0(f"Getting total number of entries in {listings_file}...")
|
|
222
|
-
|
|
223
|
-
|
|
243
|
+
listings_path = Path(self.dataPath, listings_file)
|
|
244
|
+
total += file_line_count(listings_path)
|
|
224
245
|
|
|
225
|
-
liveList = []
|
|
226
246
|
liveStmt = """UPDATE StationItem
|
|
227
247
|
SET from_live = 0
|
|
228
248
|
WHERE station_id = ?"""
|
|
229
249
|
|
|
230
|
-
delList = []
|
|
231
250
|
delStmt = "DELETE from StationItem WHERE station_id = ?"
|
|
232
251
|
|
|
233
|
-
listingList = []
|
|
234
252
|
listingStmt = """INSERT OR IGNORE INTO StationItem
|
|
235
253
|
(station_id, item_id, modified,
|
|
236
254
|
demand_price, demand_units, demand_level,
|
|
@@ -238,10 +256,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
238
256
|
VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"""
|
|
239
257
|
|
|
240
258
|
self.tdenv.DEBUG0("Getting list of commodities...")
|
|
241
|
-
items = []
|
|
242
|
-
it_result = self.execute("SELECT item_id FROM Item ORDER BY item_id").fetchall()
|
|
243
|
-
for item in it_result:
|
|
244
|
-
items.append(item[0])
|
|
259
|
+
items = [cols[0] for cols in self.execute("SELECT item_id FROM Item ORDER BY item_id")]
|
|
245
260
|
|
|
246
261
|
self.tdenv.DEBUG0("Getting list of stations...")
|
|
247
262
|
stationList = {
|
|
@@ -252,14 +267,14 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
252
267
|
stationItems = dict(self.execute('SELECT station_id, UNIXEPOCH(modified) FROM StationItem').fetchall())
|
|
253
268
|
|
|
254
269
|
self.tdenv.DEBUG0("Processing entries...")
|
|
255
|
-
with open(
|
|
270
|
+
with listings_path.open("r", encoding="utf-8", errors="ignore") as fh:
|
|
256
271
|
prog = pbar.Progress(total, 50)
|
|
257
272
|
listings = csv.DictReader(fh)
|
|
258
273
|
|
|
259
274
|
cur_station = -1
|
|
260
275
|
|
|
261
276
|
for listing in listings:
|
|
262
|
-
if prog.increment(1, postfix = lambda value,
|
|
277
|
+
if prog.increment(1, postfix = lambda value, total: f" {(value / total * 100):.0f}% {value} / {total}"):
|
|
263
278
|
# Do a commit and close the DB every 2%.
|
|
264
279
|
# This ensures the listings are put in the DB and the WAL is cleared.
|
|
265
280
|
self.commit()
|
|
@@ -318,7 +333,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
318
333
|
self.tdb.close()
|
|
319
334
|
|
|
320
335
|
while prog.value < prog.maxValue:
|
|
321
|
-
prog.increment(1, postfix = lambda value,
|
|
336
|
+
prog.increment(1, postfix = lambda value, total: " " + str(round(value / total * 100)) + "%")
|
|
322
337
|
prog.clear()
|
|
323
338
|
|
|
324
339
|
self.tdenv.NOTE("Finished processing market data. End time = {}", self.now())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 10.16.
|
|
3
|
+
Version: 10.16.17
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/buildcache_cmd.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/commands/shipvendor_cmd.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/mfd/saitek/directoutput.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/plugins/edmc_batch_plug.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous/templates/TradeDangerous.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{tradedangerous-10.16.15 → tradedangerous-10.16.17}/tradedangerous.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|