Skip to content

Commit c588224

Browse files
authored
Merge pull request #1023 from ricequant/develop
release 6.2.1
2 parents 98accd7 + 0d3b700 commit c588224

13 files changed

Lines changed: 1462 additions & 341 deletions

File tree

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ rqalpha.system.log
1313
*.so
1414
*.pyc
1515
build/
16-
bundle/
17-
bundle
16+
/bundle/
1817
persist/
1918
.coverage
2019
.tox

messages.pot

Lines changed: 116 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PROJECT VERSION\n"
1010
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11-
"POT-Creation-Date: 2026-06-22 13:58+0800\n"
11+
"POT-Creation-Date: 2026-07-09 19:40+0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -155,31 +155,35 @@ msgid ""
155155
" download-bundle\" to download monthly updated bundle."
156156
msgstr ""
157157

158-
#: rqalpha/cmds/bundle.py:56 rqalpha/cmds/bundle.py:85
158+
#: rqalpha/cmds/bundle.py:56 rqalpha/cmds/bundle.py:91
159159
#, python-brace-format
160160
msgid "rqdatac init failed with error: {}"
161161
msgstr ""
162162

163-
#: rqalpha/cmds/bundle.py:64
163+
#: rqalpha/cmds/bundle.py:64 rqalpha/cmds/bundle.py:102
164+
msgid "Bundle data was not fully updated successfully. Details are as follows:"
165+
msgstr ""
166+
167+
#: rqalpha/cmds/bundle.py:70
164168
msgid "Update bundle using RQDatac"
165169
msgstr ""
166170

167-
#: rqalpha/cmds/bundle.py:75
171+
#: rqalpha/cmds/bundle.py:81
168172
msgid ""
169173
"rqdatac is required to update bundle. you can visit "
170174
"https://www.ricequant.com/welcome/rqdata to get rqdatac, or use \"rqalpha"
171175
" download-bundle\" to download monthly updated bundle."
172176
msgstr ""
173177

174-
#: rqalpha/cmds/bundle.py:89
178+
#: rqalpha/cmds/bundle.py:95
175179
msgid "bundle not exist, use \"rqalpha create-bundle\" command instead"
176180
msgstr ""
177181

178-
#: rqalpha/cmds/bundle.py:98
182+
#: rqalpha/cmds/bundle.py:108
179183
msgid "Download bundle (monthly updated)"
180184
msgstr ""
181185

182-
#: rqalpha/cmds/bundle.py:109
186+
#: rqalpha/cmds/bundle.py:119
183187
#, python-brace-format
184188
msgid ""
185189
"\n"
@@ -189,56 +193,56 @@ msgid ""
189193
" Are you sure to continue?"
190194
msgstr ""
191195

192-
#: rqalpha/cmds/bundle.py:127
196+
#: rqalpha/cmds/bundle.py:137
193197
#, python-brace-format
194198
msgid "Data bundle download successfully in {bundle_path}"
195199
msgstr ""
196200

197-
#: rqalpha/cmds/bundle.py:130
201+
#: rqalpha/cmds/bundle.py:140
198202
msgid "Check bundle"
199203
msgstr ""
200204

201-
#: rqalpha/cmds/bundle.py:144
205+
#: rqalpha/cmds/bundle.py:154
202206
#, python-brace-format
203207
msgid "try {} ..."
204208
msgstr ""
205209

206-
#: rqalpha/cmds/bundle.py:156
210+
#: rqalpha/cmds/bundle.py:166
207211
msgid "downloading ..."
208212
msgstr ""
209213

210-
#: rqalpha/cmds/bundle.py:170
214+
#: rqalpha/cmds/bundle.py:180
211215
#, python-brace-format
212216
msgid ""
213217
"\n"
214218
"Download failed, retry in {} seconds."
215219
msgstr ""
216220

217-
#: rqalpha/cmds/bundle.py:191
221+
#: rqalpha/cmds/bundle.py:201
218222
msgid "corrupted files"
219223
msgstr ""
220224

221-
#: rqalpha/cmds/bundle.py:192
225+
#: rqalpha/cmds/bundle.py:202
222226
msgid "remove files"
223227
msgstr ""
224228

225-
#: rqalpha/cmds/bundle.py:195
229+
#: rqalpha/cmds/bundle.py:205
226230
msgid "remove success"
227231
msgstr ""
228232

229-
#: rqalpha/cmds/bundle.py:197
233+
#: rqalpha/cmds/bundle.py:207
230234
msgid "corrupted files not remove"
231235
msgstr ""
232236

233-
#: rqalpha/cmds/bundle.py:199
237+
#: rqalpha/cmds/bundle.py:209
234238
msgid "input error"
235239
msgstr ""
236240

237-
#: rqalpha/cmds/bundle.py:201
241+
#: rqalpha/cmds/bundle.py:211
238242
msgid "bundle's day bar is incomplete, please update bundle"
239243
msgstr ""
240244

241-
#: rqalpha/cmds/bundle.py:203
245+
#: rqalpha/cmds/bundle.py:213
242246
msgid "good bundle's day bar"
243247
msgstr ""
244248

@@ -276,13 +280,6 @@ msgstr ""
276280
msgid "deprecated parameter[bar_dict] in before_trading function."
277281
msgstr ""
278282

279-
#: rqalpha/data/bundle.py:620 rqalpha/data/bundle/__init__.py:676
280-
#, python-brace-format
281-
msgid ""
282-
"File {} update failed, if it is using, please update later, or you can "
283-
"delete then update again"
284-
msgstr ""
285-
286283
#: rqalpha/data/data_proxy.py:224 rqalpha/data/instruments_mixin.py:50
287284
#, python-brace-format
288285
msgid "No instrument found at {dt}: {id_or_sym}"
@@ -318,8 +315,99 @@ msgid ""
318315
"{}"
319316
msgstr ""
320317

