diff --git a/Makefile b/Makefile index 962854a86123107e129e4533a9dc68f1538eb132..2ed66e81e011329b1640493b09ce3944ca3fb39a 100644 --- a/Makefile +++ b/Makefile @@ -14,23 +14,19 @@ check: mypy pylint check-format # check static typing mypy: python3 -m mypy duniterpy --ignore-missing-imports - python3 -m mypy tests --ignore-missing-imports python3 -m mypy examples --ignore-missing-imports # check code errors pylint: pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 duniterpy/ - pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 tests/ pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 examples/ # check format check-format: black --check duniterpy - black --check tests black --check examples # format code format: black duniterpy - black tests black examples \ No newline at end of file diff --git a/tests/__init__.py b/duniterpy/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to duniterpy/tests/__init__.py diff --git a/tests/api/__init__.py b/duniterpy/tests/api/__init__.py similarity index 100% rename from tests/api/__init__.py rename to duniterpy/tests/api/__init__.py diff --git a/tests/api/bma/__init__.py b/duniterpy/tests/api/bma/__init__.py similarity index 100% rename from tests/api/bma/__init__.py rename to duniterpy/tests/api/bma/__init__.py diff --git a/tests/api/bma/test_blockchain.py b/duniterpy/tests/api/bma/test_blockchain.py similarity index 99% rename from tests/api/bma/test_blockchain.py rename to duniterpy/tests/api/bma/test_blockchain.py index fd5b258b54ccc3c12d34c28c80867abdfb9d88a3..6409a0d53c613cb7cf05b3fc4864be3f8e2234d9 100644 --- a/tests/api/bma/test_blockchain.py +++ b/duniterpy/tests/api/bma/test_blockchain.py @@ -25,7 +25,7 @@ from duniterpy.api.bma.blockchain import ( ) from duniterpy.api.client import Client from duniterpy.api.endpoint import BMAEndpoint -from tests.api.webserver import WebFunctionalSetupMixin, web +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin, web class TestBmaBlockchain(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/bma/test_bma.py b/duniterpy/tests/api/bma/test_bma.py similarity index 100% rename from tests/api/bma/test_bma.py rename to duniterpy/tests/api/bma/test_bma.py diff --git a/tests/api/bma/test_network.py b/duniterpy/tests/api/bma/test_network.py similarity index 98% rename from tests/api/bma/test_network.py rename to duniterpy/tests/api/bma/test_network.py index c803d720b09cb6dd85d7cc43a05ed533b987474c..3a3d5ee6a051fd4eccafae0b5a3e6eac802e673e 100644 --- a/tests/api/bma/test_network.py +++ b/duniterpy/tests/api/bma/test_network.py @@ -6,7 +6,7 @@ from jsonschema import ValidationError, SchemaError from duniterpy.api.bma import network from duniterpy.api.client import Client from duniterpy.api.endpoint import BMAEndpoint -from tests.api.webserver import WebFunctionalSetupMixin, web +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin, web class TestBmaNetwork(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/bma/test_tx.py b/duniterpy/tests/api/bma/test_tx.py similarity index 99% rename from tests/api/bma/test_tx.py rename to duniterpy/tests/api/bma/test_tx.py index 52c0dfb0dbd09e1b37ecd6d476fb7121a8c65c78..7d4324ea37de6852792bafe228591132fbb5e715 100644 --- a/tests/api/bma/test_tx.py +++ b/duniterpy/tests/api/bma/test_tx.py @@ -12,7 +12,7 @@ from duniterpy.api.bma.tx import ( ) from duniterpy.api.client import Client from duniterpy.api.endpoint import BMAEndpoint -from tests.api.webserver import WebFunctionalSetupMixin, web +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin, web class TestBmaTx(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/bma/test_wot.py b/duniterpy/tests/api/bma/test_wot.py similarity index 99% rename from tests/api/bma/test_wot.py rename to duniterpy/tests/api/bma/test_wot.py index 9cd897a2ac711dbe0d41c9efb3138581cbefd75d..dc333712e289399fcb7c677f5715876e667675e8 100644 --- a/tests/api/bma/test_wot.py +++ b/duniterpy/tests/api/bma/test_wot.py @@ -16,7 +16,7 @@ from duniterpy.api.bma.wot import ( ) from duniterpy.api.client import Client from duniterpy.api.endpoint import BMAEndpoint -from tests.api.webserver import WebFunctionalSetupMixin, web +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin, web class TestBmaWot(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/bma/test_ws.py b/duniterpy/tests/api/bma/test_ws.py similarity index 98% rename from tests/api/bma/test_ws.py rename to duniterpy/tests/api/bma/test_ws.py index d9915904d0009da6cc9ae2736b87e79a33e3ee78..a62b398a6159a328a7b2a4a382e9e6311d3a873b 100644 --- a/tests/api/bma/test_ws.py +++ b/duniterpy/tests/api/bma/test_ws.py @@ -4,7 +4,7 @@ from jsonschema import SchemaError, ValidationError from duniterpy.api.bma.ws import WS_BLOCK_SCHEMA, WS_PEER_SCHEMA from duniterpy.api.client import parse_text -from tests.api.webserver import WebFunctionalSetupMixin +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin class TestBmaWebsocket(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/webserver.py b/duniterpy/tests/api/webserver.py similarity index 100% rename from tests/api/webserver.py rename to duniterpy/tests/api/webserver.py diff --git a/tests/documents/__init__.py b/duniterpy/tests/documents/__init__.py similarity index 100% rename from tests/documents/__init__.py rename to duniterpy/tests/documents/__init__.py diff --git a/tests/documents/test_block.py b/duniterpy/tests/documents/test_block.py similarity index 100% rename from tests/documents/test_block.py rename to duniterpy/tests/documents/test_block.py diff --git a/tests/documents/test_certification.py b/duniterpy/tests/documents/test_certification.py similarity index 100% rename from tests/documents/test_certification.py rename to duniterpy/tests/documents/test_certification.py diff --git a/tests/documents/test_crc_pubkey.py b/duniterpy/tests/documents/test_crc_pubkey.py similarity index 100% rename from tests/documents/test_crc_pubkey.py rename to duniterpy/tests/documents/test_crc_pubkey.py diff --git a/tests/documents/test_membership.py b/duniterpy/tests/documents/test_membership.py similarity index 100% rename from tests/documents/test_membership.py rename to duniterpy/tests/documents/test_membership.py diff --git a/tests/documents/test_peer.py b/duniterpy/tests/documents/test_peer.py similarity index 100% rename from tests/documents/test_peer.py rename to duniterpy/tests/documents/test_peer.py diff --git a/tests/documents/test_transaction.py b/duniterpy/tests/documents/test_transaction.py similarity index 100% rename from tests/documents/test_transaction.py rename to duniterpy/tests/documents/test_transaction.py diff --git a/tests/documents/test_ws2p_heads.py b/duniterpy/tests/documents/test_ws2p_heads.py similarity index 100% rename from tests/documents/test_ws2p_heads.py rename to duniterpy/tests/documents/test_ws2p_heads.py diff --git a/tests/grammars/__init__.py b/duniterpy/tests/grammars/__init__.py similarity index 100% rename from tests/grammars/__init__.py rename to duniterpy/tests/grammars/__init__.py diff --git a/tests/grammars/test_output.py b/duniterpy/tests/grammars/test_output.py similarity index 100% rename from tests/grammars/test_output.py rename to duniterpy/tests/grammars/test_output.py diff --git a/tests/key/__init__.py b/duniterpy/tests/key/__init__.py similarity index 100% rename from tests/key/__init__.py rename to duniterpy/tests/key/__init__.py diff --git a/tests/key/test_ascii_armor.py b/duniterpy/tests/key/test_ascii_armor.py similarity index 100% rename from tests/key/test_ascii_armor.py rename to duniterpy/tests/key/test_ascii_armor.py diff --git a/tests/key/test_encryption_key.py b/duniterpy/tests/key/test_encryption_key.py similarity index 100% rename from tests/key/test_encryption_key.py rename to duniterpy/tests/key/test_encryption_key.py diff --git a/tests/key/test_public_key.py b/duniterpy/tests/key/test_public_key.py similarity index 100% rename from tests/key/test_public_key.py rename to duniterpy/tests/key/test_public_key.py diff --git a/tests/key/test_signing_key.py b/duniterpy/tests/key/test_signing_key.py similarity index 100% rename from tests/key/test_signing_key.py rename to duniterpy/tests/key/test_signing_key.py diff --git a/tests/key/test_verifying_key.py b/duniterpy/tests/key/test_verifying_key.py similarity index 100% rename from tests/key/test_verifying_key.py rename to duniterpy/tests/key/test_verifying_key.py diff --git a/setup.py b/setup.py index ce1b7ea516f1a7813c67860552f94a06f0148387..584f49ab7a075aa030e126b0e9b5d902bb3c5e5d 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from setuptools import setup, find_packages +from setuptools import setup import duniterpy import os import re @@ -47,7 +47,7 @@ setup( version=duniterpy.__version__, - packages=find_packages(), + packages=['duniterpy'], author="inso, canercanda, s_b, vit",