Skip to content

Conversation

@jayaddison
Copy link
Contributor

@jayaddison jayaddison commented Jul 10, 2024

Feature or Bugfix

  • Refactoring

Purpose

Detail

  • Instead of moving each searchindex.js file built by the utils/generate_js_fixtures.py script, copy it into the fixtures dir. This means that each built project remains as a complete Sphinx html project build output (and can, for example, be hosted in a local webserver to test behaviour).
  • Check for presence of a conf.py file when iterating through the local directories that are considered possible sources of JS test fixtures. When switching branches using git, some previous-branch directories may not be removed, even when the files within are cleared -- and without this change, the utils/generate_js_fixtures.py script and test_check_js_search_indexes test case would try to build from those empty dirs (and fail).

Relates

cc @wlach

Edit: clarify that the util script builds multiple projects

  * Check for presence of ``conf.py`` in potential fixture root directories.
  * Copy ``searchindex.js`` instead of moving it, so that the ``_build`` dir remains a valid, complete project build.
@jayaddison jayaddison requested a review from picnixz July 10, 2024 15:20
jayaddison and others added 2 commits July 10, 2024 17:33
…ead of reading and writing entire ``searchindex.js`` files during fixture generation.

Co-authored-by: Adam Turner <[email protected]>
@AA-Turner AA-Turner merged commit 84c11b2 into sphinx-doc:master Jul 10, 2024
@AA-Turner
Copy link
Member

Thanks!

@jayaddison
Copy link
Contributor Author

Thank you!

@jayaddison jayaddison deleted the pr-12102-followup/developer-experience-improvements branch July 10, 2024 21:10
@AA-Turner AA-Turner added this to the 7.4.0 milestone Jul 13, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants