Skip to content

Commit

Permalink
Replace cchardet with faust-cchardet
Browse files Browse the repository at this point in the history
  • Loading branch information
nrccua-timr committed Jul 21, 2023
1 parent d126006 commit 760f73e
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 38 deletions.
8 changes: 2 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.10
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -14,11 +14,7 @@ repos:
- id: name-tests-test
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/myint/docformatter
rev: v1.5.1
rev: v1.7.5
hooks:
- id: docformatter
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ History
=======


v0.18.4 (2023-07-21)

* Replace cchardet with faust-cchardet.
* Update cython==0.29.36.
* Update dominodatalab==1.2.4.

v0.18.3 (2023-06-07)

* Add excel sheet filter to file ingestion efi functions.
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ clean:

install:
. env/bin/activate; \
pip install cython==0.29.35; \
pip install -r aioradio/requirements.txt

setup:
Expand Down
2 changes: 1 addition & 1 deletion aioradio/aws/moto_server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""moto server for pytesting aws services."""
"""Moto server for pytesting aws services."""

# pylint: disable=broad-exception-raised
# pylint: disable=too-many-instance-attributes
Expand Down
1 change: 0 additions & 1 deletion aioradio/aws/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

"""Generic async utility functions."""

# pylint: disable=broad-except
Expand Down
2 changes: 1 addition & 1 deletion aioradio/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CustomJsonFormatter(jsonlogger.JsonFormatter):
"""Custom Json Formatter."""

def add_fields(self, log_record: Dict[str, Any], record: logging.LogRecord, message_dict: Dict[str, Any]):
"""normalize default set of fields.
"""Normalize default set of fields.
Args:
log_record (Dict[str, Any]): dict object containing log record info
Expand Down
6 changes: 3 additions & 3 deletions aioradio/redis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""aioradio redis cache script."""
"""Aioradio redis cache script."""

# pylint: disable=c-extension-no-member
# pylint: disable=no-member
Expand Down Expand Up @@ -30,7 +30,7 @@

@dataclass
class Redis:
"""class dealing with redis functions."""
"""Class dealing with redis functions."""

config: Dict[str, Any] = dataclass_field(default_factory=dict)
pool: redis.Redis = dataclass_field(init=False, repr=False)
Expand Down Expand Up @@ -411,7 +411,7 @@ async def hexists(self, key: str, field: str) -> bool:
return self.pool.hexists(key, field)

async def build_cache_key(self, payload: Dict[str, Any], separator='|', use_hashkey: bool=None) -> str:
"""build a cache key from a dictionary object. Concatenate and
"""Build a cache key from a dictionary object. Concatenate and
normalize key-values from an unnested dict, taking care of sorting the
keys and each of their values (if a list).
Expand Down
19 changes: 10 additions & 9 deletions aioradio/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ aiojobs==1.1.0
backoff==2.2.1
boto3==1.24.59
botocore==1.27.59
cchardet==2.1.7
cython==0.29.36
ddtrace==1.11.2
dominodatalab==1.2.3
dominodatalab==1.2.4
fakeredis==1.10.1
faust-cchardet==2.1.18
flask==2.1.2
flask-cors==3.0.10
httpx==0.24.0
mandrill==1.0.60
moto==3.1.18
openpyxl==3.0.10
orjson==3.8.10
pandas==2.0.0
pre-commit==3.2.2
pandas==2.0.3
pre-commit==3.3.3
psycopg2-binary==2.9.6
pylint==2.17.2
pyodbc==4.0.39
pylint==2.17.4
pyodbc==4.0.39 --no-binary=pyodbc
pysmb==1.2.9.1
pytest==7.3.1
pytest-asyncio==0.21.0
pytest-cov==4.0.0
pytest==7.4.0
pytest-asyncio==0.21.1
pytest-cov==4.1.0
python-json-logger==2.0.7
redis==3.5.3
twine==4.0.2
Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/aws_secrets_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest secrets."""
"""Pytest secrets."""

# pylint: disable=unused-argument

Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/dynamodb_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest dynamodb."""
"""Pytest dynamodb."""

from decimal import Decimal
from random import randint
Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/file_ingestion_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest file_ingestion script."""
"""Pytest file_ingestion script."""

# pylint: disable=broad-except
# pylint: disable=c-extension-no-member
Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/jira_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest Jira."""
"""Pytest Jira."""

# pylint: disable=c-extension-no-member

Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/logger_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest logger."""
"""Pytest logger."""

import logging

Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/long_running_jobs_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest Long Running Jobs."""
"""Pytest Long Running Jobs."""

from asyncio import create_task, sleep
from random import randint
Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/psycopg2_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest psycopg2 script."""
"""Pytest psycopg2 script."""

import pytest

Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/pyodbc_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest pyodbc script."""
"""Pytest pyodbc script."""

import pytest

Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/redis_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest redis cache."""
"""Pytest redis cache."""

# pylint: disable=c-extension-no-member

Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/s3_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest s3."""
"""Pytest s3."""

# pylint: disable=logging-fstring-interpolation

Expand Down
2 changes: 1 addition & 1 deletion aioradio/tests/sqs_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest sqs."""
"""Pytest sqs."""

# pylint: disable=c-extension-no-member
# pylint: disable=no-member
Expand Down
2 changes: 1 addition & 1 deletion aioradio/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""aioradio utils cache script."""
"""Aioradio utils cache script."""

# pylint: disable=ungrouped-imports
# pylint: disable=wrong-import-position
Expand Down
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""pytest configuration."""
"""Pytest configuration."""

import asyncio
import os
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
long_description = fileobj.read()

setup(name='aioradio',
version='0.18.3',
version='0.18.4',
description='Generic asynchronous i/o python utilities for AWS services (SQS, S3, DynamoDB, Secrets Manager), Redis, MSSQL (pyodbc), JIRA and more',
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -26,9 +26,9 @@
'backoff>=2.1.2',
'botocore==1.27.59',
'boto3==1.24.59',
#'cchardet>=2.1.7',
'faust-cchardet>=2.1.18',
'ddtrace>=0.60.1',
'dominodatalab>=1.1.1',
'dominodatalab>=1.2.3',
'fakeredis>=1.7.1',
'httpx>=0.23.0',
'mandrill>=1.0.60',
Expand Down

0 comments on commit 760f73e

Please sign in to comment.