diff --git a/README.rst b/README.rst index ba307de..cfab8ed 100644 --- a/README.rst +++ b/README.rst @@ -12,6 +12,11 @@ A script to score CSV files via DataRobot's prediction API. .. image:: https://badge.fury.io/py/datarobot-batch-scoring.svg :target: https://badge.fury.io/py/datarobot-batch-scoring +Deprecation Notice +======================= +The Batch Scoring script is deprecated. It will continue functioning indefinitely, +but it will not receive any new bug fixes and new functionality. +Please, use the [Batch Prediction command-line tools](https://app.datarobot.com/docs/predictions/batch/cli-scripts.html] instead. Version Compatibility --------------------- diff --git a/datarobot_batch_scoring/consts.py b/datarobot_batch_scoring/consts.py index 49970b4..9dfb977 100644 --- a/datarobot_batch_scoring/consts.py +++ b/datarobot_batch_scoring/consts.py @@ -6,6 +6,22 @@ REPORT_INTERVAL = 5 +DEPRECATION_WARNING = ( + '{yellow}{bold}Deprecation Warning!{reset} ' + 'The Batch Scoring script is deprecated. It will continue functioning ' + 'indefinitely, but it will not receive any new bug fixes and new ' + 'functionality. Please, use the Batch Prediction command-line tools ' + 'instead: ' + '({underline}https://app.datarobot.com/docs/predictions' + '/batch/cli-scripts.html{reset}).' + .format( + yellow='\033[93m', + bold='\033[1m', + reset='\033[0m', + underline='\033[4m' + ) + ) + class WriterQueueMsg(object): CTX_WARNING = 'CTX_WARNING' diff --git a/datarobot_batch_scoring/main.py b/datarobot_batch_scoring/main.py index 7b70ffc..dfaa26c 100644 --- a/datarobot_batch_scoring/main.py +++ b/datarobot_batch_scoring/main.py @@ -10,6 +10,7 @@ from datarobot_batch_scoring.api_response_handlers import ( RESPONSE_HANDLERS, PRED_API_V10, API_V1) from datarobot_batch_scoring.batch_scoring import (run_batch_predictions) +from datarobot_batch_scoring.consts import DEPRECATION_WARNING from datarobot_batch_scoring.exceptions import ShelveError from datarobot_batch_scoring.utils import (UI, get_config_file, parse_config_file, @@ -38,7 +39,8 @@ $ batch_scoring --host https://example.orm.datarobot.com \ --user="" --password="" 5545eb20b4912911244d4835 \ 5545eb71b4912911244d4847 ~/Downloads/diabetes_test.csv -""" + {deprecation_warning} +""".format(deprecation_warning=DEPRECATION_WARNING) VALID_DELIMITERS = {';', ',', '|', '\t', ' ', '!', ' '} @@ -519,5 +521,6 @@ def main_standalone(argv=sys.argv[1:]): if __name__ == '__main__': + print(DEPRECATION_WARNING) exit_code = main() # pragma: no cover sys.exit(exit_code) diff --git a/setup.py b/setup.py index 5943fbc..1962d81 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,8 @@ import re from setuptools import setup, find_packages +from datarobot_batch_scoring.consts import DEPRECATION_WARNING + extra = {} def read_requirements_file(file): @@ -83,3 +85,5 @@ def read_requirements_file(file): ], **extra ) + +print(DEPRECATION_WARNING) \ No newline at end of file