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

US-157: Edit uwtools documentation #399

Merged
merged 10 commits into from
Jan 26, 2024

Conversation

gspetro-NOAA
Copy link
Contributor

@gspetro-NOAA gspetro-NOAA commented Jan 25, 2024

Synopsis

Minor edits for grammar, formatting, etc.

Type

  • Bug fix (corrects a known issue)
  • Code maintenance (refactoring, etc. without behavior change)
  • Documentation
  • Enhancement (adds a new functionality)
  • Tooling (CI, code-quality, packaging, revision-control, etc.)

Impact

  • This is a non-breaking change (existing functionality continues to work as expected)
  • This is a breaking change (changes existing functionality)

Checklist

  • I have added myself and any co-authors to the PR's Assignees list.
  • I have reviewed the documentation and have made any updates necessitated by this change.

Copy link
Contributor

@christinaholtNOAA christinaholtNOAA left a comment

Choose a reason for hiding this comment

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

@gspetro-NOAA Thank you for your thorough review. It makes our brand and content so much stronger to have your input. :)

I left a couple of suggestions below. Please do with them whatever make sense to you.

docs/index.rst Outdated Show resolved Hide resolved
docs/sections/user_guide/cli/mode_config.rst Outdated Show resolved Hide resolved
docs/sections/user_guide/cli/mode_config.rst Show resolved Hide resolved
Copy link
Contributor

@maddenp-noaa maddenp-noaa left a comment

Choose a reason for hiding this comment

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

Very helpful, thank you!

@maddenp-noaa
Copy link
Contributor

@gspetro-NOAA If you're at a point where you're happy with this and need any help with the merge, I'm happy to help. But feel free to proceed whenever you're ready.

gspetro-NOAA and others added 4 commits January 25, 2024 16:38
Co-authored-by: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com>
Co-authored-by: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com>
Co-authored-by: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com>
@gspetro-NOAA
Copy link
Contributor Author

@maddenp-noaa , I ran make docs, and it comes up with this error:

(           index: line   70)
Warning, treated as error:
/Users/gillianpetro/uwtools/docs/index.rst:70:broken link: https://www.noaa.gov/ (403 Client Error: Forbidden for url: https://www.noaa.gov/)
make[1]: *** [Makefile:20: linkcheck] Error 2
make[1]: Leaving directory '/Users/gillianpetro/uwtools/docs'
make: *** [Makefile:16: docs] Error 2

However, the "NOAA" link in the local html rendering of my docs and the "NOAA" link in the RTD docs from my fork both work, and the link works separately in my browser. Any idea what might be causing this error?

@maddenp-noaa
Copy link
Contributor

Interesting. curl also sees an error:

% curl https://www.noaa.gov/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Request blocked.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: X3HkWSR4UzQxKI20Ac0GENDz4gRJKlX37HP4XnVe9KxlKdcBx1xJ9g==
</PRE>
<ADDRESS>
</ADDRESS>

I'll try to find out why.

@maddenp-noaa
Copy link
Contributor

I wonder if it could be related to this: https://stackoverflow.com/questions/32641072/current-observation-feed-from-weather-gov-forbidden-403.

If I curl -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" https://www.noaa.gov/, that works.

Let me see if there seems to be a way to have Sphinx linkcheck use a customer user-agent string.

@maddenp-noaa
Copy link
Contributor

Please try adding

user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"

to docs/conf.py in the block of variables before extlinks. Seems to work for me.

@gspetro-NOAA gspetro-NOAA merged commit 11e2f5c into ufs-community:develop Jan 26, 2024
2 checks passed
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.

3 participants