Closed rfishermonteith closed 2 weeks ago
Thanks a lot for both issues. I think I'll have time for it tomorow evening. I have a good idea of what's going on already (in good parts thanks to your time cost efficient issue!)
Using recursed_filetype fails to parse recursive paths (full error below).
This seems fixable by adding
"recursed_filetype": str, "pattern": str
to https://github.com/thiswillbeyourgithub/wdoc/blob/main/wdoc/utils/misc.py#L149
You're right to think that but it's actually wrong in that case. The var filetype_args_types
contains the list of arguments that are accepted as argument to a loader function. But extra_args_types
are args that are accepted by wdoc, like path for example. The recursed filetype and pattern args are actually destined to the parse_recursive_paths
function at https://github.com/thiswillbeyourgithub/wdoc/blob/a0acfd7d57344499c4c72870c08e47897cf13461/wdoc/utils/batch_file_loader.py#L535
Hence the issue seems to arise from the recursice parser not being triggered. Resulting in those args being sent to a loader function.
I'll have a fix soon as it's an issue I've encountered in the passed.
The reason I created this DocDict thingie is to validate arguments for the loader func and help distinguish them from wdoc args and from recursive args. If you happen to know of a more orthodox way to manage all those things, then I would gladly accept an explanation or even a PR because I think that's one of the weak aspects of wdoc currently. Similarly, I plan to completely split how the gigantic methods of the initial wdoc class do things. Notably, this will help with making a cleaner API in Python, something like what scikitlearn does, for example, which is quite intuitive.
Fixed. This was due to extra_args_types
missing pattern
and recursed_filetype
. Thanks a lot. I pushed both fix to the latest release in 2.4.3
Don't hesitate to reach out if you found more bugs, it really helps a lot!
Using recursed_filetype fails to parse recursive paths (full error below).
This seems fixable by adding
to https://github.com/thiswillbeyourgithub/wdoc/blob/main/wdoc/utils/misc.py#L149
However, this does create the following warning (so I may have missed something):
Full command:
Full error below