From 31c1fe7be65ea10f0306caa0fdbd62f42dbe7e69 Mon Sep 17 00:00:00 2001 From: panosdb Date: Fri, 18 Oct 2024 12:06:42 +0300 Subject: [PATCH] Fix pip install --- {src => chainbase_sdk}/__init__.py | 0 {src => chainbase_sdk}/chainbase.py | 4 ++-- {src => chainbase_sdk}/chainbase_api.py | 0 {src => chainbase_sdk}/sql.py | 2 +- {src => chainbase_sdk}/sql_alpha.py | 2 +- pyproject.toml | 4 ++++ setup.py | 2 +- tests/e2e/e2e.py | 2 +- tests/test_chainbase.py | 4 ++-- tests/test_chainbase_api.py | 2 +- tests/test_sql.py | 2 +- 11 files changed, 14 insertions(+), 10 deletions(-) rename {src => chainbase_sdk}/__init__.py (100%) rename {src => chainbase_sdk}/chainbase.py (94%) rename {src => chainbase_sdk}/chainbase_api.py (100%) rename {src => chainbase_sdk}/sql.py (98%) rename {src => chainbase_sdk}/sql_alpha.py (98%) diff --git a/src/__init__.py b/chainbase_sdk/__init__.py similarity index 100% rename from src/__init__.py rename to chainbase_sdk/__init__.py diff --git a/src/chainbase.py b/chainbase_sdk/chainbase.py similarity index 94% rename from src/chainbase.py rename to chainbase_sdk/chainbase.py index ff4b5a8..06b9d6c 100644 --- a/src/chainbase.py +++ b/chainbase_sdk/chainbase.py @@ -1,8 +1,8 @@ import os from typing import Optional -from src.sql import ChainbaseSQL -from src.sql_alpha import ChainbaseSQLAlpha +from chainbase_sdk.sql import ChainbaseSQL +from chainbase_sdk.sql_alpha import ChainbaseSQLAlpha MISSING_API_KEY_ERROR = """ diff --git a/src/chainbase_api.py b/chainbase_sdk/chainbase_api.py similarity index 100% rename from src/chainbase_api.py rename to chainbase_sdk/chainbase_api.py diff --git a/src/sql.py b/chainbase_sdk/sql.py similarity index 98% rename from src/sql.py rename to chainbase_sdk/sql.py index 1ae4e8c..2957e53 100644 --- a/src/sql.py +++ b/chainbase_sdk/sql.py @@ -3,7 +3,7 @@ import pandas as pd -from src.chainbase_api import ChainbaseAPI +from chainbase_sdk.chainbase_api import ChainbaseAPI MAP_TYPES = { "Int8": "int64", diff --git a/src/sql_alpha.py b/chainbase_sdk/sql_alpha.py similarity index 98% rename from src/sql_alpha.py rename to chainbase_sdk/sql_alpha.py index 04990fa..ed8eb94 100644 --- a/src/sql_alpha.py +++ b/chainbase_sdk/sql_alpha.py @@ -3,7 +3,7 @@ import pandas as pd -from src.chainbase_api import ChainbaseAPI +from chainbase_sdk.chainbase_api import ChainbaseAPI MAP_TYPES = { "bigint": "int64", diff --git a/pyproject.toml b/pyproject.toml index c659810..d6ea39c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[project] +name = "chainbase_sdk" +dynamic = ["version", "description", "license", "dependencies"] + [build-system] requires = ["setuptools>=42", "wheel"] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index ca848e1..ffbb95d 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ description="A Python SDK for interacting with Chainbase APIs.", author="Panos", url="https://github.com/ppsimatikas/chainbase_python_sdk", - packages=find_packages(include=["src"], exclude=["tests"]), + packages=find_packages(exclude=["tests"]), install_requires=[ "requests==2.32.3", "pandas==2.1.3" diff --git a/tests/e2e/e2e.py b/tests/e2e/e2e.py index 1bf97b8..8c4d25c 100644 --- a/tests/e2e/e2e.py +++ b/tests/e2e/e2e.py @@ -1,6 +1,6 @@ import pytest -from src.chainbase import Chainbase +from chainbase_sdk.chainbase import Chainbase from tests.e2e.tables import tables diff --git a/tests/test_chainbase.py b/tests/test_chainbase.py index 98bb010..309f27f 100644 --- a/tests/test_chainbase.py +++ b/tests/test_chainbase.py @@ -1,8 +1,8 @@ import os import unittest -from src.chainbase import MISSING_API_KEY_ERROR, Chainbase -from src.sql import ChainbaseSQL +from chainbase_sdk.chainbase import MISSING_API_KEY_ERROR, Chainbase +from chainbase_sdk.sql import ChainbaseSQL class TestChainbase(unittest.TestCase): diff --git a/tests/test_chainbase_api.py b/tests/test_chainbase_api.py index 162ee00..571fada 100644 --- a/tests/test_chainbase_api.py +++ b/tests/test_chainbase_api.py @@ -3,7 +3,7 @@ import requests import requests_mock -from src.chainbase_api import DEFAULT_ERROR, ChainbaseAPI +from chainbase_sdk.chainbase_api import DEFAULT_ERROR, ChainbaseAPI @requests_mock.mock() diff --git a/tests/test_sql.py b/tests/test_sql.py index 25df456..c1d9258 100644 --- a/tests/test_sql.py +++ b/tests/test_sql.py @@ -4,7 +4,7 @@ import pandas as pd from pandas.testing import assert_frame_equal -from src.sql import ChainbaseSQL +from chainbase_sdk.sql import ChainbaseSQL @patch("src.sql.ChainbaseAPI.post")