Skip to content

Commit 1c4f387

Browse files
committed
Rework injecting of markdown files into rst #2
1 parent 606fd89 commit 1c4f387

File tree

65 files changed

+3231
-3728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3231
-3728
lines changed

.github/workflows/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
uses: actions/setup-node@v4
3939
with:
4040
node-version: "*"
41+
- name: Install pandoc
42+
uses: r-lib/actions/setup-pandoc@v2
4143
- name: Install PyPi dependencies
4244
run: |
4345
python -m pip install --upgrade pip

.github/workflows/release.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
- uses: actions/setup-python@v4
1717
with:
1818
python-version: "3.13"
19+
- name: Install pandoc
20+
uses: r-lib/actions/setup-pandoc@v2
1921
- name: Install dependencies
2022
run: |
2123
python -m pip install --upgrade pip build twine

.pre-commit-config.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
---
4+
default_language_version:
5+
python: python3.12
46
repos:
57
- repo: https://github.com/psf/black
68
rev: 24.10.0
@@ -19,7 +21,9 @@ repos:
1921
rev: v5.0.0
2022
hooks:
2123
- id: trailing-whitespace
24+
exclude: "^.*\\.rst$"
2225
- id: end-of-file-fixer
26+
exclude: "^.*\\.rst$"
2327
- id: check-yaml
2428
- id: check-added-large-files
2529
- id: check-toml
@@ -60,4 +64,9 @@ repos:
6064
language: python
6165
types: [python]
6266
pass_filenames: false
63-
additional_dependencies: ['docopt-ng', 'pycmarkgfm']
67+
additional_dependencies:
68+
- 'docopt-ng'
69+
- 'pandoc'
70+
- 'panflute'
71+
- 'pycmarkgfm'
72+
- 'pypandoc'

docs/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@
131131
# relative to this directory. They are copied after the builtin static files,
132132
# so a file named "default.css" will overwrite the builtin "default.css".
133133
html_static_path = ["_static"]
134+
html_css_files = [
135+
"css/custom.css",
136+
]
134137

135138
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
136139
# using the given strftime format.

docs/features.rst

-173
This file was deleted.

docs/features/Feature/Description.feature.html

-44
This file was deleted.

docs/features/Feature/Description.feature.rst

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Feature: Descriptions
2+
^^^^^^^^^^^^^^^^^^^^^
3+
4+
Free-form descriptions can be placed underneath Feature,
5+
Example/Scenario, Background, Scenario Outline and Rule. You can write
6+
anything you like, as long as no line starts with a keyword.
7+
Descriptions can be in the form of Markdown - formatters including the
8+
official HTML formatter support this.
9+
10+
Scenario:
11+
'''''''''
12+
13+
- Given File "Description.feature" with content:
14+
15+
.. code:: gherkin
16+
17+
Feature:
18+
My Feature description
19+
Scenario:
20+
Given I check feature description
21+
22+
- And File "conftest.py" with content:
23+
24+
.. code:: python
25+
26+
from pytest_bdd import given
27+
28+
@given('I check feature description')
29+
def step(feature):
30+
assert feature.description == "My Feature description"
31+
32+
- When run pytest
33+
34+
- Then pytest outcome must contain tests with statuses:
35+
36+
====== ======
37+
passed failed
38+
====== ======
39+
1 0
40+
====== ======

0 commit comments

Comments
 (0)