From f7e51bc5ec1194f218be29adf991bd6e9a3dabb8 Mon Sep 17 00:00:00 2001 From: fliiiix Date: Sat, 23 Nov 2024 17:00:40 +0100 Subject: [PATCH] Drop --profile option --- CHANGELOG.md | 1 + docs/commandline.rst | 24 ------------------------ docs/tutorial.rst | 3 --- radish/main.py | 9 --------- tests/conftest.py | 1 - 5 files changed, 1 insertion(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b990fc0a..2eb6c24f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changes - Drop Python 3.6 and Python 3.7 +- Drop the `--profile` option, please use `--user-data` ## [v0.17.1] diff --git a/docs/commandline.rst b/docs/commandline.rst index d1ce6dc0..1db65893 100644 --- a/docs/commandline.rst +++ b/docs/commandline.rst @@ -121,28 +121,6 @@ the hooks defined in the terrain files. To see example code please consult :ref:`terrain `. -Run - Profile -------------- - -Radish allows you to pass custom data to a Terrain hook code or to the Step implementations -using the ``-p`` or ``--profile`` command line option. This can be used to -customize your test runs as needed. - -The value specified to the ``-p`` / ``--profile`` command line option is made -available in ``world.config.profile``. Please see :ref:`tutorial#world` for -for an example. - -A common usage of ``profile`` s setting it to some environment value such as -``stage`` or ``production``. - -.. code:: bash - - radish SomeFeature.feature -p stage - radish SomeFeature.feature --profile stage - -Note: ``-p`` / ``--profile`` is being deprecated and will be removed in a future version of Radish. Please use ``-u`` / ``--user-data`` instead. See :ref:`Arbitrary User Data ` for details. - - Run - Dry run ------------- @@ -557,7 +535,6 @@ Use the ``--help`` or ``-h`` option to show the following help screen: [--debug-steps] [-t | --with-traceback] [-m= | --marker=] - [-p= | --profile=] [-d | --dry-run] [-s= | --scenarios=] [--shuffle] @@ -595,7 +572,6 @@ Use the ``--help`` or ``-h`` option to show the following help screen: --debug-steps debugs each step -t --with-traceback show the Exception traceback when a step fails -m= --marker= specify the marker for this run [default: time.time()] - -p= --profile= specify the profile which can be used in the step/hook implementation -b= --basedir=... set base dir from where the step.py and terrain.py will be loaded. [default: $PWD/radish] You can specify -b|--basedir multiple times. All files will be imported. -d --dry-run make dry run for the given feature files diff --git a/docs/tutorial.rst b/docs/tutorial.rst index d3a04c20..f06135bf 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -902,9 +902,6 @@ For example ``--bdd-xml`` argument can be accessed using # print basedir print(world.config.basedir) - # print profile - print(world.config.profile) - Sometimes it's useful to have specific variables and functions available during a whole test run. These variables and functions can be added to the ``world`` diff --git a/radish/main.py b/radish/main.py index ca2d2360..f6caee0e 100644 --- a/radish/main.py +++ b/radish/main.py @@ -104,7 +104,6 @@ def main(args=None): [--debug-steps] [-t | --with-traceback] [-m= | --marker=] - [-p= | --profile=] [-d | --dry-run] [-s= | --scenarios=] [--shuffle] @@ -125,7 +124,6 @@ def main(args=None): --debug-steps debugs each step -t --with-traceback show the Exception traceback when a step fails -m= --marker= specify the marker for this run [default: time.time()] - -p= --profile= specify the profile which can be used in the step/hook implementation -b= --basedir=... set base dir from where the step.py and terrain.py will be loaded. [default: $PWD/radish] You can specify -b|--basedir multiple times or split multiple paths with a colon (:) similar to $PATH. All files will be imported. -d --dry-run make dry run for the given feature files @@ -168,13 +166,6 @@ def main(args=None): core = Core() - if world.config.profile: - msg = ( - "Command line argument -p/--profile will be removed in a future version. Please " - "use -u/--user-data instead." - ) - warnings.warn(msg, DeprecationWarning, stacklevel=1) - feature_files = [] for given_feature in world.config.features: if not os.path.exists(given_feature): diff --git a/tests/conftest.py b/tests/conftest.py index 55c7fa5a..95a8a071 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -58,7 +58,6 @@ def mock_world_config(): "--marker": "time.time()", "--no-ansi": False, "--no-line-jump": False, - "--profile": None, "--scenarios": None, "--shuffle": False, "--syslog": False,