Skip to content

Commit

Permalink
Adjust Sphinx documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
elchupanebrej committed Oct 6, 2024
1 parent d56829e commit 826d30d
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 102 deletions.
3 changes: 3 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. toctree::
:hidden:

Authors
=======

Expand Down
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. toctree::
:hidden:

Changelog
=========

Expand Down
5 changes: 4 additions & 1 deletion DOCUMENTATION.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. toctree::
:hidden:

Advanced Features
=================

Expand Down Expand Up @@ -251,7 +254,7 @@ Allure reporting is also in place https://docs.qameta.io/allure and based on
`allure-pytest` https://pypi.org/project/allure-pytest/ plugin. Usage is same.
To install plugin
^^^^^^^^^^^^^^^^^
#################
::
Expand Down
5 changes: 4 additions & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.. toctree::
:hidden:

MIT License
===========

Copyright (C) 2013-2023 Oleg Pidsadnyi, Anatoly Bubenkov and others
Copyright (C) 2013-2024 Oleg Pidsadnyi, Anatoly Bubenkov and others

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ The current pytest plugin for cucumber is pytest-bdd_ , a popular project with 1
- \-
- \+
- No boilerplate code / No mix between steps definition and feature files
* - Load of Feature files by HTTP
- \-
- \+
- Allows to integrate the library into external Feature storages
* - Stability and bugfixes
- \+
- \+/-
Expand Down
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
# documentation.
html_theme_options = {
"page_width": "100%",
"sidebar_width": "270px",
"body_max_width": "1200%",
}

# Add any paths that contain custom themes here, relative to this directory.
Expand Down
150 changes: 75 additions & 75 deletions docs/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,158 +7,158 @@ Features



Scenario
--------

Description.feature
###################

.. include:: ../features/Scenario/Description.feature
:code: gherkin

Tag.feature
###########

.. include:: ../features/Scenario/Tag.feature
:code: gherkin

Outline
#######

Examples Tag.feature
!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Scenario/Outline/Examples Tag.feature
:code: gherkin

Tutorial
--------

Launch.feature
##############
Launch
######

.. include:: ../features/Tutorial/Launch.feature
:code: gherkin

Step definition
---------------

Target fixtures specification.feature
#####################################
Pytest fixtures substitution
############################

.. include:: ../features/Step definition/Target fixtures specification.feature
.. include:: ../features/Step definition/Pytest fixtures substitution.feature
:code: gherkin

Pytest fixtures substitution.feature
####################################
Target fixtures specification
#############################

.. include:: ../features/Step definition/Pytest fixtures substitution.feature
.. include:: ../features/Step definition/Target fixtures specification.feature
:code: gherkin

Parameters
##########

Defaults.feature
!!!!!!!!!!!!!!!!
Conversion
!!!!!!!!!!

.. include:: ../features/Step definition/Parameters/Defaults.feature
.. include:: ../features/Step definition/Parameters/Conversion.feature
:code: gherkin

Injection as fixtures.feature
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Defaults
!!!!!!!!

.. include:: ../features/Step definition/Parameters/Injection as fixtures.feature
.. include:: ../features/Step definition/Parameters/Defaults.feature
:code: gherkin

Conversion.feature
!!!!!!!!!!!!!!!!!!
Injection as fixtures
!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Step definition/Parameters/Conversion.feature
.. include:: ../features/Step definition/Parameters/Injection as fixtures.feature
:code: gherkin

Parsing by custom parser.feature
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Parsing by custom parser
!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Step definition/Parameters/Parsing by custom parser.feature
:code: gherkin

Parsing.feature
!!!!!!!!!!!!!!!
Parsing
!!!!!!!

.. include:: ../features/Step definition/Parameters/Parsing.feature
:code: gherkin

Step
----

Doc string.feature
##################
Data table
##########

.. include:: ../features/Step/Doc string.feature
.. include:: ../features/Step/Data table.feature
:code: gherkin

Data table.feature
##################
Doc string
##########

.. include:: ../features/Step/Data table.feature
.. include:: ../features/Step/Doc string.feature
:code: gherkin

