Skip to content

Conversation

@oesteban
Copy link
Member

Summary

  • expand the CLI documentation with cache-aware examples for config, update, and wipe
  • add DataLad usage callouts referencing the use_datalad flag in the DataLad guide
  • add Sphinx autodoc stubs for the client, API, and configuration modules and allow them to be tracked

Testing

  • not run (documentation only)

https://chatgpt.com/codex/tasks/task_e_68f70ac015ac833089f8dc7368a30f27

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +17 to +36
Managing client configuration
-----------------------------
The ``templateflow`` CLI transparently manipulates the same cache configuration used
by :class:`templateflow.client.TemplateFlowClient`. Running ``templateflow config``
exposes the options stored in the underlying :class:`templateflow.conf.cache.CacheConfig`
instance::

$ templateflow config show
TEMPLATEFLOW_HOME=/home/user/.cache/templateflow
TEMPLATEFLOW_USE_DATALAD=0
TEMPLATEFLOW_AUTOUPDATE=1
TEMPLATEFLOW_GET_TIMEOUT=10

Changing a value updates the cached client configuration immediately. For example,
enabling the DataLad backend is equivalent to instantiating a client with
``TemplateFlowClient(use_datalad=True)`` because the command mutates the
``CacheConfig`` object used by the global client::

$ templateflow config set TEMPLATEFLOW_USE_DATALAD 1
Updated TEMPLATEFLOW_USE_DATALAD → 1 (DataLad downloads will be used on next access)

Choose a reason for hiding this comment

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

P1 Badge Remove CLI docs for nonexistent config subcommands

The CLI documentation introduces templateflow config show and templateflow config set … as ways to inspect and mutate cache settings, but the actual config command in templateflow.cli has no subcommands or options—it simply prints the configuration and exits. Running either of those examples currently raises “Got unexpected extra argument” and there is no mechanism to persist configuration changes. Either add the described subcommands or update the docs (also see the cross‑reference in docs/datalad.rst lines 8‑12) so users are not instructed to run commands that do not exist.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.62%. Comparing base (7718e6a) to head (b6a63b3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #153   +/-   ##
=======================================
  Coverage   77.62%   77.62%           
=======================================
  Files           9        9           
  Lines         447      447           
  Branches       82       82           
=======================================
  Hits          347      347           
  Misses         63       63           
  Partials       37       37           
Flag Coverage Δ
api,datalad 51.90% <ø> (ø)
api,dls3 27.29% <ø> (ø)
api,s3 57.27% <ø> (ø)
config 74.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants