Skip to content

Commit

Permalink
Add poetry as project management tool (#25)
Browse files Browse the repository at this point in the history
Co-authored-by: Sander Meinderts <[email protected]>
  • Loading branch information
thburghout and SanderMeinderts authored Mar 16, 2022
1 parent 256eea8 commit a9262e3
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
venv
__pycache__
.ipynb_checkpoints
.*
!.gitignore
dist/
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,10 @@ hex_to_epc("36300001DB011169E5E5A70EC000000000000000000000000000")
```

## Development

This project uses [Poetry](https://python-poetry.org/) for project management.
Poetry must be installed and available in `$PATH`.
After cloning run `poetry install` to install (development) dependencies.

### Testing
This module uses the Python unittest library. Run `python -m unittest discover` for running the tests.
This module uses the Python unittest library. Run `poetry run tests` for running the tests.
8 changes: 8 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[tool.poetry]
name = "epcpy"
version = "0.1.0"
description = "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)."
license = "MIT"
authors = ["Nedap Retail <[email protected]>"]
readme = "README.md"
homepage = "https://github.com/nedap/retail-epcpy"
repository = "https://github.com/nedap/retail-epcpy"
keywords = [
"gs1",
"epc",
"python"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]

[tool.poetry.scripts]
test = "scripts:test"

[tool.poetry.dependencies]
python = "^3.7"

[tool.poetry.dev-dependencies]
black = "22.1.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
10 changes: 10 additions & 0 deletions scripts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import subprocess


def test():
"""
Run all unittests. Similar to: `python -m unittest discover`
"""
subprocess.run(
['python', '-u', '-m', 'unittest', 'discover']
)

0 comments on commit a9262e3

Please sign in to comment.