-
Notifications
You must be signed in to change notification settings - Fork 75
feat: Add ability to select specific v2 API endpoints for pipedrive verified source #669
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
base: master
Are you sure you want to change the base?
Conversation
38c7ded to
4a7807f
Compare
anuunchin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dat-a-man the imports in tests are fixed now, you should probably rebase to master for the lint ci checks to pass :)
AstrakhantsevaAA
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impressive work! a few moments look off, mentioned them in comments
| "resources": cast(List[Union[str, EndpointResource, DltResource]], resources), | ||
| } | ||
|
|
||
| api_source = rest_api_source(config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use rest_api_resources instead and skip this for-loop and double dlt.source initialisation
https://dlthub.com/docs/dlt-ecosystem/verified-sources/rest_api/basic#quick-example-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
|
||
| api_source = rest_api_source(config) | ||
| for resource in api_source.resources.values(): | ||
| yield resource.with_name(f"{prefix}{resource.name}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why you do that here?
in lines 103-104 you can do the same without extra loops:
nested_resource_def: Dict[str, Any] = {
"name": f"{prefix}{nested_name}",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
to be used in the Pipedrive source. Users can now configure this by passing a list of endpoint names to the `use_v2_endpoints` parameter. This allows for a gradual migration to v2 without enabling all endpoints at once. fix: clean whitespace and update pipedrive v2 source Revised structure for lint errors and making it simpler minor fixes
0fc37aa to
39affb3
Compare
To be used in the Pipedrive source.
Users can now configure this by passing a list of endpoint names to the
use_v2_endpointsparameter. This allows for a gradual migration to v2 without enabling all endpoints at once.