Skip to content

Commit

Permalink
Update README and increment pypi version
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMeinderts committed Mar 21, 2022
1 parent 1f60560 commit e08361b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI version](https://badge.fury.io/py/epcpy.svg)](https://badge.fury.io/py/epcpy)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/epcpy.svg)](https://pypi.org/project/epcpy/)


A Python module for creation, validation, and transformation of EPC representations as defined in GS1's EPC Tag Data Standard (https://www.gs1.org/standards/rfid/tds).
Expand All @@ -19,6 +20,7 @@ A Python module for creation, validation, and transformation of EPC representati
- [GS1Keyed](#gs1keyed)
- [Tag encoded](#tag-encoded)
- [Generic parsing](#generic-parsing)
- [Ignore errors](#ignore-errors)
- [Development](#development)
- [Testing](#testing)
- [Coverage](#coverage)
Expand Down Expand Up @@ -156,6 +158,26 @@ from epcpy import hex_to_epc
hex_to_epc("36300001DB011169E5E5A70EC000000000000000000000000000")
```

The following parsers are available:
- `base64_to_tag_encodable`
- `binary_to_tag_encodable`
- `epc_pure_identity_to_gs1_element`
- `epc_pure_identity_to_gs1_element_string`
- `epc_pure_identity_to_gs1_key`
- `epc_pure_identity_to_gs1_keyed`
- `epc_pure_identity_to_scheme`
- `epc_pure_identity_to_tag_encodable`
- `hex_to_tag_encodable`
- `tag_uri_to_tag_encodable`

### Ignore errors
In case you want to convert a large list of EPC URIs of which some might not be valid, the function `ignore_errors` catches `ConvertException` and returns `None` instead.
```python
from epcpy import ignore_errors, epc_pure_identity_to_scheme

ignore_errors(epc_pure_identity_to_scheme, "urn:epc:id:sgtin:0.0.0")
```

## Development

This project uses [Poetry](https://python-poetry.org/) for project management.
Expand All @@ -166,7 +188,7 @@ After cloning run `poetry install` to install (development) dependencies.
This module uses the Python unittest library. Run `poetry run tests` for running the tests.

### Coverage
Run `poetry run coverage run -m unittest discover` to execute all tests with coverage. The resulting coverage can be reported using `poetry run coverage report` for a textual view the terminal and with `poetry run coverage html` for a webpage.
Run `poetry run coverage run -m unittest discover` to execute all tests with coverage. The resulting coverage can be reported using `poetry run coverage report --omit="*/test*"` for a textual view the terminal and with `poetry run coverage html --omit="*/test*"` for a webpage.

### Notebook
There is a sample notebook included in this repository, which can be used to quickly get a hands-on experience with the repository. The notebook might not be completely up-to-date and requires the `jupyter` package to run, which can be installed using `pip install jupyter`.
1 change: 1 addition & 0 deletions README_pip.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI version](https://badge.fury.io/py/epcpy.svg)](https://badge.fury.io/py/epcpy)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/epcpy.svg)](https://pypi.org/project/epcpy/)


A Python module for creation, validation, and transformation of EPC representations as defined in GS1's EPC Tag Data Standard (https://www.gs1.org/standards/rfid/tds).
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "epcpy"
version = "0.1.2"
version = "0.1.3"
description = "A Python module for creation, validation, and transformation of EPC representations as defined in GS1's EPC Tag Data Standard."
license = "MIT"
authors = ["Nedap Retail <[email protected]>"]
Expand Down

0 comments on commit e08361b

Please sign in to comment.