Step definition bounding.feature
################################
Step definition bounding
########################

.. include:: ../features/Step/Step definition bounding.feature
:code: gherkin

Scenario
--------

Description
###########

.. include:: ../features/Scenario/Description.feature
:code: gherkin

Tag
###

.. include:: ../features/Scenario/Tag.feature
:code: gherkin

Outline
#######

Examples Tag
!!!!!!!!!!!!

.. include:: ../features/Scenario/Outline/Examples Tag.feature
:code: gherkin

Feature
-------

Localization.feature
####################
Description
###########

.. include:: ../features/Feature/Localization.feature
.. include:: ../features/Feature/Description.feature
:code: gherkin

Description.feature
###################
Localization
############

.. include:: ../features/Feature/Description.feature
.. include:: ../features/Feature/Localization.feature
:code: gherkin

Tag conversion.feature
######################
Tag conversion
##############

.. include:: ../features/Feature/Tag conversion.feature
:code: gherkin

Tag.feature
###########
Tag
###

.. include:: ../features/Feature/Tag.feature
:code: gherkin

Load
####

Scenario search from base url.feature
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Feature/Load/Scenario search from base url.feature
:code: gherkin

Autoload.feature
!!!!!!!!!!!!!!!!
Autoload
!!!!!!!!

.. include:: ../features/Feature/Load/Autoload.feature
:code: gherkin

Scenario function loader.feature
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Scenario function loader
!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Feature/Load/Scenario function loader.feature
:code: gherkin

Scenario search from base directory.feature
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Scenario search from base directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Feature/Load/Scenario search from base directory.feature
:code: gherkin

Scenario search from base url
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Feature/Load/Scenario search from base url.feature
:code: gherkin
6 changes: 6 additions & 0 deletions docs/include.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. include:: ../README.rst
.. include:: features.rst
.. include:: ../DOCUMENTATION.rst
.. include:: ../AUTHORS.rst
.. include:: ../CHANGES.rst
.. include:: ../LICENSE.rst
21 changes: 4 additions & 17 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
.. toctree::
:glob:

*

Welcome to Pytest-BDD-NextGeneration's documentation!
=====================================================
.. toctree::
:glob:

.. include:: ../README.rst

.. contents::

.. include:: features.rst

.. include:: ../DOCUMENTATION.rst

.. include:: ../AUTHORS.rst

.. include:: ../CHANGES.rst
include.rst

.. include:: ../LICENSE.rst
.. include:: include
8 changes: 4 additions & 4 deletions src/pytest_bdd/script/bdd_tree_to_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def convert(features_path: Path, output_file_path: Path):
content += dedent(
# language=rst
f"""\
{rel_path.name}
{SECTION_SYMBOLS[len(rel_path.parts)-1]*len(rel_path.name)}
{rel_path.stem}
{SECTION_SYMBOLS[len(rel_path.parts)-1]*len(rel_path.stem)}
.. include:: {(output_path_rel_to_features_path / path.relative_to(features_path)).as_posix()}
:code: gherkin
Expand All @@ -78,8 +78,8 @@ def convert(features_path: Path, output_file_path: Path):
content += dedent(
# language=rst
f"""\
{rel_path.as_posix()}
{SECTION_SYMBOLS[len(rel_path.parts)-1]*len(str(rel_path))}
{rel_path.stem}
{SECTION_SYMBOLS[len(rel_path.parts)-1]*len(rel_path.stem)}
.. include:: {(output_path_rel_to_features_path / path.relative_to(features_path)).as_posix()}
:code: yaml
Expand Down
8 changes: 4 additions & 4 deletions tests/doc/test_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ def test_doc_generation(testdir: "Testdir"):
simple.gherkin
--------------
simple
------
.. include:: features/simple.gherkin
:code: gherkin
extra
-----
other_simple.gherkin
####################
other_simple
############
.. include:: features/extra/other_simple.gherkin
:code: gherkin
Expand Down

0 comments on commit 826d30d

Please sign in to comment.