Skip to content

config: keep a configured local filesystem ('fileysstem' typo) - #40

Open
H1nokam1Kagura wants to merge 1 commit into
rhiza-research:mainfrom
H1nokam1Kagura:fix/local-filesystem-config-key
Open

H1nokam1Kagura wants to merge 1 commit into
rhiza-research:mainfrom
H1nokam1Kagura:fix/local-filesystem-config-key

Conversation

@H1nokam1Kagura

@H1nokam1Kagura H1nokam1Kagura commented Oct 1, 2026 •

Copy link
Copy Markdown

What this fixes

NuthatchConfig replaced any configured local cache location with ~/.nuthatch/caches. The default-local check at src/nuthatch/config.py:334 tests for the misspelled key 'fileysstem':

if 'local' not in final_config or 'fileysstem' not in final_config['local']:

That condition is always true, so [nuthatch.local] filesystem = … (toml), NUTHATCH_LOCAL_FILESYSTEM (environment variable) and @config_parameter('filesystem', location='local') were all overwritten, and default_local was set to True. This PR changes one character, 'fileysstem' → 'filesystem', and adds a regression test.

This also affects sheerwater, which sets [tool.nuthatch.local] filesystem = "~/.cache/nuthatch".

Why the existing tests didn't catch it

tests/test_cache_args.py already registers ./.cache2 as the local filesystem for the tests module. On main that registration is silently discarded. With this fix it is honoured, so the existing suite now uses the local path its author configured.

Tests

  • New test: test_configured_local_filesystem_is_kept sets NUTHATCH_LOCAL_FILESYSTEM and checks that the configured path survives and default_local is false. It uses a module name with no registered config_parameter, so that test_cache_args.py's registration can't interfere.
    • It fails on main (~/.nuthatch/caches) and passes with the fix, both alone and in the full suite.
  • Full suite: I ran it locally on main and on this branch, on Windows and without cloud credentials. The same 40 tests fail on both. 31 hit OSError: pytest: reading from stdin while output is captured, and 9 are NuthatchReadError (no GCS credentials). They're environmental, not related to this change. CI should cover them.

Related

Found alongside a separate issue about @timeseries returning a cache that ends before the requested end_time; that's #41, opened as an issue because the fix there is a design choice.

🤖 Generated with Claude Code

The default-local check looked for the misspelled key 'fileysstem', so it
was always true and replaced any configured local filesystem (toml, env
var or config_parameter) with ~/.nuthatch/caches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@H1nokam1Kagura

Copy link
Copy Markdown
Author

Local test results (the Actions run is waiting for approval, since this PR comes from a fork)

main @ 414344a against this branch @ 35c74f6. Run on Windows with Python 3.12 and no cloud credentials, using a throwaway copy of pyproject.toml with the root cache pointed at a local directory and the mirror-public section removed. Nothing in the PR changes.

main this branch
passed 38 40
failed 18 17
  • New: test_configured_local_filesystem_is_kept passes here and fails on main.
  • test_chained: fails on main in that run only because the path exceeded Windows' 260-character limit. With a shorter cache root, all 11 test_timeseries.py tests pass on both.
  • Failing on both (17), all environmental:
    • SQL backend and metastore (no Postgres)
    • terracotta (needs GCP auth)
    • test_mirror and test_namespace (need the cloud mirror)

No test passes on main and fails on this branch.

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.

1 participant