Skip to content

Commit d0392a0

Browse files
authored
1.105.1
2 parents 79b4d77 + 2344c83 commit d0392a0

File tree

12 files changed

+215
-136
lines changed

12 files changed

+215
-136
lines changed

.github/workflows/test-tag-publish.yml

+12-14
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,12 @@ jobs:
197197
asset_name: ${{ env.ASSET_NAME }}
198198
asset_content_type: application/zip
199199

200-
# TODO: Temporarily out of space of PyPI
201-
# # Publish
202-
# - name: Publish to production PyPI
203-
# env:
204-
# POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
205-
# POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
206-
# run: poetry publish
200+
# Publish
201+
- name: Publish to production PyPI
202+
env:
203+
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
204+
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
205+
run: poetry publish
207206

208207

209208
publish_wheels:
@@ -271,10 +270,9 @@ jobs:
271270
asset_name: ${{ env.ASSET_NAME }}
272271
asset_content_type: application/wheel
273272

274-
# TODO: Temporarily out of space of PyPI
275-
# # Publish
276-
# - name: Publish to production PyPI
277-
# env:
278-
# POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
279-
# POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
280-
# run: poetry publish
273+
# Publish
274+
- name: Publish to production PyPI
275+
env:
276+
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
277+
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
278+
run: poetry publish

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
![pypi-format](https://img.shields.io/pypi/format/nautilus_trader?color=blue)
1616
[![code-style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
1717

18-
**The project is temporarily out of space on PyPI. Please install from source for the latest version.**
19-
2018
## Introduction
2119

2220
NautilusTrader is an open-source, high-performance, production-grade algorithmic trading platform,

nautilus_trader/data/engine.pyx

+18-12
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ cdef class DataEngine(Component):
440440
elif isinstance(command, Unsubscribe):
441441
self._handle_unsubscribe(client, command)
442442
else:
443-
self._log.error(f"Cannot handle unrecognized command {command}.")
443+
self._log.error(f"Cannot handle command: unrecognized {command}.")
444444

445445
cdef inline void _handle_subscribe(self, DataClient client, Subscribe command) except *:
446446
if command.data_type.type == Instrument:
@@ -475,10 +475,11 @@ cdef class DataEngine(Component):
475475
command.handler,
476476
)
477477
else:
478-
try:
479-
client.subscribe(command.data_type)
480-
except NotImplementedError:
481-
self._log.error(f"Cannot subscribe to unrecognized data type {command.data_type}.")
478+
self._handle_subscribe_data(
479+
client,
480+
command.data_type,
481+
command.handler,
482+
)
482483

483484
cdef inline void _handle_unsubscribe(self, DataClient client, Unsubscribe command) except *:
484485
if command.data_type.type == Instrument:
@@ -513,10 +514,11 @@ cdef class DataEngine(Component):
513514
command.handler,
514515
)
515516
else:
516-
try:
517-
client.unsubscribe(command.data_type)
518-
except NotImplementedError:
519-
self._log.error(f"Cannot subscribe to unrecognized data type {command.data_type}.")
517+
self._handle_unsubscribe_data(
518+
client,
519+
command.data_type,
520+
command.handler,
521+
)
520522

521523
cdef inline void _handle_subscribe_instrument(
522524
self,
@@ -681,8 +683,12 @@ cdef class DataEngine(Component):
681683

682684
if data_type not in self._data_handlers:
683685
# Setup handlers
686+
try:
687+
client.subscribe(data_type)
688+
except NotImplementedError:
689+
self._log.error(f"Cannot subscribe: {client.name} has not implemented data type {data_type} subscriptions.")
690+
return
684691
self._data_handlers[data_type] = [] # type: list[callable]
685-
client.subscribe(data_type)
686692
self._log.info(f"Subscribed to {data_type} data.")
687693

688694
# Add handler for subscriber
@@ -941,7 +947,7 @@ cdef class DataEngine(Component):
941947
try:
942948
client.request(request.data_type, request.id)
943949
except NotImplementedError:
944-
self._log.error(f"Cannot handle request: DataType {request.data_type} is unrecognized.")
950+
self._log.error(f"Cannot handle request: unrecognized data type {request.data_type}.")
945951

946952
# -- DATA HANDLERS ---------------------------------------------------------------------------------
947953

@@ -961,7 +967,7 @@ cdef class DataEngine(Component):
961967
elif isinstance(data, Data):
962968
self._handle_custom_data(data)
963969
else:
964-
self._log.error(f"Cannot handle data: {data} is an unrecognized type: {type(data)}.")
970+
self._log.error(f"Cannot handle data: unrecognized type {type(data)} {data}.")
965971

966972
cdef inline void _handle_instrument(self, Instrument instrument) except *:
967973
self.cache.add_instrument(instrument)

nautilus_trader/execution/engine.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ cdef class ExecutionEngine(Component):
450450
elif isinstance(command, CancelOrder):
451451
self._handle_cancel_order(client, command)
452452
else:
453-
self._log.error(f"Cannot handle unrecognized command: {command}.")
453+
self._log.error(f"Cannot handle command: unrecognized {command}.")
454454

455455
cdef inline void _handle_submit_order(self, ExecutionClient client, SubmitOrder command) except *:
456456
# Validate command
@@ -579,7 +579,7 @@ cdef class ExecutionEngine(Component):
579579
elif isinstance(event, AccountState):
580580
self._handle_account_event(event)
581581
else:
582-
self._log.error(f"Cannot handle unrecognized event: {event}.")
582+
self._log.error(f"Cannot handle event: unrecognized {event}.")
583583

584584
cdef inline void _handle_account_event(self, AccountState event) except *:
585585
cdef Account account = self.cache.account(event.account_id)

nautilus_trader/live/data_engine.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ cdef class LiveDataEngine(DataEngine):
298298
elif message.type == MessageType.RESPONSE:
299299
self._handle_response(message)
300300
else:
301-
self._log.error(f"Cannot handle unrecognized message {message}.")
301+
self._log.error(f"Cannot handle message: unrecognized {message}.")
302302
except CancelledError:
303303
if self.message_qsize() > 0:
304304
self._log.warning(f"Running cancelled "

nautilus_trader/live/execution_engine.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ cdef class LiveExecutionEngine(ExecutionEngine):
291291
elif message.type == MessageType.COMMAND:
292292
self._execute_command(message)
293293
else:
294-
self._log.error(f"Cannot handle unrecognized message {message}.")
294+
self._log.error(f"Cannot handle message: unrecognized {message}.")
295295
except CancelledError:
296296
if self.qsize() > 0:
297297
self._log.warning(f"Running cancelled "

nautilus_trader/serialization/serializers.pyx

+4-4
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ cdef class MsgPackCommandSerializer(CommandSerializer):
331331
package[CLIENT_ORDER_ID] = command.cl_ord_id.value
332332
package[ORDER_ID] = command.order_id.value
333333
else:
334-
raise RuntimeError("Cannot serialize command, unrecognized command")
334+
raise RuntimeError(f"Cannot serialize command: unrecognized command {command}")
335335

336336
return MsgPackSerializer.serialize(package)
337337

@@ -409,7 +409,7 @@ cdef class MsgPackCommandSerializer(CommandSerializer):
409409
command_timestamp,
410410
)
411411
else:
412-
raise RuntimeError("Cannot deserialize command, unrecognized bytes pattern")
412+
raise RuntimeError("Cannot deserialize command: unrecognized bytes pattern")
413413

414414

415415
cdef class MsgPackEventSerializer(EventSerializer):
@@ -544,7 +544,7 @@ cdef class MsgPackEventSerializer(EventSerializer):
544544
package[LIQUIDITY_SIDE] = LiquiditySideParser.to_str(event.liquidity_side)
545545
package[EXECUTION_TIME] = ObjectParser.datetime_to_str(event.execution_time)
546546
else:
547-
raise RuntimeError("Cannot serialize event, unrecognized event")
547+
raise RuntimeError(f"Cannot serialize event: unrecognized event {event}")
548548

549549
return MsgPackSerializer.serialize(package)
550550

@@ -719,4 +719,4 @@ cdef class MsgPackEventSerializer(EventSerializer):
719719
event_timestamp,
720720
)
721721
else:
722-
raise RuntimeError(f"Cannot deserialize event, unrecognized event {event_type}")
722+
raise RuntimeError(f"Cannot deserialize event: unrecognized event {event_type}")

poetry.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "nautilus_trader"
7-
version = "1.105.0"
7+
version = "1.105.1"
88
description = "A high-performance algorithmic trading platform and event-driven backtester"
99
authors = ["Nautech Systems <[email protected]>"]
1010
license = "LGPL-3.0-or-later"
@@ -33,7 +33,7 @@ generate-setup-file = false
3333

3434
[tool.poetry.dependencies]
3535
python = "^3.7.9"
36-
ccxt = "^1.42.1"
36+
ccxt = "^1.42.18"
3737
cython = "^3.0a6"
3838
empyrical = "^0.5.5"
3939
# `importlib.metadata` is in the Python stdlib from 3.8 onwards

0 commit comments

Comments
 (0)