Skip to content

Commit

Permalink
Merge pull request #62 from oliver-sanders/cylc-lang-breadcrum
Browse files Browse the repository at this point in the history
Cylc lang breadcrum
  • Loading branch information
MetRonnie authored Dec 1, 2021
2 parents 444d464 + e1bf3b6 commit af7e5c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cylc/sphinx_ext/cylc_lang/autodocumenters.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def repr_value(value):


def doc_setting(item):
fields = {}
fields = {'Path': f'``{repr(item)}``'}
parents = list(item.parents())
if parents and parents[0].meta is True:
# too meta for us
Expand Down
8 changes: 8 additions & 0 deletions cylc/sphinx_ext/cylc_lang/tests/test_autodocumenters.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,15 @@ def test_doc_setting(
assert doc_setting(simple_setting) == [
'.. cylc:setting:: simple-setting',
'',
' :Path: ``simple-setting``',
' :type: :parsec:type:`string`',
''
]

assert doc_setting(option_setting) == [
'.. cylc:setting:: option-setting',
'',
' :Path: ``option-setting``',
' :type: :parsec:type:`string`',
' :options: ``a``, ``b``, ``c``',
''
Expand All @@ -163,6 +165,7 @@ def test_doc_setting(
assert doc_setting(default_setting) == [
'.. cylc:setting:: default-setting',
'',
' :Path: ``default-setting``',
' :type: :parsec:type:`string`',
' :default: ``x``',
''
Expand All @@ -171,6 +174,7 @@ def test_doc_setting(
assert doc_setting(documented_setting) == [
'.. cylc:setting:: documented-setting',
'',
' :Path: ``documented-setting``',
' :type: :parsec:type:`string`',
'',
' foo',
Expand Down Expand Up @@ -252,6 +256,10 @@ def test_doc_spec(documented_spec):
'',
' .. cylc:setting:: documented-setting',
'',
(
' '
':Path: ``documented-conf[documented-section]documented-setting``'
),
' :type: :parsec:type:`string`',
'',
' f',
Expand Down

0 comments on commit af7e5c2

Please sign in to comment.