diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9f96ec6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -language: python -sudo: false -cache: pip - -addons: - sonarcloud: - organization: marrow - token: - secure: "a4sgEt0pqOFHTysCYOivgMORNrx80tbovuVXFMXfal8fXdJZWynSmw0Ulte+maWOQJ50f9Owo/UAPY0Em36wMeIi96j5ZTtLEkPYcnU12NW823t8Dkd1l5BImqpeE8B9A+hlJLnHx8RCbQ3WA1hxemrS8rrJHzy5Kr1S5c4GbEGKOOHBQ7jYU1dfnB7Gdu/BzY1bmitDkAKEysa/8mQ60JzVxv6/bsiNAr15iv+pwmUwOPni26j3+wSZKY1j5b2mlTqmRH7/aPBVRTDRYEBBGKgGHb0nprho74fKLmT5LCYoDovoSni6P8Pvf6APM0FonomaXTLin8Muhj0DRMBaFmBp0B1azHkXJB6e7K91aHRW1HG9lr8iN2dh+IxyBQY6jT0ajvnmU3eghHtYJtWulVoKaUbvMmoAs9Vl0n4orc4cq/3uma7VURF8UKb+4xy8dB+O9EtbugQ/dINfiNXhrToKK8WzzMHrze4Jvq+PaWjTO99fYeXpku8CHa0h8JG+RaP8HhXNpZS4RLSvAAHjZOSN1jtIvIWGuDeqfXuhkrWtZVDZOAT2eMqU/ziPqOReuhWcwCB0z89QNVIdaakBZ9BFJWOw+9j545FS+GYLJYdyQa61/h+YZblu7uYMjDsaShe0pjM60qOpRIvXrYJb8/HJBZ9IhmaTUY6gcBcTM5s=" - -git: - depth: false - -branches: - except: - - /^[^/]+/.+$/ - -python: - - "pypy3" - - "3.6" - - "3.7" - - "3.8" - - "3.9" - -env: - - '' - - 'OPTIONAL="markupsafe"' - -install: - - 'travis_retry pip install --upgrade setuptools pip' - - 'test -z "${OPTIONAL}" || pip install ${OPTIONAL}' - -script: - python setup.py test - -after_script: - bash <(curl -s https://codecov.io/bash) - -after_success: - - sonar-scanner - -notifications: - irc: - channels: - - 'irc.freenode.org#webcore' - use_notice: true - skip_join: true - on_success: change - on_failure: always - template: - - "%{repository_slug}:%{branch}@%{commit} %{message}" - - "Duration: %{duration} - Details: %{build_url}" diff --git a/pyproject.toml b/pyproject.toml index 3639f10..3c3c91e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,10 +19,10 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "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 :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", @@ -35,43 +35,98 @@ dynamic = ["version"] http = ['requests'] # Support for the http:// and https:// protocols. test = [ 'pytest', # test collector and extensible runner - 'pytest-cov', # coverage reporting + 'pytest-cov[toml]', # coverage reporting 'pytest-flakes', # syntax validation 'pytest-isort', # import ordering 'webob', # Request WSGI environment mocking. + 'requests', # Support for the http:// and https:// protocols. ] development = [ # Development-time dependencies. 'pytest', # test collector and extensible runner - 'pytest-cov', # coverage reporting + 'pytest-cov[toml]', # coverage reporting 'pytest-flakes', # syntax validation 'pytest-isort', # import ordering 'webob', # Request WSGI environment mocking. + 'requests', # Support for the http:// and https:// protocols. 'pre-commit', # Commit hooks for code quality. 'mypy', # Type hinting analysis. 'rope', # Project symbols collection. 'bandit', # Automated security analysis. 'ptipython', # Enhanced interactive REPL shell. - 'e', # python -me + 'e', # python3 -me ] [project.entry-points."uri.scheme"] # https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml # https://www.w3.org/wiki/UriSchemes -file = "uri.scheme:URLScheme" -ftp = "uri.scheme:URLScheme" -http = "uri.scheme:URLScheme" -https = "uri.scheme:URLScheme" -irc = "uri.scheme:URLScheme" -ldap = "uri.scheme:URLScheme" -telnet = "uri.scheme:URLScheme" -sftp = "uri.scheme:URLScheme" +file = 'uri.scheme:URLScheme' +ftp = 'uri.scheme:URLScheme' +http = 'uri.scheme:URLScheme' +https = 'uri.scheme:URLScheme' +irc = 'uri.scheme:URLScheme' +ldap = 'uri.scheme:URLScheme' +telnet = 'uri.scheme:URLScheme' +sftp = 'uri.scheme:URLScheme' # Care of https://github.com/APSL/uri/commit/709b4b73daae7b8651b92fd4fa63af41c4db2986 -mysql = "uri.scheme:URLScheme" -redis = "uri.scheme:URLScheme" -# https://docs.mongodb.com/manual/reference/connection-string -mongodb = "uri.scheme:URLScheme" +mysql = 'uri.scheme:URLScheme' +redis = 'uri.scheme:URLScheme' +postgres = 'uri.scheme:URLScheme' +postgresql = 'uri.scheme:URLScheme' +mongodb = 'uri.scheme:URLScheme' # https://docs.mongodb.com/manual/reference/connection-string [tool.setuptools_scm] +[tool.pytest.ini_options] +addopts = '-l -r fEsxw --cov uri --no-cov-on-fail --cov-report term-missing --cov-report xml --flakes --isort --durations=5 --color=yes test' +#addopts = [ +# '-l', '-r', 'fEsxw', +# '--flakes', # PyFlakes formatting. +# '--isort', # Ensure we have properly sorted imports. +# '--cov-report term-missing', # Print report to terminal. +# '--cov-report xml', # But also write to X-Unit XML file. +# '--no-cov-on-fail', # Don't bother reporting if we failed. +# '--cov uri', # Specifically examine coverage for our package. +# '--durations=5', # Also track the slowest tests to execute. +# '--color=yes', # Pretty is nice. +# 'test' +# ] + +flakes-ignore = [ + 'test/*.py UnusedImport', + 'test/*/*.py UnusedImport ImportStarUsed', + ] + +filterwarnings = [ + 'default', + 'ignore::DeprecationWarning:isort.*', + ] + + +[tool.coverage.report] +exclude_lines = [ + # Re-enable the standard pragma, since we override it. + 'pragma: no( |-)?cov(er)?', + + # Don't complain if non-runnable code isn't run: + 'if 0:', + 'if False:', + 'if __name__ == .__main__.:', + ] + + +[tool.isort] +line_length = 120 +multi_line_output = 3 +balanced_wrapping = false +include_trailing_comma = true +indent = " " +sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER" +verbose = true +known_first_party = ["uri"] + + +[tool.black] +line_length = 120 + diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 7c31202..0000000 --- a/setup.cfg +++ /dev/null @@ -1,78 +0,0 @@ -[aliases] -test = pytest - -[check] -metadata = 1 -restructuredtext = 1 - -[clean] -build-base = .packaging/build -bdist-base = .packaging/dist - -[build] -build-base = .packaging/build - -[install] -optimize = 1 - -[bdist] -bdist-base = .packaging/dist -dist-dir = .packaging/release - -[bdist_wheel] -bdist-dir = .packaging/dist -dist-dir = .packaging/release - -[register] -;repository = https://pypi.python.org/pypi -strict = 1 - -[upload] -;repository = https://pypi.python.org/pypi -sign = 1 -;identity = ... - -[isort] -line_length = 120 -multi_line_output = 4 -balanced_wrapping = True -indent=' ' -sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER -skip = setup.py -verbose = True -known_first_party = - uri - -[tool:pytest] -addopts = - -l -r fEsxw - --flakes - --cov-report term-missing - --cov-report xml - --no-cov-on-fail - --cov uri - --durations=5 - --color=yes - --isort - test - -flakes-ignore = - test/*.py UnusedImport - test/*/*.py UnusedImport ImportStarUsed - -filterwarnings = - default - ignore::DeprecationWarning:isort.* - -[wheel] -universal = 0 - -[coverage:report] -exclude_lines = - # Re-enable the standard pragma, since we override it. - pragma: no( |-)?cov(er)? - - # Don't complain if non-runnable code isn't run: - if 0: - if False: - if __name__ == .__main__.: