tradedangerous 10.14.3__tar.gz → 10.15.0__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.14.3 → tradedangerous-10.15.0}/PKG-INFO +1 -1
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/cache.py +29 -11
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/plugins/spansh_plug.py +23 -10
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/version.py +1 -1
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous.egg-info/PKG-INFO +1 -1
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/LICENSE +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/README.md +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/pyproject.toml +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/setup.cfg +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/setup.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_bootstrap_commands.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_bootstrap_plugins.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_cache.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_commands.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_fs.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_peek.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_tools.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_trade.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_trade_import_eddblink.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_trade_run.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tests/test_utils.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/__init__.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/cli.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/TEMPLATE.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/__init__.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/buildcache_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/buy_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/commandenv.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/exceptions.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/export_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/import_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/local_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/market_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/nav_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/olddata_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/parsing.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/rares_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/run_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/sell_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/shipvendor_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/station_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/trade_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/update_cmd.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/commands/update_gui.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/corrections.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/csvexport.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/edscupdate.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/edsmupdate.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/formatting.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/fs.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/gui.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/jsonprices.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/mapping.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/mfd/__init__.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/mfd/saitek/__init__.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/mfd/saitek/directoutput.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/mfd/saitek/x52pro.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/checkpricebounds.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/clipboard.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/coord64.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/derp-sentinel.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/diff-system-csvs.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/eddb.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/eddn.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/edsc.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/edsm.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/importeddbstats.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/prices-json-exp.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/misc/progress.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/plugins/__init__.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/plugins/edapi_plug.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/plugins/edcd_plug.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/plugins/eddblink_plug.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/plugins/edmc_batch_plug.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/plugins/journal_plug.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/plugins/netlog_plug.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/prices.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/submit-distances.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/templates/Added.csv +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/templates/DefaultShipIndex.json +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/templates/RareItem.csv +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/templates/TradeDangerous.sql +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/tools.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/trade.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/tradecalc.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/tradedb.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/tradeenv.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/tradeexcept.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/tradegui.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/transfers.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous/utils.py +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous.egg-info/SOURCES.txt +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous.egg-info/dependency_links.txt +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous.egg-info/entry_points.txt +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous.egg-info/not-zip-safe +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/tradedangerous.egg-info/requires.txt +0 -0
- {tradedangerous-10.14.3 → tradedangerous-10.15.0}/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.
|
|
3
|
+
Version: 10.15.0
|
|
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
|
|
@@ -632,17 +632,34 @@ def processPricesFile(tdenv, db, pricesPath, pricesFh = None, defaultZero = Fals
|
|
|
632
632
|
removedItems = len(zeros)
|
|
633
633
|
|
|
634
634
|
if items:
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
635
|
+
for item in items:
|
|
636
|
+
try:
|
|
637
|
+
db.execute("""
|
|
638
|
+
INSERT OR REPLACE INTO StationItem (
|
|
639
|
+
station_id, item_id, modified,
|
|
640
|
+
demand_price, demand_units, demand_level,
|
|
641
|
+
supply_price, supply_units, supply_level
|
|
642
|
+
) VALUES (
|
|
643
|
+
?, ?, IFNULL(?, CURRENT_TIMESTAMP),
|
|
644
|
+
?, ?, ?,
|
|
645
|
+
?, ?, ?
|
|
646
|
+
)
|
|
647
|
+
""", item)
|
|
648
|
+
except sqlite3.IntegrityError as e:
|
|
649
|
+
print(e)
|
|
650
|
+
print(item)
|
|
651
|
+
raise e
|
|
652
|
+
# db.executemany("""
|
|
653
|
+
# INSERT OR REPLACE INTO StationItem (
|
|
654
|
+
# station_id, item_id, modified,
|
|
655
|
+
# demand_price, demand_units, demand_level,
|
|
656
|
+
# supply_price, supply_units, supply_level
|
|
657
|
+
# ) VALUES (
|
|
658
|
+
# ?, ?, IFNULL(?, CURRENT_TIMESTAMP),
|
|
659
|
+
# ?, ?, ?,
|
|
660
|
+
# ?, ?, ?
|
|
661
|
+
# )
|
|
662
|
+
# """, items)
|
|
646
663
|
updatedItems = len(items)
|
|
647
664
|
|
|
648
665
|
tdenv.DEBUG0("Marking populated stations as having a market")
|
|
@@ -654,6 +671,7 @@ def processPricesFile(tdenv, db, pricesPath, pricesFh = None, defaultZero = Fals
|
|
|
654
671
|
")"
|
|
655
672
|
)
|
|
656
673
|
|
|
674
|
+
tdenv.DEBUG0(f'Committing...')
|
|
657
675
|
db.commit()
|
|
658
676
|
|
|
659
677
|
changes = " and ".join("{} {}".format(v, k) for k, v in {
|
|
@@ -9,7 +9,7 @@ import requests
|
|
|
9
9
|
import simdjson
|
|
10
10
|
import sqlite3
|
|
11
11
|
|
|
12
|
-
from .. import plugins, cache, fs
|
|
12
|
+
from .. import plugins, cache, fs, transfers
|
|
13
13
|
|
|
14
14
|
SOURCE_URL = 'https://downloads.spansh.co.uk/galaxy_stations.json'
|
|
15
15
|
|
|
@@ -55,6 +55,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
55
55
|
pluginOptions = {
|
|
56
56
|
'url': f'URL to download galaxy data from (defaults to {SOURCE_URL})',
|
|
57
57
|
'file': 'Local filename to import galaxy data from; use "-" to load from stdin',
|
|
58
|
+
'maxage': 'Skip all entries older than specified age in days, ex.: maxage=1.5',
|
|
58
59
|
'listener': 'For use by TD-listener, prevents updating cache from generated prices file',
|
|
59
60
|
}
|
|
60
61
|
|
|
@@ -62,6 +63,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
62
63
|
super().__init__(*args, **kwargs)
|
|
63
64
|
self.url = self.getOption('url')
|
|
64
65
|
self.file = self.getOption('file')
|
|
66
|
+
self.maxage = float(self.getOption('maxage'))
|
|
65
67
|
self.listener = self.getOption('listener')
|
|
66
68
|
assert not (self.url and self.file), 'Provide either url or file, not both'
|
|
67
69
|
if self.file and (self.file != '-'):
|
|
@@ -104,6 +106,10 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
104
106
|
station_count = 0
|
|
105
107
|
commodity_count = 0
|
|
106
108
|
for station, commodities in stations:
|
|
109
|
+
if (datetime.now() - station.modified) > timedelta(days=self.maxage):
|
|
110
|
+
if self.tdenv.detail >= 1:
|
|
111
|
+
self.print(f' | @{system.name.upper()}/{station.name.upper():50s} | Skipping station due to age: {datetime.now() - station.modified}, ts: {station.modified}')
|
|
112
|
+
continue
|
|
107
113
|
if (system.name.upper(), station.name.upper()) in seen_stations:
|
|
108
114
|
fq_station_name = f'@{system.name.upper()}/{station.name}'
|
|
109
115
|
if self.tdenv.detail >= 1:
|
|
@@ -156,17 +162,24 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
156
162
|
return False
|
|
157
163
|
|
|
158
164
|
def data_stream(self):
|
|
165
|
+
if not self.file:
|
|
166
|
+
url = self.url or SOURCE_URL
|
|
167
|
+
self.print(f'Downloading prices from remote URL: {url}')
|
|
168
|
+
self.file = self.tdenv.tmpDir / Path("galaxy_stations.json")
|
|
169
|
+
transfers.download(self.tdenv, url, self.file)
|
|
170
|
+
self.print(f'Download complete, saved to local file: {self.file}')
|
|
171
|
+
|
|
159
172
|
if self.file == '-':
|
|
160
173
|
self.print('Reading prices from stdin')
|
|
161
174
|
stream = sys.stdin
|
|
162
175
|
elif self.file:
|
|
163
176
|
self.print(f'Reading prices from local file: {self.file}')
|
|
164
177
|
stream = open(self.file, 'r', encoding='utf8')
|
|
165
|
-
else:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
178
|
+
# else:
|
|
179
|
+
# url = self.url or SOURCE_URL
|
|
180
|
+
# self.print(f'Reading prices from remote URL: {url}')
|
|
181
|
+
# req = requests.get(url, stream=True)
|
|
182
|
+
# stream = req.iter_lines(decode_unicode=True)
|
|
170
183
|
return ingest_stream(stream)
|
|
171
184
|
|
|
172
185
|
def categorise_commodities(self, commodities):
|
|
@@ -176,15 +189,15 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
176
189
|
return categories
|
|
177
190
|
|
|
178
191
|
def execute(self, query, *params, **kwparams):
|
|
179
|
-
attempts = 5
|
|
192
|
+
# attempts = 5
|
|
180
193
|
cursor = self.tdb.getDB().cursor()
|
|
181
194
|
while True:
|
|
182
195
|
try:
|
|
183
196
|
return cursor.execute(query, params or kwparams)
|
|
184
197
|
except sqlite3.OperationalError as ex:
|
|
185
|
-
if not attempts:
|
|
186
|
-
|
|
187
|
-
attempts -= 1
|
|
198
|
+
# if not attempts:
|
|
199
|
+
# raise
|
|
200
|
+
# attempts -= 1
|
|
188
201
|
self.print(f'Retrying query: {ex!s}')
|
|
189
202
|
time.sleep(1)
|
|
190
203
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 10.
|
|
3
|
+
Version: 10.15.0
|
|
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
|
|
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
|
|
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
|
|
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.14.3 → tradedangerous-10.15.0}/tradedangerous/templates/DefaultShipIndex.json
RENAMED
|
File without changes
|
|
File without changes
|
{tradedangerous-10.14.3 → tradedangerous-10.15.0}/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.14.3 → tradedangerous-10.15.0}/tradedangerous.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|