Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor import paths and support python packages as sources #22

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fpacifici
Copy link
Collaborator

We decided to package jsonnet libraries as static resources in
jsonnet packages.

The recommended way in python >3.10 to load statics resources is via
importlib.resources.files(). This PR introduce an abstarction around
it to wire it up in the jsonnet module.

The issue with importlib.resources is that it does not necessarily
resturns Path objects. It returns Traversable objects, so we need
to bridge the gap. Thus the abstraction.

Also refactored the callback method into their own module that made
thinks easier and more testable.
Also added tests.

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