From 53d0bfa854731ab41712a76949b28220190c9758 Mon Sep 17 00:00:00 2001 From: Hoss Date: Fri, 10 Feb 2023 18:26:56 +0800 Subject: [PATCH 1/3] refactor: rename interchange module [why] to better fit X12's language --- README.md | 4 ++-- pyx12lib/common/{interchange => envelope}/__init__.py | 0 pyx12lib/common/{interchange => envelope}/grammar/__init__.py | 0 .../{interchange => envelope}/grammar/functional_group.py | 0 .../common/{interchange => envelope}/grammar/interchange.py | 0 .../{interchange => envelope}/grammar/transaction_set.py | 0 6 files changed, 2 insertions(+), 2 deletions(-) rename pyx12lib/common/{interchange => envelope}/__init__.py (100%) rename pyx12lib/common/{interchange => envelope}/grammar/__init__.py (100%) rename pyx12lib/common/{interchange => envelope}/grammar/functional_group.py (100%) rename pyx12lib/common/{interchange => envelope}/grammar/interchange.py (100%) rename pyx12lib/common/{interchange => envelope}/grammar/transaction_set.py (100%) diff --git a/README.md b/README.md index 3cddef8..5b07a58 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ class StSegment(BaseSegment): ``` * Render the segment from its grammar. ```python -from pyx12lib.common.interchange.grammar import StSegment +from pyx12lib.common.envelope.grammar import StSegment from pyx12lib.core.renderer import SegmentRenderer @@ -49,7 +49,7 @@ class StRenderer(SegmentRenderer): ``` * Advanced definition for element value getters ```python -from pyx12lib.common.interchange.grammar import StSegment +from pyx12lib.common.envelope.grammar import StSegment from pyx12lib.core.renderer import SegmentRenderer diff --git a/pyx12lib/common/interchange/__init__.py b/pyx12lib/common/envelope/__init__.py similarity index 100% rename from pyx12lib/common/interchange/__init__.py rename to pyx12lib/common/envelope/__init__.py diff --git a/pyx12lib/common/interchange/grammar/__init__.py b/pyx12lib/common/envelope/grammar/__init__.py similarity index 100% rename from pyx12lib/common/interchange/grammar/__init__.py rename to pyx12lib/common/envelope/grammar/__init__.py diff --git a/pyx12lib/common/interchange/grammar/functional_group.py b/pyx12lib/common/envelope/grammar/functional_group.py similarity index 100% rename from pyx12lib/common/interchange/grammar/functional_group.py rename to pyx12lib/common/envelope/grammar/functional_group.py diff --git a/pyx12lib/common/interchange/grammar/interchange.py b/pyx12lib/common/envelope/grammar/interchange.py similarity index 100% rename from pyx12lib/common/interchange/grammar/interchange.py rename to pyx12lib/common/envelope/grammar/interchange.py diff --git a/pyx12lib/common/interchange/grammar/transaction_set.py b/pyx12lib/common/envelope/grammar/transaction_set.py similarity index 100% rename from pyx12lib/common/interchange/grammar/transaction_set.py rename to pyx12lib/common/envelope/grammar/transaction_set.py From 1117fc003d7b3401aec7affe6bac7ee4bdef35d5 Mon Sep 17 00:00:00 2001 From: Hoss Date: Fri, 10 Feb 2023 18:27:16 +0800 Subject: [PATCH 2/3] refactor: move test cases outside or src --- {pyx12lib/core/tests => tests}/__init__.py | 0 {pyx12lib/core/tests => tests}/test_composite_segment_renderer.py | 0 {pyx12lib/core/tests => tests}/test_segment_renderer.py | 0 {pyx12lib/core/tests => tests}/test_segment_renderer_loop.py | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {pyx12lib/core/tests => tests}/__init__.py (100%) rename {pyx12lib/core/tests => tests}/test_composite_segment_renderer.py (100%) rename {pyx12lib/core/tests => tests}/test_segment_renderer.py (100%) rename {pyx12lib/core/tests => tests}/test_segment_renderer_loop.py (100%) diff --git a/pyx12lib/core/tests/__init__.py b/tests/__init__.py similarity index 100% rename from pyx12lib/core/tests/__init__.py rename to tests/__init__.py diff --git a/pyx12lib/core/tests/test_composite_segment_renderer.py b/tests/test_composite_segment_renderer.py similarity index 100% rename from pyx12lib/core/tests/test_composite_segment_renderer.py rename to tests/test_composite_segment_renderer.py diff --git a/pyx12lib/core/tests/test_segment_renderer.py b/tests/test_segment_renderer.py similarity index 100% rename from pyx12lib/core/tests/test_segment_renderer.py rename to tests/test_segment_renderer.py diff --git a/pyx12lib/core/tests/test_segment_renderer_loop.py b/tests/test_segment_renderer_loop.py similarity index 100% rename from pyx12lib/core/tests/test_segment_renderer_loop.py rename to tests/test_segment_renderer_loop.py From e5c789c7e21855a0fc06a62cd52165be0a16fc1a Mon Sep 17 00:00:00 2001 From: Hoss Date: Fri, 10 Feb 2023 18:28:36 +0800 Subject: [PATCH 3/3] build: remove python-date-util as dependency --- requirements.txt | 1 - setup.py | 1 - 2 files changed, 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4d23dd7..0b0a8ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -python-dateutil>=2.6.1 six>=1.11.0 diff --git a/setup.py b/setup.py index aecf962..93c5783 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,6 @@ package_dir={"pyx12lib": "pyx12lib"}, packages=setuptools.find_packages(), install_requires=[ - "python-dateutil", "six", ], python_requires=">=3.6",