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

Fix CI build docs problem #58

Closed

Conversation

EdwardSafford-NOAA
Copy link
Contributor

Nth try to fix this CI build error.

@EdwardSafford-NOAA
Copy link
Contributor Author

Best I can remember here's what I've run into today:

  1. eva's automated documentation test fails because the cartopy install needed solver=classic in some form. The script in question is not in eva it's eva-docs/.github/workflows/docs_dry_run.yaml.
  2. I modify eva-docs docs_dry_run.yaml and then find that eva-docs fails the same automated test for the same reason, but it runs eva-docs/.github/workflows/docs_build_test.yaml which is very similar to docs_dry_run.yaml.
  3. I mess around with modifying docs_build_test.yaml. Eventually it stops complaining about cartopy and solver=classic and starts throwing errors from sphinx (unable to find module myst_parser.warnings_).
  4. I return docs_build_test.yaml to it's original form. There are no complaints about cartopy or solver any more, but the sphinx error remains.
  5. I have no idea what's going on. I'm pretty sure what I've spent the day on has had no impact on the problem and that the problem may or may not be real.

I think the merge @CoryMartin-NOAA did with eva-docs should be rolled back. I can't prove it fixes the problem and I can't prove there is a problem with cartopy and solver at all. I can now say that the build test fails for both eva and eva-docs because of some mysterious and random sphinx issues. How long that condition lasts is anyone's guess. The full error report is thus:

Run nbsite build --what=html --output=builtdocs --org JCSDA-internal --project-name eva-docs
Running Sphinx v5.3.0

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.12/site-packages/sphinx/config.py", line 350, in eval_config_file
    exec(code, namespace)
  File "/home/runner/work/eva-docs/eva-docs/doc/conf.py", line 4, in <module>
    from nbsite.shared_conf import *
  File "/home/runner/.local/lib/python3.12/site-packages/nbsite/shared_conf.py", line 9, in <module>
    from nbsite import nbbuild
  File "/home/runner/.local/lib/python3.12/site-packages/nbsite/nbbuild.py", line 49, in <module>
    from myst_nb.sphinx_ import Parser
  File "/home/runner/.local/lib/python3.12/site-packages/myst_nb/sphinx_.py", line 28, in <module>
    from myst_nb.core.config import NbParserConfig
  File "/home/runner/.local/lib/python3.12/site-packages/myst_nb/core/config.py", line 16, in <module>
    from myst_nb.warnings_ import MystNBWarnings
  File "/home/runner/.local/lib/python3.12/site-packages/myst_nb/warnings_.py", line 8, in <module>
    from myst_parser.warnings_ import MystWarnings
ModuleNotFoundError: No module named 'myst_parser.warnings_'

Traceback (most recent call last):
  File "/home/runner/.local/bin/nbsite", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/runner/.local/lib/python3.12/site-packages/nbsite/__main__.py", line 63, in main
    return args.func(args) if hasattr(args,'func') else parser.error("must supply command to run")
           ^^^^^^^^^^^^^^^
  File "/home/runner/.local/lib/python3.12/site-packages/nbsite/__main__.py", line 18, in <lambda>
    parser.set_defaults(func=lambda args: fn( **{k: getattr(args,k) for k in vars(args) if k!='func'} ))
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.local/lib/python3.12/site-packages/nbsite/cmd.py", line 92, in build
    subprocess.check_call(["sphinx-build","-b",what,paths['doc'],output], env=merged_env)
  File "/usr/share/miniconda/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sphinx-build', '-b', 'html', '/home/runner/work/eva-docs/eva-docs/doc', 'builtdocs']' returned non-zero exit status 2.
Error: Process completed with exit code 1.

@EdwardSafford-NOAA
Copy link
Contributor Author

@kevindougherty-noaa do you have any suggestions for fixing this sphinx failure? I'm kind of at a loss on this.

@kevindougherty-noaa
Copy link
Contributor

@EdwardSafford-NOAA I don't see anything I recognize right away. Something to do with that import in the conf.py file @asewnath Do you recognize what might be causing for the CI tests to be failing?

@asewnath
Copy link
Collaborator

asewnath commented Jul 30, 2024

I'll try taking a look, but I've been having a difficult time with these doc test actions on the eva side: JCSDA-internal/eva#188. docs_dry_run.yaml is the action that the eva repo calls

@EdwardSafford-NOAA
Copy link
Contributor Author

Things seem to be working now. I'll close this PR since it hasn't solved anything and now won't be needed.

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