Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated pyproject.toml to fix the changes made in pypa/setuptools#4159 #4

Merged
merged 5 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
python-version: [ "3.12" ]

steps:
- name: Checkout source repository
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-executables-have-shebangs
# Check for invalid files
- id: check-toml
# Check Python files
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: check-executables-have-shebangs
- id: requirements-txt-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
Expand Down
20 changes: 10 additions & 10 deletions examples/advanced_mqtt/push_to_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ async def data_consumer(input_queue: asyncio.Queue[Decimal], reconnect_interval:
# Only get a new value from the queue, if we have successfully sent it to the network
if payload is None:
value = await input_queue.get()
# convert payload to JSON
# Typically sensors return data as decimals or ints to preserve the precision
payload = json.dumps(
{
"timestamp": time.time(), # The current timestamp
"uuid": str(DEVICE_UUID), # The unique device id to identify the sender on the network
"value": value,
},
use_decimal=True,
)
# convert payload to JSON
# Typically sensors return data as decimals or ints to preserve the precision
payload = json.dumps(
{
"timestamp": time.time(), # The current timestamp
"uuid": str(DEVICE_UUID), # The unique device id to identify the sender on the network
"value": value,
},
use_decimal=True,
)
await mqtt_client.publish(MQTT_TOPIC, payload=payload, qos=2)
payload = None
input_queue.task_done() # finally mark the job as done
Expand Down
1 change: 1 addition & 0 deletions prologix_gpib_async/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""
Version information.
"""

__version__ = "1.4.13"
1 change: 1 addition & 0 deletions prologix_gpib_async/ip_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
version uses a connection pool to reduce the number of individual connections made to the host. This
is useful for embedded devices, that can only manage a limited number of connections like the prologix adapters.
"""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions prologix_gpib_async/prologix_gpib_async.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This file implements the API used by the Prologix GPIB adapters in pure python using AsyncIO.
"""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions prologix_gpib_async/prologix_gpib_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This file contains the base classes of a GPIB controller or device.
"""

from __future__ import annotations

from .ip_connection import AsyncSharedIPConnection
Expand Down
1 change: 1 addition & 0 deletions prologix_gpib_async/prologix_gpib_ethernet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This file contains classes for the Prologix GPIB Ethernet adapter.
The manual can be found here: http://prologix.biz/downloads/PrologixGpibEthernetManual.pdf
"""

from .ip_connection import AsyncSharedIPConnection
from .prologix_gpib_async import EosMode
from .prologix_gpib_base import AsyncPrologixGpibController, AsyncPrologixGpibDevice
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "prologix_gpib_async"
name = "prologix-gpib-async"
authors = [
{ name="Patrick Baus", email="[email protected]" },
]
Expand Down Expand Up @@ -40,7 +40,7 @@ dev = [
]

test = [
"asyncio_mqtt", "mypy", "pylint", "simplejson",
"asyncio_mqtt", "mypy", "pylint", "setuptools", "simplejson",
]

[tool.pylint.'MESSAGES CONTROL']
Expand Down