Skip to content

Commit

Permalink
Merge pull request #42 from VCTLabs/pkg-sprucing
Browse files Browse the repository at this point in the history
Improve versioning
  • Loading branch information
sarnold authored Oct 27, 2024
2 parents 08f1ebc + 44bdfd0 commit 1e0948c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 22 deletions.
36 changes: 20 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
===============================
Python bindings for redis-ipc
===============================
====================================
Python implementation of redis-ipc
====================================

A small python module implementing redis-ipc concepts.

|ci| |pylint| |bandit|

|pre| |cov|
|pre| |cov| |contributors|

|python| |tag| |license| |style|

redis-ipc is an example of how redis_ can be used as an advanced IPC
mechanism on an embedded Linux system, for instance as a substitute for the
more common choice of dbus.
redis-ipc (the concept) comes in 2 flavors, a python module (this repo)
and a lightweight C library implementation. See the (original)
`redis-ipc C library`_ repo for a more detailed description.

redis-ipc is intended to make communication among different logical components
of a system convenient. It is not intended to replace shared memory for high
data-rate transfers between processes, where lowest possible overhead is key,
but to provide a convenient and reliable way to implement the following
IPC mechanisms:
``redis_ipc`` (the Python module) is an example of how redis_ can be used
as an advanced IPC mechanism on an embedded Linux system, for instance
as a substitute for the more common choice of dbus.

``redis_ipc`` is intended to make communication among different logical
components of a system convenient. It is not intended to replace shared
memory for high data-rate transfers between processes, where lowest
possible overhead is key, but to provide a convenient and reliable way
to implement the following IPC mechanisms:

* command queues
* settings
* status
* event channels

redis-ipc comes in 2 flavors, a python module (this repo) and a lightweight
C library implementation. See the (original) `redis-ipc C library`_ repo for
a more detailed description.

.. _redis-ipc C library: https://github.com/VCTLabs/redis-ipc


Expand Down Expand Up @@ -278,3 +278,7 @@ remember to specify the socket path when running redis-cli ::
.. |style| image:: https://img.shields.io/badge/Py%20code%20style-pylint-00000.svg
:target: https://github.com/pycqa/pylint/
:alt: Python Style

.. |contributors| image:: https://img.shields.io/github/contributors/VCTLabs/redis-ipc-py
:target: https://github.com/VCTLabs/redis-ipc-py/
:alt: Contributors
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[build-system]
requires = ["setuptools>=40.8.0"]
requires = [
"setuptools>=45",
"setuptools_scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[tool.coverage.run]
branch = true
source = ["redis_ipc.py"]
Expand Down
6 changes: 4 additions & 2 deletions redis_ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@
import os
import tempfile
import time
from importlib.metadata import version
from pathlib import Path

import redis
from redis import ConnectionPool, StrictRedis

__version__ = '0.0.1'

# instead of global pdb import, add this where you want to start debugger:
# import pdb; pdb.set_trace()


__version__ = version('redis_ipc')


# exceptions
class RedisIpcExc(Exception):
"""
Expand Down
7 changes: 5 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = redis_ipc
version = attr: redis_ipc.__version__
attr: setuptools_scm.get_version
author = The redis_ipc Authors
author_email = <[email protected]>
maintainer = Steve Arnold
Expand All @@ -25,12 +25,15 @@ classifiers =
Topic :: Software Development :: Testing

[options]
python_requires = >=3.6
python_requires = >=3.8
zip_safe = True

py_modules =
redis_ipc

setup_requires =
setuptools_scm[toml]

install_requires =
importlib-metadata; python_version < '3.8'
redis
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ deps =

commands =
pip install redis_ipc --pre --prefer-binary -f dist/
python -c 'import pkg_resources; print(pkg_resources.get_distribution("redis_ipc").version)'
python -c 'from redis_ipc import __version__; print(f"redis_ipc: {__version__}")'

[testenv:docs]
skip_install = true
Expand Down

0 comments on commit 1e0948c

Please sign in to comment.