Skip to content

Commit

Permalink
Merge branch 'next' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgregor committed Dec 13, 2023
2 parents 4fc53ac + 8a2bd79 commit 9160de7
Show file tree
Hide file tree
Showing 22 changed files with 308 additions and 384 deletions.
2 changes: 1 addition & 1 deletion .bandit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bandit]
exclude: /env,.eggs,.packaging,.cache
exclude: .*cache,.venv
38 changes: 38 additions & 0 deletions .github/workflows/notify-irc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Push Notification"
on: [push, pull_request, create]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: irc push
uses: rectalogic/notify-irc@v1
if: github.event_name == 'push'
with:
server: "irc.libera.chat"
channel: "#marrow"
nickname: marrow
notice: true
message: |
${{ github.actor }} pushed ${{ github.event.ref }} ${{ github.event.compare }}
${{ join(github.event.commits.*.message) }}
- name: irc pull request
uses: rectalogic/notify-irc@v1
if: github.event_name == 'pull_request'
with:
server: "irc.libera.chat"
channel: "#marrow"
nickname: marrow
notice: true
message: |
${{ github.actor }} opened PR ${{ github.event.html_url }}
- name: irc tag created
uses: rectalogic/notify-irc@v1
if: github.event_name == 'create' && github.event.ref_type == 'tag'
with:
server: "irc.libera.chat"
channel: "#marrow"
nickname: marrow
notice: true
message: |
${{ github.actor }} tagged ${{ github.repository }} ${{ github.event.ref }}
6 changes: 3 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9]
python-version: [3.8, 3.9, 3.10, 3.11]

steps:
- uses: actions/checkout@v2
Expand All @@ -25,8 +25,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[development]'
python -m pip install -U setuptools pip wheel
python -m pip install -e '.[test]'
- name: Test with pytest
run: |
pytest
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
dist

# Virtual Environment Pseudo-Chroot
.venv
bin
include
lib
Expand All @@ -21,8 +22,7 @@ var
third-party

# Unit Test / Coverage Reports
.pytest_cache
.cache
.*cache
.cagoule.db
.coverage
.tox
Expand Down
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2017-2021 Alice Bevan-McGregor and contributors.
Copyright © 2017-2023 Alice Bevan-McGregor and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,20 @@ test: develop
@pytest --no-header --no-summary

watch: develop
find . -iname \*.py | entr -c pytest --no-header --no-summary
@clear
@find . -iname \*.py | entr -c pytest --no-header --ff --maxfail=1

mpy: develop
@clear
@find uri -iname \*.py | entr -c mypy -p uri

release:
@echo "Needs to be reimplemented."
#./setup.py sdist bdist_wheel upload ${RELEASE_OPTIONS}
#@echo -e "\nView online at: https://pypi.python.org/pypi/${PROJECT} or https://pypi.org/project/${PROJECT}/"
#@echo -e "Remember to make a release announcement and upload contents of .packaging/release/ folder as a Release on GitHub.\n"

${PROJECT}.egg-info/PKG-INFO: setup.py setup.cfg uri/release.py
${PROJECT}.egg-info/PKG-INFO: pyproject.toml
@mkdir -p ${VIRTUAL_ENV}/lib/pip-cache
pip install --cache-dir "${VIRTUAL_ENV}/lib/pip-cache" -Ue ".[${USE}]"

147 changes: 147 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
[build-system]
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "uri"
authors = [
{name="Alice Bevan-McGregor", email="[email protected]"},
]
description = "A type to represent, query, and manipulate a Uniform Resource Identifier."
readme = "README.rst"
requires-python = ">=3.8"
keywords = ['type', 'URI', 'URL', 'rfc', 'rfc']
license = {text='MIT'}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Topic :: Utilities"
]
dependencies = [] # URI has no direct runtime dependencies.
dynamic = ["version"]

[project.urls]
Repository = "https://github.com/marrow/uri.git"

[project.optional-dependencies]
http = ['requests'] # Support for the http:// and https:// protocols.
test = [
'pytest', # Test collector and extensible runner.
'pytest-black', # Syntax linting.
'pytest-cov[toml]', # Coverage reporting.
'pytest-flakes', # Syntax validation.
'pytest-isort', # Import ordering.
'pytest-mypy', # Static type validation.
'requests', # Support for the http:// and https:// protocols.
'types-setuptools', # Typing stubs.
'webob', # Request WSGI environment mocking.
]
development = [ # Development-time dependencies.
'bandit', # Automated security analysis.
'black', # Syntax linting.
'build[virtualenv]', # Python packaging build tool.
'cibuildwheel', # Build automation.
'e', # Try: python3 -me
'mypy', # Type hinting analysis.
'pre-commit', # Commit hooks for code quality.
'ptipython', # Enhanced interactive REPL shell.
'pytest', # Test collector and extensible runner.
'pytest-black', # Syntax linting.
'pytest-cov[toml]', # Coverage reporting.
'pytest-flakes', # Syntax validation.
'pytest-isort', # Import ordering.
'pytest-mypy', # Static type validation.
'requests', # Support for the http:// and https:// protocols.
'rope', # Project symbols collection.
'twine', # Python package release tool.
'types-setuptools', # Typing stubs.
'webob', # Request WSGI environment mocking.
'wheel', # "Wheel" package format support.
]

[project.entry-points."uri.scheme"]
# https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
# https://www.w3.org/wiki/UriSchemes
# https://github.com/APSL/uri/commit/709b4b73daae7b8651b92fd4fa63af41c4db2986
# https://docs.mongodb.com/manual/reference/connection-string
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'
mysql = 'uri.scheme:URLScheme'
redis = 'uri.scheme:URLScheme'
postgres = 'uri.scheme:URLScheme'
postgresql = 'uri.scheme:URLScheme'
mongodb = 'uri.scheme:URLScheme'


[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'

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


[tool.mypy]
follow_imports = "silent"
strict_optional = true
warn_no_return = false
#check_untyped_defs = true
#ignore_missing_imports = true

# required to support namespace packages
# https://github.com/python/mypy/issues/14057
explicit_package_bases = true

78 changes: 0 additions & 78 deletions setup.cfg

This file was deleted.

Loading

0 comments on commit 9160de7

Please sign in to comment.