Skip to content

Commit

Permalink
Drop --profile option
Browse files Browse the repository at this point in the history
  • Loading branch information
fliiiix committed Nov 23, 2024
1 parent ee1ea0b commit f7e51bc
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 37 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
24 changes: 0 additions & 24 deletions docs/commandline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,6 @@ the hooks defined in the terrain files.
To see example code please consult :ref:`terrain <tutorial#terrain_and_hooks>`.


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 <commandline#user_data>` for details.


Run - Dry run
-------------

Expand Down Expand Up @@ -557,7 +535,6 @@ Use the ``--help`` or ``-h`` option to show the following help screen:
[--debug-steps]
[-t | --with-traceback]
[-m=<marker> | --marker=<marker>]
[-p=<profile> | --profile=<profile>]
[-d | --dry-run]
[-s=<scenarios> | --scenarios=<scenarios>]
[--shuffle]
Expand Down Expand Up @@ -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> --marker=<marker> specify the marker for this run [default: time.time()]
-p=<profile> --profile=<profile> specify the profile which can be used in the step/hook implementation
-b=<basedir> --basedir=<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
Expand Down
3 changes: 0 additions & 3 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
9 changes: 0 additions & 9 deletions radish/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def main(args=None):
[--debug-steps]
[-t | --with-traceback]
[-m=<marker> | --marker=<marker>]
[-p=<profile> | --profile=<profile>]
[-d | --dry-run]
[-s=<scenarios> | --scenarios=<scenarios>]
[--shuffle]
Expand All @@ -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> --marker=<marker> specify the marker for this run [default: time.time()]
-p=<profile> --profile=<profile> specify the profile which can be used in the step/hook implementation
-b=<basedir> --basedir=<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
Expand Down Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f7e51bc

Please sign in to comment.