Skip to content

Commit

Permalink
cylc_lang: add breadcrumb path to config sections (#74)
Browse files Browse the repository at this point in the history
* cylc_lang: add "breadcrumb" path to config sections
* Closes #70
* Improve config reference style
* Update GH Actions test workflow
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
  • Loading branch information
oliver-sanders authored Jul 27, 2022
1 parent 98932fa commit 251a046
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
name: test

on: [pull_request]
on:
pull_request:
workflow_dispatch:
push:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: ['3.7']
python-version: ['3.7', '3.9']
env:
PYTEST_ADDOPTS: --color=yes
steps:
- name: checkout
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: eslint
run: npx eslint .

- name: configure python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
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 @@ -168,7 +168,7 @@ def doc_setting(item):


def doc_section(item):
fields = {}
fields = {'Path': f'``{repr(item)}``'}
if item.meta is True:
# too meta for us
# this is section inside a meta section
Expand Down
4 changes: 4 additions & 0 deletions cylc/sphinx_ext/cylc_lang/tests/test_autodocumenters.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def test_doc_section(simple_section):
"""It should docuement configuration sections."""
assert doc_section(simple_section) == [
'.. cylc:section:: simple-section',
'',
' :Path: ``simple-section``',
''
]

Expand Down Expand Up @@ -251,6 +253,8 @@ def test_doc_spec(documented_spec):
'',
' .. cylc:section:: documented-section',
'',
' :Path: ``documented-conf[documented-section]``',
'',
' d',
' e',
'',
Expand Down
5 changes: 5 additions & 0 deletions cylc/sphinx_ext/rtd_theme_addons/_static/css/addons.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,8 @@ span.versionmodified{
overflow-x: hidden!important;
overflow-y: hidden!important;
}

/* Remove awkward margin for config reference "Path", "Type" etc. */
.rst-content .cylc.conf .field-list {
margin-bottom: 0;
}

0 comments on commit 251a046

Please sign in to comment.