Skip to content
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

Removed **kwargs from methods #262

Merged
merged 5 commits into from
Aug 7, 2023
Merged

Removed **kwargs from methods #262

merged 5 commits into from
Aug 7, 2023

Conversation

nfx
Copy link
Contributor

@nfx nfx commented Aug 3, 2023

This PR removes XxxRequest classes that are referenced only as requests, effectively removing the undocumented request=(XxxRequest(foo=1)) API. This will enforce validation on the field names and make error messages more clear.

@nfx nfx requested a review from mgyucht August 3, 2023 16:59
@nfx nfx added enhancement New feature or request codegen issues related to generated code do-not-merge labels Aug 3, 2023
@mgyucht
Copy link
Contributor

mgyucht commented Aug 4, 2023

Can we separate these two changes into two separate PRs?

nfx added 2 commits August 4, 2023 18:19
This PR removes `XxxRequest` classes that are referenced only as requests, effectively removing the undocumented `request=(XxxRequest(foo=1))` API. This will enforce validation on the field names for specific requests.

This PR also adds validation of custom types on the request level, so that it's clear also at the runtime level when an invalid request has been supplied.
@nfx nfx removed the do-not-merge label Aug 4, 2023
@nfx nfx changed the title [WIP] Remove **kwargs from methods and add argument validation Removed **kwargs from methods Aug 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2023

Codecov Report

Patch coverage: 14.52% and project coverage change: -1.07% ⚠️

Comparison is base (38b289c) 53.72% compared to head (c742d29) 52.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #262      +/-   ##
==========================================
- Coverage   53.72%   52.66%   -1.07%     
==========================================
  Files          33       33              
  Lines       19349    18197    -1152     
==========================================
- Hits        10396     9583     -813     
+ Misses       8953     8614     -339     
Files Changed Coverage Δ
databricks/sdk/service/pipelines.py 49.87% <7.04%> (-2.62%) ⬇️
databricks/sdk/service/jobs.py 55.03% <8.73%> (-1.17%) ⬇️
databricks/sdk/service/compute.py 52.29% <9.74%> (-1.57%) ⬇️
databricks/sdk/service/iam.py 42.83% <10.04%> (-5.37%) ⬇️
databricks/sdk/service/ml.py 48.62% <13.13%> (-1.21%) ⬇️
databricks/sdk/service/sql.py 54.82% <13.28%> (-1.20%) ⬇️
databricks/sdk/service/catalog.py 51.53% <15.14%> (-1.54%) ⬇️
databricks/sdk/service/provisioning.py 48.80% <17.58%> (-1.75%) ⬇️
databricks/sdk/service/workspace.py 51.53% <19.04%> (-0.07%) ⬇️
databricks/sdk/service/sharing.py 55.19% <20.45%> (+0.23%) ⬆️
... and 5 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nfx nfx enabled auto-merge (squash) August 4, 2023 17:38
@nfx
Copy link
Contributor Author

nfx commented Aug 4, 2023

integration tests pass

image

Copy link
Contributor

@mgyucht mgyucht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nfx nfx merged commit 9ad23be into main Aug 7, 2023
8 checks passed
@nfx nfx deleted the remove-request-class branch August 7, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen issues related to generated code enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants