From 56fc5efb5f79dd14bb00837b3b29e3a428594945 Mon Sep 17 00:00:00 2001
From: Vincent Texier <vit@free.fr>
Date: Thu, 1 Jul 2021 19:48:58 +0200
Subject: [PATCH] [enh] #181 move crc_pubkey.py to key package (BBC)

---
 duniterpy/documents/__init__.py             | 1 -
 duniterpy/{documents => key}/crc_pubkey.py  | 4 ++--
 tests/{documents => key}/test_crc_pubkey.py | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)
 rename duniterpy/{documents => key}/crc_pubkey.py (96%)
 rename tests/{documents => key}/test_crc_pubkey.py (94%)

diff --git a/duniterpy/documents/__init__.py b/duniterpy/documents/__init__.py
index b9fe552a..2cf40ae0 100644
--- a/duniterpy/documents/__init__.py
+++ b/duniterpy/documents/__init__.py
@@ -16,7 +16,6 @@
 from .block import Block
 from .block_uid import BlockUID, block_uid
 from .certification import Certification
-from .crc_pubkey import CRCPubkey
 from .document import Document, MalformedDocumentError
 from .identity import Identity
 from .membership import Membership
diff --git a/duniterpy/documents/crc_pubkey.py b/duniterpy/key/crc_pubkey.py
similarity index 96%
rename from duniterpy/documents/crc_pubkey.py
rename to duniterpy/key/crc_pubkey.py
index 0a5b0c50..498e2a15 100644
--- a/duniterpy/documents/crc_pubkey.py
+++ b/duniterpy/key/crc_pubkey.py
@@ -19,8 +19,8 @@ from typing import Type, TypeVar
 
 import base58
 
-from ..constants import PUBKEY_REGEX
-from ..tools import ensure_str
+from duniterpy.constants import PUBKEY_REGEX
+from duniterpy.tools import ensure_str
 
 # required to type hint cls in classmethod
 CRCPubkeyType = TypeVar("CRCPubkeyType", bound="CRCPubkey")
diff --git a/tests/documents/test_crc_pubkey.py b/tests/key/test_crc_pubkey.py
similarity index 94%
rename from tests/documents/test_crc_pubkey.py
rename to tests/key/test_crc_pubkey.py
index 638672f3..b7f54d3a 100644
--- a/tests/documents/test_crc_pubkey.py
+++ b/tests/key/test_crc_pubkey.py
@@ -15,7 +15,7 @@
 
 import unittest
 
-from duniterpy.documents.crc_pubkey import CRCPubkey
+from duniterpy.key.crc_pubkey import CRCPubkey
 
 
 class TestCRCPubkey(unittest.TestCase):
-- 
GitLab