Skip to content

Commit

Permalink
Rename package to commons-codec
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jul 16, 2024
1 parent 114b3c9 commit 89f2391
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 33 deletions.
43 changes: 28 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
# Data-X
# commons-codec

[![Tests](https://github.com/daq-tools/data-x/actions/workflows/tests.yml/badge.svg)](https://github.com/daq-tools/data-x/actions/workflows/tests.yml)
[![Coverage](https://codecov.io/gh/daq-tools/data-x/branch/main/graph/badge.svg)](https://app.codecov.io/gh/daq-tools/data-x)
[![Build status (documentation)](https://readthedocs.org/projects/data-x/badge/)](https://cratedb.com/docs/data-x/)
[![PyPI Version](https://img.shields.io/pypi/v/data-x.svg)](https://pypi.org/project/data-x/)
[![Python Version](https://img.shields.io/pypi/pyversions/data-x.svg)](https://pypi.org/project/data-x/)
[![PyPI Downloads](https://pepy.tech/badge/data-x/month)](https://pepy.tech/project/data-x/)
[![Status](https://img.shields.io/pypi/status/data-x.svg)](https://pypi.org/project/data-x/)
[![License](https://img.shields.io/pypi/l/data-x.svg)](https://pypi.org/project/data-x/)
[![Tests](https://github.com/daq-tools/commons-codec/actions/workflows/tests.yml/badge.svg)](https://github.com/daq-tools/commons-codec/actions/workflows/tests.yml)
[![Coverage](https://codecov.io/gh/daq-tools/commons-codec/branch/main/graph/badge.svg)](https://app.codecov.io/gh/daq-tools/commons-codec)
[![Build status (documentation)](https://readthedocs.org/projects/commons-codec/badge/)](https://cratedb.com/docs/commons-codec/)
[![PyPI Version](https://img.shields.io/pypi/v/commons-codec.svg)](https://pypi.org/project/commons-codec/)
[![Python Version](https://img.shields.io/pypi/pyversions/commons-codec.svg)](https://pypi.org/project/commons-codec/)
[![PyPI Downloads](https://pepy.tech/badge/commons-codec/month)](https://pepy.tech/project/commons-codec/)
[![Status](https://img.shields.io/pypi/status/commons-codec.svg)](https://pypi.org/project/commons-codec/)
[![License](https://img.shields.io/pypi/l/commons-codec.svg)](https://pypi.org/project/commons-codec/)

## About
Data decoding, encoding, conversion, and translation utilities.

> A codec is a device or computer program that encodes or decodes a data stream or signal.
> Codec is a portmanteau of coder/decoder.
>
> A coder or encoder encodes a data stream or a signal for transmission or storage,
> [...], and the decoder function reverses the encoding for playback or editing.
>
> -- https://en.wikipedia.org/wiki/Codec
## Details
A collection of reusable utilities with minimal dependencies for transcoding
purposes, mostly collected from other projects like [Kotori] and [LorryStream],
in order to provide them per standalone package.
in order to provide them per standalone package for broader use cases.

## Installation
The package is available from [PyPI] at [data-x].
The package is available from [PyPI] at [commons-codec].
To install the most recent version, run:
```shell
pip install --upgrade data-x
pip install --upgrade commons-codec
```

## License
Expand All @@ -31,12 +39,17 @@ deviating licenses may apply. Please check for detailed license information
within the header sections of relevant files.

## Contributing
The `data-x` package is an open source project, and is
[managed on GitHub](https://github.com/daq-tools/data-x).
The `commons-codec` package is an open source project, and is
[managed on GitHub](https://github.com/daq-tools/commons-codec).
We appreciate contributions of any kind.

## Etymology
The [Apache Commons Codec] library was the inspiration for the name. Otherwise,
both libraries' ingredients don't have anything in common, yet.


[data-x]: https://pypi.org/project/data-x/
[Apache Commons Codec]: https://commons.apache.org/proper/commons-codec/
[commons-codec]: https://pypi.org/project/commons-codec/
[Kotori]: https://github.com/daq-tools/kotori
[LorryStream]: https://github.com/daq-tools/lorrystream/
[PyPI]: https://pypi.org/
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
]

[project]
name = "data-x"
name = "commons-codec"
description = "Data decoding, encoding, conversion, and translation utilities."
readme = "README.md"
keywords = [
Expand Down Expand Up @@ -114,8 +114,8 @@ optional-dependencies.test = [
"pytest-cov<6",
"pytest-mock<4",
]
urls.changelog = "https://github.com/daq-tools/data-x/blob/main/CHANGES.md"
urls.repository = "https://github.com/daq-tools/data-x"
urls.changelog = "https://github.com/daq-tools/commons-codec/blob/main/CHANGES.md"
urls.repository = "https://github.com/daq-tools/commons-codec"

[tool.black]
line-length = 120
Expand Down Expand Up @@ -192,7 +192,7 @@ pythonpath = [
]
testpaths = [
"examples",
"data_x",
"commons_codec",
"tests",
]
python_files = [
Expand Down Expand Up @@ -226,7 +226,7 @@ exclude_lines = [

[tool.mypy]
mypy_path = "src"
packages = [ "data_x" ]
packages = [ "commons_codec" ]
exclude = [
]
check_untyped_defs = true
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import setuptools

if __name__ == "__main__":
setuptools.setup(name="data-x")
setuptools.setup(name="commons-codec")
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json
from collections import OrderedDict

from data_x.util.data import is_number
from commons_codec.util.data import is_number


class AirrohrDecoder:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import simplejson as json
import toolz

from data_x.vendor.boto3.dynamodb.types import TypeDeserializer
from commons_codec.vendor.boto3.dynamodb.types import TypeDeserializer

logger = logging.getLogger(__name__)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/decode/test_airrohr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import logging
import typing as t

from data_x.decode.airrohr import AirrohrDecoder
from data_x.util.data import jd
from commons_codec.decode.airrohr import AirrohrDecoder
from commons_codec.util.data import jd

logger = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions tests/decode/test_tasmota.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import logging

import pytest
from data_x.decode.tasmota import TasmotaSensorDecoder, TasmotaStateDecoder
from data_x.util.data import jd
from commons_codec.decode.tasmota import TasmotaSensorDecoder, TasmotaStateDecoder
from commons_codec.util.data import jd

logger = logging.getLogger(__name__)

Expand Down
6 changes: 3 additions & 3 deletions tests/decode/test_tts_ttn.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

import logging

from data_x.decode.tts_ttn import TheThingsStackDecoder
from data_x.util.data import jd
from data_x.util.io import read_jsonfile
from commons_codec.decode.tts_ttn import TheThingsStackDecoder
from commons_codec.util.data import jd
from commons_codec.util.io import read_jsonfile

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion tests/transform/test_dynamodb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import decimal

import pytest
from data_x.transform.dynamodb import DynamoCDCTranslatorCrateDB
from commons_codec.transform.dynamodb import DynamoCDCTranslatorCrateDB

READING_BASIC = {"device": "foo", "temperature": 42.42, "humidity": 84.84}

Expand Down
2 changes: 1 addition & 1 deletion tests/transform/test_dynamodb_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from decimal import Decimal

import pytest
from data_x.vendor.boto3.dynamodb.types import Binary, TypeDeserializer
from commons_codec.vendor.boto3.dynamodb.types import Binary, TypeDeserializer


class TestBinary(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/util/test_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from decimal import Decimal

from data_x.util.data import is_number
from commons_codec.util.data import is_number


def test_is_number_numeric():
Expand Down

0 comments on commit 89f2391

Please sign in to comment.