refactor: move from deprecated pkg_resources#1202
refactor: move from deprecated pkg_resources#1202JGSweets wants to merge 15 commits intocapitalone:mainfrom
Conversation
c17b068 to
e11fe17
Compare
|
@ryanSoley Can we get a review on this? It will allow DP to continue working with new setuptools. Otherwise, this library will not work in system that utilize the most up to date setuptools |
|
@mhmotamedi any chances we could get a review on this for fixes? |
| from .base_model import BaseModel | ||
|
|
||
| default_labeler_dir = pkg_resources.resource_filename("resources", "labelers") | ||
| default_labeler_dir = utils.find_resources_dir() / "labelers" |
There was a problem hiding this comment.
Nice! Something I noticed is that after the call we’re adding a subdir for each call. Can we maybe just take that as input and return the full path as well?
There was a problem hiding this comment.
That's a great idea! I'll resolve that. Do you want this pr'ed into dev instead of main?
There was a problem hiding this comment.
@shania-m done! LMK if you need other updates, thanks!
|
anything that needs to be done to get the other checks to pass or merge? Thanks! |
| return check_module | ||
|
|
||
|
|
||
| def find_resources_dir(resource_path: str | Path | None = None) -> Traversable: |
There was a problem hiding this comment.
Is there a unit test for this function?
There was a problem hiding this comment.
it is inherently checked by many the other unit / integration tests.
Do you want one specifically for this?
Are there inputs / outputs you specifically want to test?
this pr:
include_package_datainstead ofdata_files<3.0.0