Lightning-AI / utilities

Common Python utilities and GitHub Actions in Lightning Ecosystem
Apache License 2.0
49 stars 14 forks source link

Fix extras check in RequirementCache #283

Closed awaelchli closed 1 month ago

awaelchli commented 1 month ago

In #281 I made the implementation for RequirementCache to not depend on pkg_resources, but this accidentally broke checks against extras. For example:

RequirementCache("jsonargparse[signatures]") 

would currently return true regardless of whether the signatures dependencies are installed or not. This is because pkg_resources was previously handling this directly. This PR brings this functionality back. Hopefully there are no other breakages.


📚 Documentation preview 📚: https://lit-utilities--283.org.readthedocs.build/en/283/