Conversation
282e606 to
3bb355b
Compare
|
Related: #2968 2968 |
This allows to load the pages from an imported python package which is recursively scanned. This is useful if one compiles an application using Cython where the modules are then not .py files anymore, but compiled .so files.
Apparently not all tests that add modules to the PAGE_REGISTRY also add them to sys.modules.
3bb355b to
e5f2ddb
Compare
|
So any feedback on this? |
T4rk1n
left a comment
There was a problem hiding this comment.
Sorry this PR flew under my radar, this is interesting.
I think we could use the walk for the regular pages and not add another pages_package in the dash init if that works for both regular files.
There could be improvement too by allowing the pages_folder to be a list of directory to look in.
|
@AnnMarieW Can you take a look at this? |
|
Would the solution in this PR work? #2392 It's been available for a while but didn't get documented.
|
I don't think so. It still seems to search for
I think this should work as long as there is an But I'm not currently actively working on the project were we needed this, so I don't have a lot of capacity to work on this. |
This allows to load the pages from an imported python package which is recursively scanned. This is useful if one compiles an application using Cython where the modules are then not .py files anymore, but compiled .so files.
In our application we compile everything with Cython in the end, to get some performance gains. Since the current implementation of the pages feature only searches for
.pyfiles in thepagesfolder I worked around it in our application using this approach.Would this be a feature of general interest? IMO it is nice, since the implementation is way simpler and it uses built in tools to load the modules.
Contributor Checklist
optionals
CHANGELOG.md