Skip to content

Commit

Permalink
Merge pull request #367 from HXLStandard/dev
Browse files Browse the repository at this point in the history
Prepare 5.2 release
  • Loading branch information
davidmegginson authored Jan 10, 2024
2 parents 115809f + 50e7ac5 commit cc34c0c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-01-10 Release 5.2
- update URLs for test files on GitHub
- fixed bug in aggregators that excluded tag patterns ending in "!"

2023-09-25 Release 5.1
- reduce log level for failed number conversion from INFO to DEBUG

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ test-install:
publish-pypi: $(VENV)
rm -rf dist/*
git checkout upstream/prod
git pull upstream prod
. $(VENV) \
&& pip install twine \
&& python setup.py sdist && twine upload dist/*
Expand Down
2 changes: 1 addition & 1 deletion hxl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
if sys.version_info < (3,):
raise RuntimeError("libhxl requires Python 3 or higher")

__version__="5.1"
__version__="5.2"
"""Module version number
see https://www.python.org/dev/peps/pep-0396/
"""
Expand Down
2 changes: 1 addition & 1 deletion hxl/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def lt(a, b):
else:
raise HXLFilterException("Bad aggregator type for count filter: {}".format(type))

TAG_PATTERN = r'#?{token}(?:\s*[+-]{token})*'.format(token=hxl.datatypes.TOKEN_PATTERN)
TAG_PATTERN = r'#?{token}(?:\s*[+-]{token})*!?'.format(token=hxl.datatypes.TOKEN_PATTERN)
"""Regular expression for a tag pattern"""

COL_PATTERN = r'#{token}(?:\s*\+{token})*'.format(token=hxl.datatypes.TOKEN_PATTERN)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name='libhxl',
version="5.1",
version="5.2",
description='Python support library for the Humanitarian Exchange Language (HXL). See http://hxlstandard.org and https://github.com/HXLStandard/libhxl-python',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_count(self):
filtered = self.source.recipe({
'filter': 'count',
'patterns': 'sector',
'aggregators': 'sum(affected)'
'aggregators': 'sum(#affected!)'
})
self.assertEqual(type(filtered).__name__, 'CountFilter')

Expand Down
8 changes: 4 additions & 4 deletions tests/test_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def _resolve_file(filename):
FILE_NOTAG2 = _resolve_file('./files/test_io/input-notag2.html')
FILE_BINARY_INVALID = _resolve_file('./files/test_io/input-invalid.png')

URL_CSV = 'https://raw.githubusercontent.com/HXLStandard/libhxl-python/main/tests/files/test_io/input-valid.csv'
URL_CSV = 'https://raw.githubusercontent.com/HXLStandard/libhxl-python/prod/tests/files/test_io/input-valid.csv'
URL_CSV_HXL_EXT = 'https://ourairports.com/countries/CA/airports.hxl'
URL_XLSX = 'https://raw.githubusercontent.com/HXLStandard/libhxl-python/main/tests/files/test_io/input-valid.xlsx'
URL_XLS = 'https://raw.githubusercontent.com/HXLStandard/libhxl-python/test/tests/files/test_io/input-valid.xls'
URL_JSON = 'https://raw.githubusercontent.com/HXLStandard/libhxl-python/main/tests/files/test_io/input-valid.json'
URL_XLSX = 'https://raw.githubusercontent.com/HXLStandard/libhxl-python/prod/tests/files/test_io/input-valid.xlsx'
URL_XLS = 'https://raw.githubusercontent.com/HXLStandard/libhxl-python/prod/tests/files/test_io/input-valid.xls'
URL_JSON = 'https://raw.githubusercontent.com/HXLStandard/libhxl-python/prod/tests/files/test_io/input-valid.json'
URL_GOOGLE_SHEET_NOHASH = 'https://docs.google.com/spreadsheets/d/1VTswL-w9EI0IdGIBFZoZ-2RmIiebXKsrhv03yd7LlIg/edit'
URL_GOOGLE_SHEET_HASH = 'https://docs.google.com/spreadsheets/d/1VTswL-w9EI0IdGIBFZoZ-2RmIiebXKsrhv03yd7LlIg/edit#gid=299366282'
URL_GOOGLE_FILE = 'https://drive.google.com/file/d/1iA0QU0CEywwCr-zDswg7C_RwZgLqS3gb/view'
Expand Down

0 comments on commit cc34c0c

Please sign in to comment.