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

Command to automatically link to MCNP manual #415

Merged
merged 3 commits into from
Jun 22, 2024

Conversation

tjlaboss
Copy link
Collaborator

Description

Add a :manual63: command to link to relevant sections of the MCNP6.3 user's manual. Apply it in "Getting Started".

Note that LANL used a nice, predictable subsection naming convention for MCNP6.3, and did not for MCNP6.2.

Motivation: prerequisite to address #413.

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if applicable)
    • Should I add a note to the developer's guide? If not, then not applicable.

@tjlaboss tjlaboss added the documentation Improvements or additions to documentation label Jun 18, 2024
@tjlaboss tjlaboss requested a review from MicahGale June 18, 2024 20:39
@tjlaboss tjlaboss self-assigned this Jun 18, 2024
@coveralls
Copy link
Collaborator

coveralls commented Jun 18, 2024

Pull Request Test Coverage Report for Build 9571905078

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.223%

Totals Coverage Status
Change from base Build 9550865708: 0.0%
Covered Lines: 5750
Relevant Lines: 5854

💛 - Coveralls

Copy link
Collaborator

@MicahGale MicahGale left a comment

Choose a reason for hiding this comment

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

I ran this locally and was able to get the link to work.

However when I ran make linkcheck I got the error:

(        starting: line  146) broken    https://mcnp.lanl.gov/pdf_files/TechReport_2022_LANL_LA-UR-22-30006Rev.1_KuleszaAdamsEtAl.pdf#subsection.4.4.1 - 'utf-8' codec can't decode byte 0xf6 in position 10: invalid start byte

Please look into this so we can start using make linkcheck as a test.

I think this is a good start. I still want to think of how best to show the manual links in the doc strings.

Also I am ok with overriding the failed tests because:

  1. the failed test is a failure in test-reporter, which is due to you being outside the organization. I should see if there's an easy solution, because it will be useless if doesn't work for all external pulls.
  2. This is incremental that a changelog entry isn't merited yet.

@MicahGale
Copy link
Collaborator

Another issue I found. I think they used \LaTeX and so there's a difference between section and subsection (and probably subsubsection). See https://mcnp.lanl.gov/pdf_files/TechReport_2022_LANL_LA-UR-22-30006Rev.1_KuleszaAdamsEtAl.pdf#section5.2

@MicahGale
Copy link
Collaborator

MicahGale commented Jun 19, 2024

I played around with extending this in #417.

@MicahGale
Copy link
Collaborator

I think the developer's guide should be updated in #417, and you don't need to do that here.

@MicahGale
Copy link
Collaborator

However when I ran make linkcheck I got the error:

(        starting: line  146) broken    https://mcnp.lanl.gov/pdf_files/TechReport_2022_LANL_LA-UR-22-30006Rev.1_KuleszaAdamsEtAl.pdf#subsection.4.4.1 - 'utf-8' codec can't decode byte 0xf6 in position 10: invalid start byte

I believe this is a bug in sphinx. I was able to replicate this bug with:

In [16]: url = "https://mcnp.lanl.gov/pdf_files/TechReport_2017_LANL_LA-UR-17-29981_WernerArmstrongEtAl.pdf"

In [17]: f = urllib.request.urlopen(url)

In [18]: file = f.read()

In [19]: file.decode()
---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
Cell In[19], line 1
----> 1 file.decode()

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 10: invalid continuation byte

So don't worry about that.

@MicahGale MicahGale merged commit 0679ded into idaholab:develop Jun 22, 2024
11 of 13 checks passed
@MicahGale
Copy link
Collaborator

sphinx-doc/sphinx#11041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants