glamorous-nail-59544
12/22/2022, 7:21 PM[python-infer].assets = true
and have an assets dir located in src/python/service/assets
I am trying to access these assets from python using the path service/assets/file_name.extension
but getting not such file or directory.
So I am wondering,
⢠am I accessing the files correctly using module instead of root?
⢠do I need to create BUILD file inside the assets dir?
⢠if yes, can I define sources using asterisk symbol **/*.extension
to void adding new source for every file.bitter-ability-32190
12/22/2022, 7:22 PMglamorous-nail-59544
12/22/2022, 7:24 PMbitter-ability-32190
12/22/2022, 7:26 PMfile
targets are assumed to loaded relative to the build root (so src/python/service/...
) resource
targets are assumed to be loaded relative to the file loading them (e.g. you might be doing importlib.resources.path(__name_, "assets/...")
)curved-television-6568
12/22/2022, 7:29 PMglamorous-nail-59544
12/22/2022, 7:32 PMfiles(
name="assets",
sources=["**/*"],
)
This feels like magic!bitter-ability-32190
12/22/2022, 7:32 PM