-
Notifications
You must be signed in to change notification settings - Fork 380
Preserve customized Python test fixtures #11422
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
acf2f83
add necessary generated code
msyyc b9f7fc3
update regenerate
msyyc ca080d6
regenerate
msyyc 8e094ee
update
msyyc 5474a60
remove outdated Python regeneration guidance
msyyc f795b72
fix Python regeneration CI checks
msyyc 89b0d0e
keep pretties version same as root folder
msyyc 74f9210
Update .gitignore
msyyc d99d08f
fix ignored Python fixture artifacts
msyyc b81e7e1
new test file
msyyc 031adcd
new command to check unstaged code
msyyc 7cab812
Merge branch 'main' into python-test-update
msyyc 8ca55a7
fix Python diff check on Windows
msyyc e2a0c9a
Use targeted .gitignore rules for generated test fixtures
msyyc 6ddfb0d
update
msyyc 1a46216
Merge branch 'main' into python-test-update
msyyc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| changeKind: internal | ||
| packages: | ||
| - "@typespec/http-client-python" | ||
| --- | ||
|
|
||
| Track only hand-authored test fixture files instead of whole generated packages, and clean generated test code with `git clean` during regeneration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
.../tests/generated/azure/authentication-api-key/authentication/apikey/_operations/_patch.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # coding=utf-8 | ||
|
|
||
| """Customize generated code here. | ||
|
|
||
| Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize | ||
| """ | ||
|
|
||
| from typing import List | ||
|
|
||
| from ._operations import _ApiKeyClientOperationsMixin as Generated | ||
|
|
||
|
|
||
| class _ApiKeyClientOperationsMixin(Generated): | ||
|
|
||
| def patch_added_operation(self) -> bool: | ||
| """This is a placeholder for the operation that was added in the patch. | ||
|
|
||
| This method is a no-op and does not perform any action. | ||
|
|
||
| :return: Always returns True. | ||
| :rtype: bool | ||
| """ | ||
| return True | ||
|
|
||
|
|
||
| __all__: List[str] = [ | ||
| "_ApiKeyClientOperationsMixin" | ||
| ] # Add all objects you want publicly available to users at this package level | ||
|
|
||
|
|
||
| def patch_sdk(): | ||
| """Do not remove from this file. | ||
|
|
||
| `patch_sdk` is a last resort escape hatch that allows you to do customizations | ||
| you can't accomplish using the techniques described in | ||
| https://aka.ms/azsdk/python/dpcodegen/python/customize | ||
| """ |
37 changes: 37 additions & 0 deletions
37
...ts/generated/azure/authentication-api-key/authentication/apikey/aio/_operations/_patch.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # coding=utf-8 | ||
|
|
||
| """Customize generated code here. | ||
|
|
||
| Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize | ||
| """ | ||
|
|
||
| from typing import List | ||
|
|
||
| from ._operations import _ApiKeyClientOperationsMixin as Generated | ||
|
|
||
|
|
||
| class _ApiKeyClientOperationsMixin(Generated): | ||
|
|
||
| def patch_added_operation(self) -> bool: | ||
| """This is a placeholder for the operation that was added in the patch. | ||
|
|
||
| This method is a no-op and does not perform any action. | ||
|
|
||
| :return: Always returns True. | ||
| :rtype: bool | ||
| """ | ||
| return True | ||
|
|
||
|
|
||
| __all__: List[str] = [ | ||
| "_ApiKeyClientOperationsMixin" | ||
| ] # Add all objects you want publicly available to users at this package level | ||
|
|
||
|
|
||
| def patch_sdk(): | ||
| """Do not remove from this file. | ||
|
|
||
| `patch_sdk` is a last resort escape hatch that allows you to do customizations | ||
| you can't accomplish using the techniques described in | ||
| https://aka.ms/azsdk/python/dpcodegen/python/customize | ||
| """ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.