From 8a3ec496ed20e6848e013a40f5a5d82b025736e8 Mon Sep 17 00:00:00 2001 From: saeedamen Date: Sun, 14 Jun 2020 00:33:19 +0100 Subject: [PATCH] Refactor test folder name --- .dockerignore | 2 +- requirements.txt | 20 +++++++++--------- ...itional_benchmarks_metrics_for_tcapy.ipynb | 4 ++-- .../compliance_tca_calculations.ipynb | 4 ++-- tcapy_notebooks/introducing_tcapy.ipynb | 4 ++-- .../market_microstructure_with_tcapy.ipynb | 4 ++-- .../populating_databases_for_tcapy.ipynb | 4 ++-- {tests => test}/config.py | 0 {tests => test}/conftest.py | 2 +- .../resources/small_test_market_df.parquet | Bin .../small_test_market_df_reverse.parquet | Bin .../resources/small_test_order_df.csv | 0 .../resources/small_test_trade_df.csv | 0 {tests => test}/run_tests.sh | 0 .../test_tcapy/test_data_read_write.py | 2 +- .../test_tcapy/test_data_vendor_feed.py | 2 +- .../test_overlapping_data_caching.py | 2 +- .../test_tcapy/test_results_agg.py | 2 +- .../test_tcapy/test_tca_functionality.py | 2 +- .../test_tcapy/test_tca_multithreading.py | 2 +- .../test_tcapy/test_time_series.py | 2 +- .../test_tcapy/test_trade_data_generation.py | 2 +- tests/__init__.py | 0 tests/test_tcapy/__init__.py | 0 24 files changed, 30 insertions(+), 30 deletions(-) rename {tests => test}/config.py (100%) mode change 100755 => 100644 rename {tests => test}/conftest.py (99%) rename {tests => test}/resources/small_test_market_df.parquet (100%) rename {tests => test}/resources/small_test_market_df_reverse.parquet (100%) rename {tests => test}/resources/small_test_order_df.csv (100%) rename {tests => test}/resources/small_test_trade_df.csv (100%) rename {tests => test}/run_tests.sh (100%) mode change 100755 => 100644 rename {tests => test}/test_tcapy/test_data_read_write.py (99%) rename {tests => test}/test_tcapy/test_data_vendor_feed.py (99%) rename {tests => test}/test_tcapy/test_overlapping_data_caching.py (99%) rename {tests => test}/test_tcapy/test_results_agg.py (99%) rename {tests => test}/test_tcapy/test_tca_functionality.py (99%) rename {tests => test}/test_tcapy/test_tca_multithreading.py (99%) rename {tests => test}/test_tcapy/test_time_series.py (99%) rename {tests => test}/test_tcapy/test_trade_data_generation.py (98%) delete mode 100644 tests/__init__.py delete mode 100644 tests/test_tcapy/__init__.py diff --git a/.dockerignore b/.dockerignore index 840aacb..984704f 100755 --- a/.dockerignore +++ b/.dockerignore @@ -5,7 +5,7 @@ !requirements.txt -!tests +!test !tcapy !tcapy_notebooks !tcapygen diff --git a/requirements.txt b/requirements.txt index 8d4da1a..198f7e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,18 @@ setuptools-git==1.2 cython==0.29.13 arctic==1.79.2 -sqlalchemy==1.3.7 +sqlalchemy==1.3.17 redis==3.3.7 pymssql==2.1.4 -pandas==0.24.2 -numpy==1.16.4 -scipy==1.3.1 -statsmodels==0.10.1 +pandas==0.25.3 +numpy==1.18.5 +scipy==1.4.1 +statsmodels==0.11.1 tables==3.5.2 blosc==1.8.3 pyarrow==0.16.0 pathos==0.2.1 -multiprocess==0.70.8 +multiprocess==0.70.9 fastparquet==0.3.3 flask-restplus==0.13.0 gunicorn==19.9.0 @@ -22,15 +22,15 @@ psutil==5.6.3 matplotlib==3.1.1 boto3==1.5.11 pyodbc==4.0.23 -pytest==5.1.0 +pytest==5.4.3 pytest-cov==2.5.1 mysql-connector-python==8.0.19 -IPython==7.13.0 +IPython==7.14.0 chartpy==0.1.8 findatapy==0.1.11 dash-auth==1.3.2 cufflinks==0.17.3 -plotly==4.8.0 +plotly==4.8.1 chart-studio==1.1.0 dash==1.12.0 dash-html-components==1.0.3 @@ -46,7 +46,7 @@ kombu==4.6.7 python-memcached==1.59 numba==0.48.0 vispy==0.6.4 -jinja2==2.11.1 +jinja2==2.11.2 jupyterlab jupyter_contrib_nbextensions jupyter_nbextensions_configurator diff --git a/tcapy_notebooks/additional_benchmarks_metrics_for_tcapy.ipynb b/tcapy_notebooks/additional_benchmarks_metrics_for_tcapy.ipynb index 53b63cb..d7a8659 100644 --- a/tcapy_notebooks/additional_benchmarks_metrics_for_tcapy.ipynb +++ b/tcapy_notebooks/additional_benchmarks_metrics_for_tcapy.ipynb @@ -79,8 +79,8 @@ "\n", "windows_tcapy_path = 'e:/cuemacro/tcapy' # Windows platform\n", "linux_tcapy_path = '/home/tcapyuser/cuemacro/tcapy' # Linux platform\n", - "local_test_data_path = '../tests/resources/' # Windows platform\n", - "remote_test_data_path = '../tests/resources/' # WSL drive\n", + "local_test_data_path = '../test/resources/' # Windows platform\n", + "remote_test_data_path = '../test/resources/' # WSL drive\n", "\n", "# Assuming the front end is on Windows\n", "sys.path.insert(0, windows_tcapy_path)" diff --git a/tcapy_notebooks/compliance_tca_calculations.ipynb b/tcapy_notebooks/compliance_tca_calculations.ipynb index 8c88191..0dc08b8 100644 --- a/tcapy_notebooks/compliance_tca_calculations.ipynb +++ b/tcapy_notebooks/compliance_tca_calculations.ipynb @@ -80,8 +80,8 @@ "\n", "windows_tcapy_path = 'e:/cuemacro/tcapy' # Windows platform\n", "linux_tcapy_path = '/home/tcapyuser/cuemacro/tcapy' # Linux platform\n", - "local_test_data_path = '../tests/resources/' # Windows platform\n", - "remote_test_data_path = '../tests/resources/' # WSL drive\n", + "local_test_data_path = '../test/resources/' # Windows platform\n", + "remote_test_data_path = '../test/resources/' # WSL drive\n", "\n", "# Assuming the front end is on Linux\n", "sys.path.insert(0, windows_tcapy_path)" diff --git a/tcapy_notebooks/introducing_tcapy.ipynb b/tcapy_notebooks/introducing_tcapy.ipynb index 0c4b5c4..4995257 100644 --- a/tcapy_notebooks/introducing_tcapy.ipynb +++ b/tcapy_notebooks/introducing_tcapy.ipynb @@ -329,8 +329,8 @@ "\n", "windows_tcapy_path = 'e:/cuemacro/tcapy' # Windows platform\n", "linux_tcapy_path = '/home/tcapyuser/cuemacro/tcapy' # Linux platform\n", - "local_test_data_path = '../tests/resources/' # Windows platform\n", - "remote_test_data_path = '../tests/resources/' # WSL drive\n", + "local_test_data_path = '../test/resources/' # Windows platform\n", + "remote_test_data_path = '../test/resources/' # WSL drive\n", "\n", "# Assuming the front end is on Windows\n", "sys.path.insert(0, windows_tcapy_path)" diff --git a/tcapy_notebooks/market_microstructure_with_tcapy.ipynb b/tcapy_notebooks/market_microstructure_with_tcapy.ipynb index b290968..c838fda 100644 --- a/tcapy_notebooks/market_microstructure_with_tcapy.ipynb +++ b/tcapy_notebooks/market_microstructure_with_tcapy.ipynb @@ -52,8 +52,8 @@ "\n", "windows_tcapy_path = 'e:/cuemacro/tcapy' # Windows platform\n", "linux_tcapy_path = '/home/tcapyuser/cuemacro/tcapy' # Linux platform\n", - "local_test_data_path = '../tests/resources/' # Windows platform\n", - "remote_test_data_path = '../tests/resources/' # WSL drive\n", + "local_test_data_path = '../test/resources/' # Windows platform\n", + "remote_test_data_path = '../test/resources/' # WSL drive\n", "\n", "# Assuming the front end is on Windows\n", "sys.path.insert(0, windows_tcapy_path)" diff --git a/tcapy_notebooks/populating_databases_for_tcapy.ipynb b/tcapy_notebooks/populating_databases_for_tcapy.ipynb index f9223ad..bfc2bd2 100644 --- a/tcapy_notebooks/populating_databases_for_tcapy.ipynb +++ b/tcapy_notebooks/populating_databases_for_tcapy.ipynb @@ -56,8 +56,8 @@ "\n", "windows_tcapy_path = 'e:/cuemacro/tcapy' # Windows platform\n", "linux_tcapy_path = '/home/tcapyuser/cuemacro/tcapy' # Linux platform\n", - "local_test_data_path = '../tests/resources/' # Windows platform\n", - "remote_test_data_path = '../tests/resources/' # WSL drive\n", + "local_test_data_path = '../test/resources/' # Windows platform\n", + "remote_test_data_path = '../test/resources/' # WSL drive\n", "\n", "# For dumping market data files\n", "# Assuming Windows platform (you might have to change these paths)\n", diff --git a/tests/config.py b/test/config.py old mode 100755 new mode 100644 similarity index 100% rename from tests/config.py rename to test/config.py diff --git a/tests/conftest.py b/test/conftest.py similarity index 99% rename from tests/conftest.py rename to test/conftest.py index 81873b3..cce3c03 100644 --- a/tests/conftest.py +++ b/test/conftest.py @@ -21,7 +21,7 @@ from tcapy.data.databasesource import DatabaseSourceMySQL, DatabaseSourceArctic -from tests.config import * +from test.config import * logger = LoggerManager().getLogger(__name__) diff --git a/tests/resources/small_test_market_df.parquet b/test/resources/small_test_market_df.parquet similarity index 100% rename from tests/resources/small_test_market_df.parquet rename to test/resources/small_test_market_df.parquet diff --git a/tests/resources/small_test_market_df_reverse.parquet b/test/resources/small_test_market_df_reverse.parquet similarity index 100% rename from tests/resources/small_test_market_df_reverse.parquet rename to test/resources/small_test_market_df_reverse.parquet diff --git a/tests/resources/small_test_order_df.csv b/test/resources/small_test_order_df.csv similarity index 100% rename from tests/resources/small_test_order_df.csv rename to test/resources/small_test_order_df.csv diff --git a/tests/resources/small_test_trade_df.csv b/test/resources/small_test_trade_df.csv similarity index 100% rename from tests/resources/small_test_trade_df.csv rename to test/resources/small_test_trade_df.csv diff --git a/tests/run_tests.sh b/test/run_tests.sh old mode 100755 new mode 100644 similarity index 100% rename from tests/run_tests.sh rename to test/run_tests.sh diff --git a/tests/test_tcapy/test_data_read_write.py b/test/test_tcapy/test_data_read_write.py similarity index 99% rename from tests/test_tcapy/test_data_read_write.py rename to test/test_tcapy/test_data_read_write.py index c6d4677..4e15ad4 100644 --- a/tests/test_tcapy/test_data_read_write.py +++ b/test/test_tcapy/test_data_read_write.py @@ -36,7 +36,7 @@ from tcapy.util.mediator import Mediator from tcapy.util.customexceptions import * -from tests.config import * +from test.config import * logger = LoggerManager().getLogger(__name__) diff --git a/tests/test_tcapy/test_data_vendor_feed.py b/test/test_tcapy/test_data_vendor_feed.py similarity index 99% rename from tests/test_tcapy/test_data_vendor_feed.py rename to test/test_tcapy/test_data_vendor_feed.py index 54cd9a9..4d4e0bd 100644 --- a/tests/test_tcapy/test_data_vendor_feed.py +++ b/test/test_tcapy/test_data_vendor_feed.py @@ -24,7 +24,7 @@ from tcapy.data.databasepopulator import DatabasePopulatorNCFX, DatabasePopulatorDukascopy from tcapy.data.databasesource import DatabaseSourceNCFX, DatabaseSourceDukascopy -from tests.config import * +from test.config import * logger = LoggerManager().getLogger(__name__) diff --git a/tests/test_tcapy/test_overlapping_data_caching.py b/test/test_tcapy/test_overlapping_data_caching.py similarity index 99% rename from tests/test_tcapy/test_overlapping_data_caching.py rename to test/test_tcapy/test_overlapping_data_caching.py index e5bab5f..95960f1 100644 --- a/tests/test_tcapy/test_overlapping_data_caching.py +++ b/test/test_tcapy/test_overlapping_data_caching.py @@ -22,7 +22,7 @@ from collections import OrderedDict -from tests.config import * +from test.config import * constants = Constants() logger = LoggerManager().getLogger(__name__) diff --git a/tests/test_tcapy/test_results_agg.py b/test/test_tcapy/test_results_agg.py similarity index 99% rename from tests/test_tcapy/test_results_agg.py rename to test/test_tcapy/test_results_agg.py index ab069fa..1980ae6 100644 --- a/tests/test_tcapy/test_results_agg.py +++ b/test/test_tcapy/test_results_agg.py @@ -16,7 +16,7 @@ from tcapy.analysis.algos.resultssummary import ResultsSummary -from tests.config import * +from test.config import * logger = LoggerManager().getLogger(__name__) diff --git a/tests/test_tcapy/test_tca_functionality.py b/test/test_tcapy/test_tca_functionality.py similarity index 99% rename from tests/test_tcapy/test_tca_functionality.py rename to test/test_tcapy/test_tca_functionality.py index 9ed0038..2d392a0 100644 --- a/tests/test_tcapy/test_tca_functionality.py +++ b/test/test_tcapy/test_tca_functionality.py @@ -26,7 +26,7 @@ from tcapy.vis.tcaresults import TCAResults from tcapy.vis.report.tcareport import TCAReport -from tests.config import * +from test.config import * constants = Constants() logger = LoggerManager().getLogger(__name__) diff --git a/tests/test_tcapy/test_tca_multithreading.py b/test/test_tcapy/test_tca_multithreading.py similarity index 99% rename from tests/test_tcapy/test_tca_multithreading.py rename to test/test_tcapy/test_tca_multithreading.py index 84c1b6a..d33a4f6 100644 --- a/tests/test_tcapy/test_tca_multithreading.py +++ b/test/test_tcapy/test_tca_multithreading.py @@ -29,7 +29,7 @@ from tcapy.analysis.tcaengine import TCARequest, TCAEngineImpl -from tests.config import * +from test.config import * ######################################################################################################################## # YOU MAY NEED TO CHANGE TESTING PARAMETERS IF YOUR DATABASE DOESN'T COVER THESE DATES diff --git a/tests/test_tcapy/test_time_series.py b/test/test_tcapy/test_time_series.py similarity index 99% rename from tests/test_tcapy/test_time_series.py rename to test/test_tcapy/test_time_series.py index 3e1b328..4e309b8 100644 --- a/tests/test_tcapy/test_time_series.py +++ b/test/test_tcapy/test_time_series.py @@ -18,7 +18,7 @@ from tcapy.util.customexceptions import * -from tests.config import * +from test.config import * ticker = 'EURUSD' start_date = '20 Apr 2017' diff --git a/tests/test_tcapy/test_trade_data_generation.py b/test/test_tcapy/test_trade_data_generation.py similarity index 98% rename from tests/test_tcapy/test_trade_data_generation.py rename to test/test_tcapy/test_trade_data_generation.py index f5fb3c1..d992217 100644 --- a/tests/test_tcapy/test_trade_data_generation.py +++ b/test/test_tcapy/test_trade_data_generation.py @@ -32,7 +32,7 @@ use_market_data_test_csv = True -from tests.config import * +from test.config import * logger.info('Make sure you have created folder ' + constants.csv_folder + ' & ' + constants.temp_data_folder + ' otherwise tests will fail') diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/test_tcapy/__init__.py b/tests/test_tcapy/__init__.py deleted file mode 100644 index e69de29..0000000