Skip to content

Commit

Permalink
Add CLI (#11)
Browse files Browse the repository at this point in the history
* refined line parser

* changed logger to loguru

* added examples to some docstrings

* added CLI and input/output

* added json output

* message_type from maus.edifact.EdifactFormat

---------

Co-authored-by: kevin <68426071+hf-krechan@users.noreply.github.com>
Co-authored-by: konstantin <konstantin.klein@hochfrequenz.de>
  • Loading branch information
3 people authored Mar 6, 2024
1 parent ff385dd commit 296b5ba
Show file tree
Hide file tree
Showing 18 changed files with 491 additions and 127 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,5 @@ dmypy.json
.vscode/

src/_your_package_version.py

test_output
7 changes: 4 additions & 3 deletions dev_requirements/requirements-coverage.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# SHA1:6dafbcf610e9f81897b65ee9142715ab2e793f9e
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile requirements-coverage.in
# pip-compile-multi
#
coverage==7.4.3
# via -r dev_requirements/requirements-coverage.in
# via -r dev_requirements\requirements-coverage.in
21 changes: 10 additions & 11 deletions dev_requirements/requirements-formatting.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# SHA1:2c7ffcd29222de3114c7f7994911f1b69d06b6b3
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile requirements-formatting.in
# pip-compile-multi
#
black==24.2.0
# via -r dev_requirements/requirements-formatting.in
click==8.1.3
# via -r dev_requirements\requirements-formatting.in
click==8.1.7
# via black
colorama==0.4.6
# via click
isort==5.13.2
# via -r dev_requirements/requirements-formatting.in
# via -r dev_requirements\requirements-formatting.in
mypy-extensions==1.0.0
# via black
packaging==23.0
packaging==23.2
# via black
pathspec==0.11.0
pathspec==0.12.1
# via black
platformdirs==4.2.0
# via black
tomli==2.0.1
# via black
typing-extensions==4.10.0
# via black
17 changes: 8 additions & 9 deletions dev_requirements/requirements-linting.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# SHA1:0e15f8789b9d62fe90d1f1b0b6a7e32f13b99b19
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile requirements-linting.in
# pip-compile-multi
#
astroid==3.1.0
# via pylint
dill==0.3.7
colorama==0.4.6
# via pylint
dill==0.3.8
# via pylint
isort==5.13.2
# via pylint
Expand All @@ -15,10 +18,6 @@ mccabe==0.7.0
platformdirs==4.2.0
# via pylint
pylint==3.1.0
# via -r dev_requirements/requirements-linting.in
tomli==2.0.1
# via pylint
tomlkit==0.11.6
# via -r dev_requirements\requirements-linting.in
tomlkit==0.12.4
# via pylint
typing-extensions==4.10.0
# via astroid
69 changes: 26 additions & 43 deletions dev_requirements/requirements-packaging.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,49 @@
# SHA1:93e4fbf2b6cce1574fe3d5315360512fa9927699
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile requirements-packaging.in
# pip-compile-multi
#
bleach==6.0.0
# via readme-renderer
build==1.1.1
# via -r dev_requirements/requirements-packaging.in
certifi==2023.7.22
# via -r dev_requirements\requirements-packaging.in
certifi==2024.2.2
# via requests
cffi==1.15.1
# via cryptography
charset-normalizer==3.1.0
charset-normalizer==3.3.2
# via requests
cryptography==42.0.4
# via secretstorage
colorama==0.4.6
# via build
docutils==0.20.1
# via readme-renderer
idna==3.4
idna==3.6
# via requests
importlib-metadata==6.7.0
# via
# keyring
# twine
jaraco-classes==3.2.3
importlib-metadata==7.0.1
# via twine
jaraco-classes==3.3.1
# via keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
keyring==23.13.1
keyring==24.3.1
# via twine
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
more-itertools==9.1.0
more-itertools==10.2.0
# via jaraco-classes
packaging==23.1
nh3==0.2.15
# via readme-renderer
packaging==23.2
# via build
pkginfo==1.9.6
pkginfo==1.10.0
# via twine
pycparser==2.21
# via cffi
pygments==2.15.1
pygments==2.17.2
# via
# readme-renderer
# rich
pyproject-hooks==1.0.0
# via build
readme-renderer==37.3
pywin32-ctypes==0.2.2
# via keyring
readme-renderer==43.0
# via twine
requests==2.31.0
# via
Expand All @@ -60,23 +53,13 @@ requests-toolbelt==1.0.0
# via twine
rfc3986==2.0.0
# via twine
rich==13.4.2
rich==13.7.1
# via twine
secretstorage==3.3.3
# via keyring
six==1.16.0
# via bleach
tomli==2.0.1
# via
# build
# pyproject-hooks
twine==5.0.0
# via -r dev_requirements/requirements-packaging.in
urllib3==2.0.7
# via -r dev_requirements\requirements-packaging.in
urllib3==2.2.1
# via
# requests
# twine
webencodings==0.5.1
# via bleach
zipp==3.15.0
zipp==3.17.0
# via importlib-metadata
9 changes: 5 additions & 4 deletions dev_requirements/requirements-spell_check.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# SHA1:a7062511e9640ed2a5c2dea1da5c8b5f59c0f0d7
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile requirements-spellcheck.in
# pip-compile-multi
#
codespell==2.2.6
# via -r dev_requirements/requirements-spell_check.in
# via -r dev_requirements\requirements-spell_check.in
15 changes: 7 additions & 8 deletions dev_requirements/requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# SHA1:0eaa389e1fdb3a1917c0f987514bd561be5718ee
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile requirements-tests.in
# pip-compile-multi
#
exceptiongroup==1.1.3
colorama==0.4.6
# via pytest
iniconfig==2.0.0
# via pytest
packaging==23.0
packaging==23.2
# via pytest
pluggy==1.4.0
# via pytest
pytest==8.1.0
# via -r dev_requirements/requirements-tests.in
tomli==2.0.1
# via pytest
pytest==8.0.2
# via -r dev_requirements\requirements-tests.in
9 changes: 4 additions & 5 deletions dev_requirements/requirements-type_check.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# SHA1:7983aaa01d64547827c20395d77e248c41b2572f
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile requirements-type_check.in
# pip-compile-multi
#
mypy==1.8.0
# via -r dev_requirements/requirements-type_check.in
# via -r dev_requirements\requirements-type_check.in
mypy-extensions==1.0.0
# via mypy
tomli==2.0.1
# via mypy
typing-extensions==4.10.0
# via mypy
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = ["pydantic", "loguru"] # add all the dependencies here
dependencies = ["click", "loguru", "maus", "pydantic", "python-docx"] # add all the dependencies here
dynamic = ["readme", "version"]

[project.urls]
Expand Down
21 changes: 20 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,36 @@
#
annotated-types==0.6.0
# via pydantic
attrs==23.2.0
# via maus
click==8.1.7
# via migmose (pyproject.toml)
colorama==0.4.6
# via loguru
# via
# click
# loguru
loguru==0.7.2
# via migmose (pyproject.toml)
lxml==5.1.0
# via python-docx
marshmallow==3.21.1
# via maus
maus==0.4.2
# via migmose (pyproject.toml)
more-itertools==10.2.0
# via maus
packaging==23.2
# via marshmallow
pydantic==2.6.3
# via migmose (pyproject.toml)
pydantic-core==2.16.3
# via pydantic
python-docx==1.1.0
# via migmose (pyproject.toml)
typing-extensions==4.10.0
# via
# pydantic
# pydantic-core
# python-docx
win32-setctime==1.1.0
# via loguru
Loading

0 comments on commit 296b5ba

Please sign in to comment.