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 #3

Merged
merged 7 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
19 changes: 0 additions & 19 deletions .github/workflows/.pre-commit.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: pre-commit

on:
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ "3.12" ]

steps:
- name: Checkout source repository
uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for testing
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .[test]
- name: Run pre-commit
uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

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

steps:
- name: Checkout source repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

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

steps:
- name: Checkout source repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

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

steps:
- name: Checkout source repository
Expand Down
14 changes: 9 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
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: 23.9.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
Expand All @@ -23,7 +27,7 @@ repos:
- id: blacken-docs
args: [--line-length=120]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: local
Expand All @@ -35,6 +39,6 @@ repos:
types: [python]
require_serial: true
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.5.1'
rev: 'v1.10.0'
hooks:
- id: mypy
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ The most obvious ones are the following:

## Versioning

I use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](../../tags).
I use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](../../tags).

## Documentation
I use the [Numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) style for documentation.
Expand Down
6 changes: 0 additions & 6 deletions pylintrc

This file was deleted.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "ug_gpib"
name = "ug-gpib"
authors = [
{ name="Patrick Baus", email="[email protected]" },
{ name="Jacob Alexander", email="[email protected]" },
Expand All @@ -10,7 +10,6 @@ license = { text="GNU General Public License v3 (GPLv3)" }
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -42,7 +41,7 @@ dev = [
]

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

[tool.pylint.'MESSAGES CONTROL']
Expand Down
1 change: 1 addition & 0 deletions ug_gpib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
A python library for the LQ Electronics Corp. UGPlus USB to GPIB Controller.
"""

from ._version import __version__
from .ug_gpib import UGPlusGpib
1 change: 1 addition & 0 deletions ug_gpib/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""
Version information.
"""

__version__ = "1.2.1"
1 change: 1 addition & 0 deletions ug_gpib/gpib_helper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Helper functions supporting the UGPlusGpib library.
"""

import errno
from typing import Generator

Expand Down
4 changes: 3 additions & 1 deletion ug_gpib/ug_gpib.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A pure Python module for the LQ Electronics Corp UGPlus USB to GPIB Controller using pyUSB.
"""

from __future__ import annotations

import errno
Expand Down Expand Up @@ -208,7 +209,8 @@ def __device_read(self, command_expected: UgPlusCommands) -> bytes | None:
byte_data = self._usb_read(length - 2)

self.__logger.debug(
"Received packet:\n Header:\n Command: %(command)r\n Length %(length)d\n Payload:\n %(payload)s.",
"Received packet:\n Header:\n Command: %(command)r\n Length %(length)d\n Payload:"
"\n %(payload)s.",
{"command": command, "length": length, "payload": [hex(i) for i in byte_data]},
)

Expand Down
Loading