Skip to content

Fix emphasize-lines with runcmd #280

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

Merged
merged 4 commits into from
Oct 12, 2022
Merged

Fix emphasize-lines with runcmd #280

merged 4 commits into from
Oct 12, 2022

Conversation

kinow
Copy link
Member

@kinow kinow commented Oct 11, 2022

Closes #269

@swzCuroverse this PR changes should fix the emphasize-lines and hopefully make html works for you from this branch. Could you review it, please?

@mr-c told you it was one of those annoying issues that requires a single line to fix, but you spend way too long figuring out which line to change 😆

The issue was identified in this pull request review by @mr-c : #246 (comment)

The comment was on the troubleshooting.md file. Here's this file rendered on my local environment (reviewers can use the RTD preview 👇):

image

@kinow kinow requested a review from swzCuroverse October 11, 2022 21:05
@kinow
Copy link
Member Author

kinow commented Oct 11, 2022

(worth going around the user guide when reviewing it too... it shouldn't break anything, but you never know! 👍 )

@kinow
Copy link
Member Author

kinow commented Oct 11, 2022

Huh, I just tried re-running everything after cleaning my environment, and it failed to find the lines for inputs.md. I think that the error you had @swzCuroverse could be caused by this issue actually?

(venv) kinow@ranma:~/Development/python/workspace/user_guide/src/_includes/cwl/inputs$ cwltool record.cwl record-job1.yml
INFO /home/kinow/Development/python/workspace/user_guide/venv/bin/cwltool 3.1.20221008225030
INFO Resolved 'record.cwl' to 'file:///home/kinow/Development/python/workspace/user_guide/src/_includes/cwl/inputs/record.cwl'
ERROR Workflow error, try again with --debug for more information:
Invalid job input record:
record-job1.yml:1:1: the `dependent_parameters` field is not valid because
                       missing required field `itemB`

Something changed somewhere (either in the example, or in cwltool) that broke that example. Let me see if I can adjust it.

@kinow kinow marked this pull request as draft October 11, 2022 21:15
@kinow kinow marked this pull request as ready for review October 11, 2022 22:57
@kinow
Copy link
Member Author

kinow commented Oct 11, 2022

I think it's fixed now. Let me know if the build passes for you now @swzCuroverse 👍

@swzCuroverse
Copy link
Contributor

Let me see if it works for me :)

swzCuroverse
swzCuroverse previously approved these changes Oct 12, 2022
Copy link
Contributor

@swzCuroverse swzCuroverse left a comment

Choose a reason for hiding this comment

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

Hmm - It isn't working for me. I went to the fix-emphasize-lines-runcmd branch and ran make html, and I still see the same errors. I verified that I had the correct branch by comparing the changes listed here and the files I have in my branch. Still no luck. Let me see if some old html is hanging about and that is causing an issue.

Side note -- these are my configurations if different than yours MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['colon_fence', 'deflist', 'substitution', 'replacements'], disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=4, heading_slug_func=None, footnote_transition=True, words_per_minute=200, sub_delimiters=('{', '}'), linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area')

and sphinx versions:
sphinx==5.2.3
sphinx-autobuild==2021.3.14
sphinx-reredirects==0.1.1
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-runcmd==0.2.0
sphinxcontrib-serializinghtml==1.1.5

@kinow
Copy link
Member Author

kinow commented Oct 12, 2022

Hi @swzCuroverse , do you still have the exact same error? Could you try:

  • rm -rf _build (if you have a _build folder)
  • make html again, or sphinx-build -b html src _build/html/
  • Confirm if you still get the same error of lines out of range, please?

Side note -- these are my configurations if different than yours MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['colon_fence', 'deflist', 'substitution', 'replacements'], disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=4, heading_slug_func=None, footnote_transition=True, words_per_minute=200, sub_delimiters=('{', '}'), linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area')

Are these from src/conf.py?

and sphinx versions:

Our sphinx versions are the same 👍 so I think we can rule that out.

Thanks @swzCuroverse !
-Bruno

@mr-c mr-c force-pushed the fix-emphasize-lines-runcmd branch from a1d10b4 to 8a15eba Compare October 12, 2022 09:38
@mr-c mr-c enabled auto-merge (squash) October 12, 2022 09:46
@mr-c mr-c merged commit 6835eb7 into main Oct 12, 2022
@mr-c mr-c deleted the fix-emphasize-lines-runcmd branch October 12, 2022 09:49
@swzCuroverse
Copy link
Contributor

swzCuroverse commented Oct 13, 2022

@kinow , I removed the _build and make sure I am up to date with the latest main branch, and I still get the error: Let me re-clone and see if that fixes the issue.

make html
Running Sphinx v5.2.3
making output directory... done
myst v0.18.1: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['colon_fence', 'deflist', 'substitution', 'replacements'], disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=4, heading_slug_func=None, footnote_transition=True, words_per_minute=200, sub_delimiters=('{', '}'), linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area')
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 33 source files that are out of date
updating environment: [new config] 33 added, 0 changed, 0 removed
reading sources... [100%] tutorials

Warning, treated as error:
/home/swz/user_guide/src/topics/inputs.md.rst:210:line number spec is out of range(1-1): '6-7'
make: *** [Makefile:50: html] Error 2

@swzCuroverse
Copy link
Contributor

swzCuroverse commented Oct 13, 2022

I recloned a new version and it still breaks for me.

make html
Running Sphinx v5.2.3
making output directory... done
myst v0.18.1: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['colon_fence', 'deflist', 'substitution', 'replacements'], disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=4, heading_slug_func=None, footnote_transition=True, words_per_minute=200, sub_delimiters=('{', '}'), linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area')
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 33 source files that are out of date
updating environment: [new config] 33 added, 0 changed, 0 removed
reading sources... [100%] tutorials
Warning, treated as error:
/home/swz/user_guide/src/topics/inputs.md.rst:210:line number spec is out of range(1-1): '6-7'
make: *** [Makefile:50: html] Error 2

@swzCuroverse
Copy link
Contributor

Maybe there is something different in your config?

@tetron
Copy link
Member

tetron commented Oct 13, 2022

@swzCuroverse I was able to get this to work after doing this:

  1. rm -rf _build
  2. pip install -U pip setuptools wheel
  3. pip install .[all]

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.

runcmd directive doesn't work with emphasize-lines
4 participants