Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow slash in config #36

Merged
merged 5 commits into from
Nov 5, 2020
Merged

Allow slash in config #36

merged 5 commits into from
Nov 5, 2020

Conversation

datamel
Copy link
Contributor

@datamel datamel commented Nov 2, 2020

This PR is a possible solution to the issue identified in Symlink Dirs PR, where, adding config item share/cycle to enable users to configure this directory for symlinking, resulted in an error when building the docs. This was because the / is a special character.

I have built the docs (with the cylc/cylc-flow#3884) - checking that the share/cycle no longer results in a doc build fail.

@datamel datamel self-assigned this Nov 2, 2020
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job for getting your head around Sphinx domains!

Here's a quick functional test:

diff --git a/cylc/sphinx_ext/cylc_lang/__init__.py b/cylc/sphinx_ext/cylc_lang/__init__.py
index 8a7a978..d58272c 100644
--- a/cylc/sphinx_ext/cylc_lang/__init__.py
+++ b/cylc/sphinx_ext/cylc_lang/__init__.py
@@ -88,7 +88,7 @@ Sphinx domain for ``cylc`` configurations.
 
         .. cylc:setting:: pub
 
-           a setting called ``pub``
+           A setting called ``pub``
 
            .. cylc:value:: integer
 
@@ -103,6 +103,10 @@ Sphinx domain for ``cylc`` configurations.
 
               an iso8601 duration.
 
+        .. cylc:setting:: a/b/c
+
+           A setting with a ``/`` in the name.
+
 
 Auto Documenters
 ----------------

cylc/sphinx_ext/cylc_lang/domains.py Outdated Show resolved Hide resolved
@datamel
Copy link
Contributor Author

datamel commented Nov 4, 2020

I had a play around with the regex here: https://regex101.com/r/PR0YQc/6
In case it is of any use to reviewers - I find regexs hard to interpret without examples!

@oliver-sanders oliver-sanders requested a review from wxtim November 5, 2020 09:49
@wxtim wxtim merged commit 417eccf into cylc:master Nov 5, 2020
@datamel datamel deleted the allow_slash_in_config branch November 5, 2020 10:26
@MetRonnie MetRonnie added this to the 1.3 milestone Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants