Skip to content

Commit

Permalink
fully switch to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuDartiailh committed May 9, 2022
1 parent cbc3c47 commit e060714
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 110 deletions.
19 changes: 19 additions & 0 deletions .flake8
@@ -0,0 +1,19 @@
[flake8]
exclude =
.git,
__pycache__,
docs/source/conf.py,
old,
build,
dist,
pyvisa/thirdparty/*,
visa.py,
ignore = E203, E266, E501, W503, E731
# line length is intentionally set to 80 here because pyvisa uses Bugbear
# See https://github.com/psf/black/blob/master/README.md#line-length for more details
max-line-length = 80
max-complexity = 18
select = B,C,E,F,W,T4,B9
per-file-ignores =
pyvisa/__init__.py:E402
pyvisa/constants.py:E221
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -55,7 +55,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, 3.10]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
102 changes: 101 additions & 1 deletion pyproject.toml
@@ -1,5 +1,105 @@
[project]
name = "PyVISA"
description = "Python VISA bindings for GPIB, RS232, TCPIP and USB instruments"
readme = "README.rst"
requires-python = ">=3.7"
license = {file = "LICENSE"}
authors = [
{name = "Torsten Bronger", email = "bronger@physik.rwth-aachen.de"},
{name = "Gregor Thalhammer"}
]
maintainers = [
{name = "Matthieu C. Dartiailh", email = "m.dartiailh@gmail.com"}
]
keywords = [
"VISA",
"GPIB",
"USB",
"serial",
"RS232",
"measurement",
"acquisition",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"typing_extensions",
"importlib-metadata; python_version<'3.8'",
"dataclasses; python_version<'3.7'",
]
dynamic=["version"]


[project.urls]
homepage = "https://github.com/pyvisa/pyvisa"
documentation = "https://pyvisa.readthedocs.io/en/latest/"
repository = "https://github.com/pyvisa/pyvisa"
changelog = "https://github.com/pyvisa/pyvisa/blob/main/doc/CHANGES"

[project.scripts]
pyvisa-shell = "pyvisa.cmd_line_tools:visa_shell"
pyvisa-info = "pyvisa.cmd_line_tools:visa_info"

[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.3"]
requires = ["setuptools>=61.2", "wheel", "setuptools_scm[toml]>=3.4.3"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "pyvisa/version.py"
write_to_template = """
# This file is auto-generated by setuptools-scm do NOT edit it.
from collections import namedtuple
#: A namedtuple of the version info for the current release.
_version_info = namedtuple("_version_info", "major minor micro status")
parts = "{version}".split(".", 3)
version_info = _version_info(
int(parts[0]),
int(parts[1]),
int(parts[2]),
parts[3] if len(parts) == 4 else "",
)
# Remove everything but the 'version_info' from this module.
del namedtuple, _version_info, parts
__version__ = "{version}"
"""

[tool.black]
line-length = 88 # Enforce the default value

[tool.pytest.ini_options]
minversion = "6.0"

[tool.mypy]
follow_imports = "normal"
strict_optional = true

[[tool.mypy.overrides]]
module = [
"pyvisa.thirdparty.*",
]
ignore_errors = true

[tool.isort]
profile = "black"
skip = ["pyvisa/thirdparty/prettytable.py", "pyvisa/__init__.py"]

108 changes: 0 additions & 108 deletions setup.cfg

This file was deleted.

0 comments on commit e060714

Please sign in to comment.