Skip to content

Commit

Permalink
Minor packaging updates, and a set_trace for stringification of buckets.
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgregor committed Aug 24, 2023
1 parent 537600d commit fe1245d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ release:
@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}]"

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ development = [ # Development-time dependencies.
'pytest-cov[toml]', # Coverage reporting.
'pytest-flakes', # Syntax validation.
'pytest-isort', # Import ordering.
'pytest-mypy', # Static type validation.
'webob', # Request WSGI environment mocking.
'requests', # Support for the http:// and https:// protocols.
'pre-commit', # Commit hooks for code quality.
Expand Down Expand Up @@ -88,7 +89,8 @@ mongodb = 'uri.scheme:URLScheme' # https://docs.mongodb.com/manual/reference/co


[tool.pytest.ini_options]
addopts = '-l -r fEsxw --cov uri --mypy --no-cov-on-fail --cov-report term-missing --cov-report xml --flakes --isort --durations=5 --color=yes test'
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 --cov uri --mypy --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.
Expand Down
1 change: 1 addition & 0 deletions uri/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __len__(self):

def __str__(self):
# Certain symbols are explicitly allowed, ref: http://pretty-rfc.herokuapp.com/RFC3986#query
# XXX: __import__('wdb').set_trace()
iterator = (quote_plus(i.encode('utf8')).replace(b'%3F', b'?').replace(b'%2F', b'/') for i in self) if self.valid else self
return self.sep.join(iterator)

2 changes: 1 addition & 1 deletion uri/part/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class Part:
"""Descriptor protocol objects for combantorial string parts with validation."""
"""Descriptor protocol objects for combinatorial string parts with validation."""

__slots__ = ()

Expand Down
2 changes: 1 addition & 1 deletion uri/uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class URI:

# Additional Compound Interfaces
uri = URIPart(__parts__) # Whole-URI retrieval or storage as string.
safe_uri = URIPart(__safe_parts__, False) # URI retrieval without password component, useful for logging.
safe = safe_uri = URIPart(__safe_parts__, False) # URI retrieval without password component, useful for logging.
base = BasePart()
summary = URIPart(('host', 'path'), False)
resource = URIPart(('path', 'query', 'fragment'), False)
Expand Down

0 comments on commit fe1245d

Please sign in to comment.