Skip to content

Prefetch only when needed and use persistent cache across runs - #1157

Open
TimMonko wants to merge 5 commits into
napari:mainfrom
TimMonko:fix/prefetch
Open

TimMonko wants to merge 5 commits into
napari:mainfrom
TimMonko:fix/prefetch

Conversation

@TimMonko

@TimMonko TimMonko commented Oct 3, 2026

Copy link
Copy Markdown
Member

References and relevant issues

Follow-up to #1148, which moved the prefetch before even prep-docs, causing offline builds like slimfast to take longer locally and to fail on CI if the fetch fails.

Description

This moves the prefecthing only for the steps that need it (gallery and executable notebooks), parsed with the script and implemented in the MAKEFILE. Then, it makes sure the cache is pointed to the OS-level cache which should persist across CI runs and is less complicated for our useal pooch fetches (nilearn is massaged where needed with the makefile)

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 3, 2026
@TimMonko
TimMonko requested a review from Czaki October 3, 2026 21:17

@Czaki Czaki left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I need to rethink about this problem.

How does #1148 impact execution time? Moving prefetch from end to beginning does not change the type of build where it was executed. It only fail faster.

Comment thread Makefile
Comment on lines +18 to +21
export NILEARN_DATA ?= $(LOCALAPPDATA)/napari-docs-nilearn
else
export NILEARN_DATA ?= $(if $(XDG_CACHE_HOME),$(XDG_CACHE_HOME),$(HOME)/.cache)/napari-docs-nilearn
endif

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

conf.py might be better for this.



if __name__ == '__main__':
main(*sys.argv[1:])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

argparse?

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

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants