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

Convert configuration to pyproject.toml, still using setuptools #917

Merged
merged 2 commits into from
Dec 5, 2023
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
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
exclude = .git,.tox,__pycache__,.eggs,dist,.venv*,docs,build
max-line-length = 88
extend-ignore = W503,W504,E203
124 changes: 124 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "globus-sdk"
authors = [
{ name = "Globus Team", email = "[email protected]" },
]
description = "Globus SDK for Python"
keywords = ["globus"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.7"
dependencies = [
"requests>=2.19.1,<3.0.0",
"pyjwt[crypto]>=2.0.0,<3.0.0",
# cryptography 3.4.0 is known-bugged, see:
# https://github.com/pyca/cryptography/issues/5756
# pyjwt requires cryptography>=3.3.1,
# so there's no point in setting a lower bound than that
"cryptography>=3.3.1,!=3.4.0",
# depend on the latest version of typing-extensions on python versions which do
# not have all of the typing features we use
'typing_extensions>=4.0; python_version<"3.10"',
]
dynamic = ["version"]

[project.readme]
file = "README.rst"
content-type = "text/x-rst"

[project.license]
text = "Apache-2.0"

[project.urls]
Homepage = "https://github.com/globus/globus-sdk-python"

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

[tool.setuptools.package-data]
globus_sdk = ["py.typed"]

[tool.setuptools.dynamic.version]
attr = "globus_sdk.__version__"

# non-packaging tool configs follow

[tool.pytest.ini_options]
addopts = "--no-success-flaky-report"
testpaths = ["tests"]
norecursedirs = ["tests/non-pytest"]
filterwarnings = [
"error",
]

[tool.scriv]
version = "literal: src/globus_sdk/version.py: __version__"
format = "rst"
output_file = "changelog.rst"
entry_title_template = 'v{{ version }} ({{ date.strftime(\"%Y-%m-%d\") }})'
rst_header_chars = "-~"
categories = [
"Python Support",
"Added",
"Removed",
"Changed",
"Deprecated",
"Fixed",
"Documentation",
"Security",
"Development",
]

[tool.isort]
profile = "black"
known_first_party = ["tests", "globus_sdk"]

[tool.mypy]
strict = true
warn_unreachable = true
warn_no_return = true

[tool.pylint]
load-plugins = ["pylint.extensions.docparams"]
accept-no-param-doc = "false"

[tool.pylint."messages control"]
disable = [
# formatting and cosmetic rules (handled by 'black', etc)
"format", "C",
# refactoring rules (e.g. duplicate or similar code) are very prone to
# false positives
"R",
# emitted when pylint fails to import a module; these warnings
# are usually false-positives for optional dependencies
"import-error",
# "disallowed" usage of our own classes and objects gets underfoot
"protected-access",
# objections to log messages doing eager (vs lazy) string formatting
# the perf benefit of deferred logging doesn't always outweigh the readability cost
"logging-fstring-interpolation", "logging-format-interpolation",
# fixme comments are often useful; re-enable this to quickly find FIXME and
# TODO comments
"fixme",
# most SDK methods currently do not document the exceptions which they raise
# this is an area for potential improvement
"missing-raises-doc",
]

[tool.pylint.variables]
ignored-argument-names = "args|kwargs"
141 changes: 0 additions & 141 deletions setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ commands_pre = -coverage combine
commands = coverage report --skip-covered

[testenv:lint]
deps = pre-commit<3
deps = pre-commit
skip_install = true
commands = pre-commit run --all-files

Expand Down