Skip to content

Commit

Permalink
Merge pull request #98 from modular-ml/bot_version_bump
Browse files Browse the repository at this point in the history
Automated version bump and other updates
  • Loading branch information
fabawi authored Feb 15, 2024
2 parents 249a9de + d75e1ec commit fffe862
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 40 deletions.
16 changes: 0 additions & 16 deletions docs/source/wrapyfi.standalone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ wrapyfi.standalone package
Submodules
----------

wrapyfi.standalone.mqtt\_publisher module
-----------------------------------------

.. automodule:: wrapyfi.standalone.mqtt_publisher
:members:
:undoc-members:
:show-inheritance:

wrapyfi.standalone.mqtt\_subscriber module
------------------------------------------

.. automodule:: wrapyfi.standalone.mqtt_subscriber
:members:
:undoc-members:
:show-inheritance:

wrapyfi.standalone.zeromq\_param\_server module
-----------------------------------------------

Expand Down
27 changes: 16 additions & 11 deletions examples/sensors/cam_mic.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ def capture_cam_mic(self):
pass
elif self.enable_video:
while True:
self.collect_cam(mware=self.mware, img_width=self.img_width, img_height=self.img_height)
self.collect_cam(
mware=self.mware,
img_width=self.img_width,
img_height=self.img_height,
)

def _mic_callback(self, audio, frames, time, status):
"""
Expand Down Expand Up @@ -291,16 +295,17 @@ def main(args):
print(sd.query_devices())
return

cam_mic = CamMic(stream=args.stream,
mic_source=args.mic_source,
mic_rate=args.mic_rate,
mic_chunk=args.mic_chunk,
mic_channels=args.mic_channels,
img_source=args.img_source,
img_width=args.img_width,
img_height=args.img_height,
mware=args.mware,
)
cam_mic = CamMic(
stream=args.stream,
mic_source=args.mic_source,
mic_rate=args.mic_rate,
mic_chunk=args.mic_chunk,
mic_channels=args.mic_channels,
img_source=args.img_source,
img_width=args.img_width,
img_height=args.img_height,
mware=args.mware,
)

if args.mode == "publish":
cam_mic.activate_communication(CamMic.collect_cam, mode="publish")
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[project]
name = "wrapyfi"
version = "0.4.40"
version = "0.4.41"
description = "Wrapyfi is a wrapper for simplifying Middleware communication"
readme = "README.md"
authors = [
Expand Down Expand Up @@ -31,6 +31,8 @@ classifiers = [
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Human Machine Interfaces",
"Topic :: System :: Distributed Computing",
"Operating System :: Microsoft :: Windows :: Windows 10",
"Operating System :: Microsoft :: Windows :: Windows 11",
]

[project.urls]
Expand Down
8 changes: 5 additions & 3 deletions wrapyfi/listeners/zeromq.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@

if os.name == "nt" and ZEROMQ_PUBSUB_MONITOR_LISTENER_SPAWN == "process":
ZEROMQ_PUBSUB_MONITOR_LISTENER_SPAWN = "thread"
logging.warning("[ZeroMQ] Wrapyfi does not support multiprocessing on Windows. Please set "
"the environment variable WRAPYFI_ZEROMQ_PUBSUB_MONITOR_LISTENER_SPAWN='thread'. "
"Switching automatically to 'thread' mode. ")
logging.warning(
"[ZeroMQ] Wrapyfi does not support multiprocessing on Windows. Please set "
"the environment variable WRAPYFI_ZEROMQ_PUBSUB_MONITOR_LISTENER_SPAWN='thread'. "
"Switching automatically to 'thread' mode. "
)


class ZeroMQListener(Listener):
Expand Down
16 changes: 10 additions & 6 deletions wrapyfi/publishers/zeromq.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@

if os.name == "nt" and PROXY_BROKER_SPAWN == "process" and START_PROXY_BROKER:
PROXY_BROKER_SPAWN = "thread"
logging.warning("[ZeroMQ] Wrapyfi does not support multiprocessing on Windows. Please set "
"the environment variable WRAPYFI_ZEROMQ_PROXY_BROKER_SPAWN='thread'. "
"Switching automatically to 'thread' mode. ")
logging.warning(
"[ZeroMQ] Wrapyfi does not support multiprocessing on Windows. Please set "
"the environment variable WRAPYFI_ZEROMQ_PROXY_BROKER_SPAWN='thread'. "
"Switching automatically to 'thread' mode. "
)

if os.name == "nt" and ZEROMQ_PUBSUB_MONITOR_LISTENER_SPAWN == "process":
ZEROMQ_PUBSUB_MONITOR_LISTENER_SPAWN = "thread"
logging.warning("[ZeroMQ] Wrapyfi does not support multiprocessing on Windows. Please set "
"the environment variable WRAPYFI_ZEROMQ_PUBSUB_MONITOR_LISTENER_SPAWN='thread'. "
"Switching automatically to 'thread' mode. ")
logging.warning(
"[ZeroMQ] Wrapyfi does not support multiprocessing on Windows. Please set "
"the environment variable WRAPYFI_ZEROMQ_PUBSUB_MONITOR_LISTENER_SPAWN='thread'. "
"Switching automatically to 'thread' mode. "
)


class ZeroMQPublisher(Publisher):
Expand Down
8 changes: 5 additions & 3 deletions wrapyfi/servers/zeromq.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@

if os.name == "nt" and PROXY_BROKER_SPAWN == "process" and START_PROXY_BROKER:
PROXY_BROKER_SPAWN = "thread"
logging.warning("[ZeroMQ] Wrapyfi does not support multiprocessing on Windows. Please set "
"the environment variable WRAPYFI_ZEROMQ_PROXY_BROKER_SPAWN='thread'. "
"Switching automatically to 'thread' mode. ")
logging.warning(
"[ZeroMQ] Wrapyfi does not support multiprocessing on Windows. Please set "
"the environment variable WRAPYFI_ZEROMQ_PROXY_BROKER_SPAWN='thread'. "
"Switching automatically to 'thread' mode. "
)


class ZeroMQServer(Server):
Expand Down

0 comments on commit fffe862

Please sign in to comment.