diff --git a/Remove_states_from_context.patch b/Remove_states_from_context.patch deleted file mode 100644 index ee5a184b..00000000 --- a/Remove_states_from_context.patch +++ /dev/null @@ -1,6 +0,0 @@ -Index: investing_bot_framework/core/context/states/__init__.py -=================================================================== ---- investing_bot_framework/core/context/states/__init__.py (revision 59f4076a0c21098a23a0bdef6718b8838b45550b) -+++ investing_bot_framework/core/context/states/__init__.py (revision 59f4076a0c21098a23a0bdef6718b8838b45550b) -@@ -1,1 +0,0 @@ --from investing_bot_framework.core.context.states.bot_state import BotState diff --git a/investing_algorithm_framework/bin/investing-algorithm-framework-admin b/bin/investing-algorithm-framework-admin similarity index 100% rename from investing_algorithm_framework/bin/investing-algorithm-framework-admin rename to bin/investing-algorithm-framework-admin diff --git a/ci/test.sh b/ci/test.sh index 3b72dcf3..de034ad2 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -python3 -m unittest discover -s ../ +pytest ../. diff --git a/investing_algorithm_framework/__init__.py b/investing_algorithm_framework/__init__.py index d22ca761..b3bc7789 100644 --- a/investing_algorithm_framework/__init__.py +++ b/investing_algorithm_framework/__init__.py @@ -1,4 +1,4 @@ from investing_algorithm_framework.utils.version import get_version -VERSION = (1, 0, 0, 'alpha', 0) +VERSION = (0, 1, 0, 'alpha', 0) diff --git a/investing_algorithm_framework/tests/resources/__init__.py b/investing_algorithm_framework/tests/resources/__init__.py deleted file mode 100644 index 629d5502..00000000 --- a/investing_algorithm_framework/tests/resources/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -import os - -import investing_algorithm_framework.tests.resources.standard_settings - - -class BaseTestMixin: - - @staticmethod - def initialize_environment(): - os.environ.setdefault( - 'INVESTING_BOT_FRAMEWORK_SETTINGS_MODULE', 'investing_algorithm_framework.tests.resources.standard_settings' - ) - diff --git a/investing_algorithm_framework/tests/utils/__init__.py b/investing_algorithm_framework/tests/utils/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/setup.py b/setup.py index 62996604..48653856 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,6 @@ 'colorama', 'wrapt', 'requests' ], python_requires='>=3.6', - scripts=['investing_algorithm_framework/bin/investing-algorithm-framework-admin'], + scripts=['bin/investing-algorithm-framework-admin'], include_package_data=True, ) diff --git a/investing_algorithm_framework/tests/__init__.py b/tests/__init__.py similarity index 100% rename from investing_algorithm_framework/tests/__init__.py rename to tests/__init__.py diff --git a/investing_algorithm_framework/tests/core/__init__.py b/tests/core/__init__.py similarity index 100% rename from investing_algorithm_framework/tests/core/__init__.py rename to tests/core/__init__.py diff --git a/investing_algorithm_framework/tests/core/data/__init__.py b/tests/core/data_providers/__init__.py similarity index 100% rename from investing_algorithm_framework/tests/core/data/__init__.py rename to tests/core/data_providers/__init__.py diff --git a/investing_algorithm_framework/tests/core/data/data_providers/data_provider.py b/tests/core/data_providers/data_provider.py similarity index 85% rename from investing_algorithm_framework/tests/core/data/data_providers/data_provider.py rename to tests/core/data_providers/data_provider.py index 28295f44..8e7aea76 100644 --- a/investing_algorithm_framework/tests/core/data/data_providers/data_provider.py +++ b/tests/core/data_providers/data_provider.py @@ -1,5 +1,4 @@ -from investing_algorithm_framework.tests.core.data.data_providers.resources import TestDataProviderOne, \ - TestDataProviderTwo, TestObserver +from tests.core.data_providers.resources import TestDataProviderOne, TestDataProviderTwo, TestObserver def test(): diff --git a/investing_algorithm_framework/tests/core/data/data_providers/resources.py b/tests/core/data_providers/resources.py similarity index 100% rename from investing_algorithm_framework/tests/core/data/data_providers/resources.py rename to tests/core/data_providers/resources.py diff --git a/investing_algorithm_framework/tests/core/data/data_providers/__init__.py b/tests/core/executors/__init__.py similarity index 100% rename from investing_algorithm_framework/tests/core/data/data_providers/__init__.py rename to tests/core/executors/__init__.py diff --git a/investing_algorithm_framework/tests/core/executors/resources.py b/tests/core/executors/resources.py similarity index 100% rename from investing_algorithm_framework/tests/core/executors/resources.py rename to tests/core/executors/resources.py diff --git a/investing_algorithm_framework/tests/core/executors/test_executor.py b/tests/core/executors/test_executor.py similarity index 93% rename from investing_algorithm_framework/tests/core/executors/test_executor.py rename to tests/core/executors/test_executor.py index de785ce0..b9e5ba39 100644 --- a/investing_algorithm_framework/tests/core/executors/test_executor.py +++ b/tests/core/executors/test_executor.py @@ -1,8 +1,7 @@ from threading import active_count -from unittest import TestCase from time import sleep -from investing_algorithm_framework.tests.core.executors.resources import TestExecutor, TestWorkerOne, TestWorkerTwo, \ +from tests.core.executors.resources import TestExecutor, TestWorkerOne, TestWorkerTwo, \ TestObserver, TestWorkerThree diff --git a/investing_algorithm_framework/tests/core/executors/test_scheduler.py b/tests/core/executors/test_scheduler.py similarity index 100% rename from investing_algorithm_framework/tests/core/executors/test_scheduler.py rename to tests/core/executors/test_scheduler.py diff --git a/investing_algorithm_framework/tests/core/executors/__init__.py b/tests/core/resolvers/__init__.py similarity index 100% rename from investing_algorithm_framework/tests/core/executors/__init__.py rename to tests/core/resolvers/__init__.py diff --git a/investing_algorithm_framework/tests/core/resolvers/test_database_resolver.py b/tests/core/resolvers/test_database_resolver.py similarity index 95% rename from investing_algorithm_framework/tests/core/resolvers/test_database_resolver.py rename to tests/core/resolvers/test_database_resolver.py index 48c4ce5e..35af0541 100644 --- a/investing_algorithm_framework/tests/core/resolvers/test_database_resolver.py +++ b/tests/core/resolvers/test_database_resolver.py @@ -1,7 +1,8 @@ import os from sqlalchemy import Column, String, Integer -from investing_algorithm_framework.tests.resources import BaseTestMixin, utils +from tests.resources import BaseTestMixin +from tests.resources import utils from investing_algorithm_framework.core.configuration import settings from investing_algorithm_framework.core.extensions import db diff --git a/tests/resources/__init__.py b/tests/resources/__init__.py new file mode 100644 index 00000000..757cdec9 --- /dev/null +++ b/tests/resources/__init__.py @@ -0,0 +1,13 @@ +import os + +import tests.resources.standard_settings + + +class BaseTestMixin: + + @staticmethod + def initialize_environment(): + os.environ.setdefault( + 'INVESTING_BOT_FRAMEWORK_SETTINGS_MODULE', 'tests.resources.standard_settings' + ) + diff --git a/investing_algorithm_framework/tests/resources/standard_settings.py b/tests/resources/standard_settings.py similarity index 100% rename from investing_algorithm_framework/tests/resources/standard_settings.py rename to tests/resources/standard_settings.py diff --git a/investing_algorithm_framework/tests/resources/utils.py b/tests/resources/utils.py similarity index 99% rename from investing_algorithm_framework/tests/resources/utils.py rename to tests/resources/utils.py index 7fb043b7..02c042ce 100644 --- a/investing_algorithm_framework/tests/resources/utils.py +++ b/tests/resources/utils.py @@ -1,6 +1,7 @@ import random import string + def random_string(n, spaces: bool = False): if spaces: diff --git a/investing_algorithm_framework/tests/core/resolvers/__init__.py b/tests/utils/__init__.py similarity index 100% rename from investing_algorithm_framework/tests/core/resolvers/__init__.py rename to tests/utils/__init__.py diff --git a/investing_algorithm_framework/tests/utils/test_version.py b/tests/utils/test_version.py similarity index 100% rename from investing_algorithm_framework/tests/utils/test_version.py rename to tests/utils/test_version.py