Skip to content

Fix silent dropping of brew-cask libraries#357

Open
ZENFALLACY wants to merge 2 commits intoOpenAstronomy:mainfrom
ZENFALLACY:fix/brew-cask-libraries
Open

Fix silent dropping of brew-cask libraries#357
ZENFALLACY wants to merge 2 commits intoOpenAstronomy:mainfrom
ZENFALLACY:fix/brew-cask-libraries

Conversation

@ZENFALLACY
Copy link

What's the problem?

The global_libraries dict in tox_matrix.py uses hyphenated keys (e.g. brew-cask), but the matrix-building code was looking them up with underscores (brew_cask). Because Python dicts do an exact key match, the lookup always missed, and any brew-cask entries in tox.yml were silently dropped — no error, no warning, just nothing installed.

What changed?

  • tools/tox_matrix.py: added a mapping from the YAML key format (brew-cask) to the correct dict key so the lookup finds the entry.
  • .github/workflows/tox.yml: regenerated via update_scripts_in_yml.py to pick up the fixed script (base64-encoded inline).

How to verify?

Add a brew-cask library to tox.yml, run the matrix generation, and confirm it shows up in the output rather than being silently ignored.

Notes

No logic changes beyond the key mapping. Existing behaviour for all other library types (brew, apt, etc.) is unaffected.

The global_libraries dict uses keys with hyphens (e.g. 'brew-cask'), but tox_matrix.py was iterating over underscores ('brew_cask') when building the matrix items. This caused brew-cask libraries requested in tox.yml to be silently ignored. This commit maps the YAML key to the matrix key to fix the lookup.
On Windows, git checkouts with CRLF cause the update_scripts_in_yml hook to encode \r\n characters, but pre-commit.ci on Linux encodes LF, leading to a constant base64 string mismatch and CI failures. This normalizes line endings to LF right before encoding.
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