321-
#: rqalpha/data/bundle/check_bundle.py:24
322-
msgid "当前目录缺少 trading_dates.npy 或 instruments.pk 文件,请先下载 base 数据!"
318+
#: rqalpha/data/bundle/__init__.py:61
319+
msgid "Invalid instruments list!"
320+
msgstr ""
321+
322+
#: rqalpha/data/bundle/__init__.py:82
323+
msgid "Got instruments failed!"
324+
msgstr ""
325+
326+
#: rqalpha/data/bundle/__init__.py:89
327+
msgid "Get yield curve data error."
328+
msgstr ""
329+
330+
#: rqalpha/data/bundle/__init__.py:138
331+
msgid "Got no dividend data"
332+
msgstr ""
333+
334+
#: rqalpha/data/bundle/__init__.py:167
335+
msgid "Got no split data"
336+
msgstr ""
337+
338+
#: rqalpha/data/bundle/__init__.py:195
339+
msgid "Got no ex factor data"
340+
msgstr ""
341+
342+
#: rqalpha/data/bundle/__init__.py:215
343+
msgid "Got no share transformation data"
344+
msgstr ""
345+
346+
#: rqalpha/data/bundle/automatic_update.py:95 rqalpha/data/bundle/daybar.py:78
347+
#: rqalpha/data/bundle/daybar.py:126
348+
#, python-brace-format
349+
msgid ""
350+
"File {} update failed, if it is using, please update later, or you can "
351+
"delete then update again"
352+
msgstr ""
353+
354+
#: rqalpha/data/bundle/daybar.py:72 rqalpha/data/bundle/daybar.py:110
355+
msgid "Get instruments failed."
356+
msgstr ""
357+
358+
#: rqalpha/data/bundle/daybar_checker.py:31
359+
#, python-brace-format
360+
msgid "Directory not found: {}"
361+
msgstr ""
362+
363+
#: rqalpha/data/bundle/daybar_checker.py:34
364+
#, python-brace-format
365+
msgid ""
366+
"trading_dates.npy or instruments.pk is missing in {}. Please download the"
367+
" base data first."
368+
msgstr ""
369+
370+
#: rqalpha/data/bundle/daybar_checker.py:42
371+
#, python-brace-format
372+
msgid "Missing files in directory {}: {}. Please update the bundle again."
373+
msgstr ""
374+
375+
#: rqalpha/data/bundle/daybar_checker.py:104
376+
#, python-brace-format
377+
msgid "File {} is being used by another process."
378+
msgstr ""
379+
380+
#: rqalpha/data/bundle/daybar_checker.py:107
381+
#, python-brace-format
382+
msgid "Insufficient permissions for file {}."
383+
msgstr ""
384+
385+
#: rqalpha/data/bundle/daybar_checker.py:111
386+
#, python-brace-format
387+
msgid ""
388+
"Failed to open {}. The file may be corrupted, the path may be invalid, or"
389+
" an underlying I/O error may have occurred."
390+
msgstr ""
391+
392+
#: rqalpha/data/bundle/daybar_checker.py:131
393+
#, python-brace-format
394+
msgid "File {} does not contain any valid dataset"
395+
msgstr ""
396+
397+
#: rqalpha/data/bundle/daybar_checker.py:158
398+
msgid "Detection complete: daybar data quality is good!"
399+
msgstr ""
400+
401+
#: rqalpha/data/bundle/daybar_checker.py:161
402+
#, python-brace-format
403+
msgid ""
404+
"Detection complete: a total of {} files have issues. The specific files "
405+
"and order_book_ids as follows:"
406+
msgstr ""
407+
408+
#: rqalpha/data/bundle/daybar_checker.py:176
409+
#, python-brace-format
410+
msgid "{}(total of {} anomaly): {}"
323411
msgstr ""
324412

325413
#: rqalpha/mod/__init__.py:55

rqalpha/cmds/bundle.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ def create_bundle(data_bundle_path, rqdatac_uri, compression, concurrency):
5858

5959
os.makedirs(os.path.join(data_bundle_path, 'bundle'), exist_ok=True)
6060
from rqalpha.data.bundle import update_bundle as update_bundle_
61-
update_bundle_(os.path.join(data_bundle_path, 'bundle'), True, compression, concurrency)
61+
from rqalpha.data.bundle.utils import get_error_list
62+
succeed = update_bundle_(os.path.join(data_bundle_path, 'bundle'), True, compression, concurrency)
63+
if not succeed:
64+
click.echo(_("Bundle data was not fully updated successfully. Details are as follows:"))
65+
for error in get_error_list():
66+
click.echo(error)
67+
sys.exit(1)
6268

6369

6470
@cli.command(help=_("Update bundle using RQDatac"))
@@ -90,8 +96,12 @@ def update_bundle(data_bundle_path, rqdatac_uri, compression, concurrency):
9096
return 1
9197

9298
from rqalpha.data.bundle import update_bundle as update_bundle_
99+
from rqalpha.data.bundle.utils import get_error_list
93100
succeed = update_bundle_(os.path.join(data_bundle_path, 'bundle'), False, compression, concurrency)
94101
if not succeed:
102+
click.echo(_("Bundle data was not fully updated successfully. Details are as follows:"))
103+
for error in get_error_list():
104+
click.echo(error)
95105
sys.exit(1)
96106

97107

@@ -201,4 +211,3 @@ def check_bundle_data(data_bundle_path):
201211
click.echo(_("bundle's day bar is incomplete, please update bundle"))
202212
else:
203213
click.echo(_("good bundle's day bar"))
204-

0 commit comments

Comments
 (0)