Harden Sphinx autodoc imports to include full API #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GitHub Actions autodoc skipped large parts of the API due to import-time failures (missing deps, side-effectful modules like
main/playground), leading to incomplete docs.village.mainto import in headless/docs environments by not raising onos.nicepermission errors.playgroundlatency benchmark so it only runs under__main__, keeping autodoc/import harmless.picamera2inautodoc_mock_importsto avoid redundant mocks.Example:
Original prompt
I am running sphinxs autodocs to generate the documentation for the API of this repo. I can run it locally with no problem, but the github actions that I am using is not documenting the whole thing. These are some of the errors I am seeing. I want you to identify the problem:
loading translations [en]... done
making output directory... done
[autosummary] generating autosummary for: api_index.rst, faq/faq.md, faq_index.rst, how_to_build/assembly_instructions.md, how_to_build/list_of_parts.md, how_to_build/software_installation.md, how_to_build_index.rst, index.rst, initial_configuration/backup.md, initial_configuration/hardware.md, ..., user_guide/detection.md, user_guide/maintenance.md, user_guide/plots.md, user_guide/settings.md, user_guide/started.md, user_guide/state_machine.md, user_guide/subjects.md, user_guide/test.md, user_guide/use.md, user_guide_index.rst
WARNING: [autosummary] failed to import village.main.
Possible hints:
WARNING: [autosummary] failed to import village.manager.
Possible hints:
[autosummary] generating autosummary for: /home/runner/work/village/village/docs/source/api_generated/village.calibration.rst, /home/runner/work/village/village/docs/source/api_generated/village.classes.rst, /home/runner/work/village/village/docs/source/api_generated/village.custom_classes.rst, /home/runner/work/village/village/docs/source/api_generated/village.devices.rst, /home/runner/work/village/village/docs/source/api_generated/village.gui.rst, /home/runner/work/village/village/docs/source/api_generated/village.plots.rst, /home/runner/work/village/village/docs/source/api_generated/village.screen.rst, /home/runner/work/village/village/docs/source/api_generated/village.scripts.rst
WARNING: [autosummary] failed to import village.calibration.sound_calibration.
Possible hints:
WARNING: [autosummary] failed to import village.calibration.water_calibration.
Possible hints:
WARNING: [autosummary] failed to import village.classes.collection.
Possible hints:
WARNING: [autosummary] failed to import village.classes.subject.
Possible hints:
WARNING: [autosummary] failed to import village.custom_classes.after_session_base.
Possible hints:
WARNING: [autosummary] failed to import village.custom_classes.change_cycle_base.
Possible hints:
WARNING: [autosummary] failed to import village.custom_classes.online_plot_base.
Possible hints:
WARNING: [autosummary] failed to import village.custom_classes.session_plot_base.
Possible hints:
WARNING: [autosummary] failed to import village.custom_classes.subject_plot_base.
Possible hints:
WARNING: [autosummary] failed to import village.custom_classes.task.
Possible hints:
WARNING: [autosummary] failed to import village.custom_classes.training_protocol_base.
Possible hints:
WARNING: [autosummary] failed to import village.devices.bpod.
Possible hints:
WARNING: [autosummary] failed to import village.devices.camera.
Possible hints:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.