Commit 8a63206
Add CST-based script to complete missing async methods (#36)
* Add pre-commit hooks and scripts for async method checks in PGMQueue
Distinguish sync and async operations in PGMQueue
- Introduced a pre-commit hook to check for missing async methods in PGMQueue.
- Added scripts to identify and generate missing async methods.
- Created utility functions for AST manipulation and method transformation.
- Established configuration for project paths and console output.
* Refactor code transformation scripts from ast to libcst (#35)
* Initial plan
* Refactor AST-based code to use libcst for better code transformation
Co-authored-by: jason810496 <[email protected]>
* Fix: only wrap call expressions in await, not literals
Co-authored-by: jason810496 <[email protected]>
* Ask whether to apply change
* Apply missing async methods
* Correct files for check-sync-async-method-for-queue pre-commit
* Add check for operation as well
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jason810496 <[email protected]>
Co-authored-by: LIU ZHE YOU <[email protected]>
* Add script to generate missing async methods for PGMQOperation (#37)
* Initial plan
* Add compelete_missing_async_methods_for_operation.py script and operation_ast helper
Co-authored-by: jason810496 <[email protected]>
* Fix path resolution bug in operation_ast.py
Co-authored-by: jason810496 <[email protected]>
* Address code review feedback: improve docstring handling and remove unnecessary method
Co-authored-by: jason810496 <[email protected]>
* Improve docstring handling robustness with better length checks
Co-authored-by: jason810496 <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jason810496 <[email protected]>
* Fix queue await error
* Add script to generate missing async tests for PGMQOperation using CST (#39)
* Add pre-commit hooks and scripts for async method checks in PGMQueue
Distinguish sync and async operations in PGMQueue
- Introduced a pre-commit hook to check for missing async methods in PGMQueue.
- Added scripts to identify and generate missing async methods.
- Created utility functions for AST manipulation and method transformation.
- Established configuration for project paths and console output.
* Refactor code transformation scripts from ast to libcst (#35)
* Initial plan
* Refactor AST-based code to use libcst for better code transformation
Co-authored-by: jason810496 <[email protected]>
* Fix: only wrap call expressions in await, not literals
Co-authored-by: jason810496 <[email protected]>
* Ask whether to apply change
* Apply missing async methods
* Correct files for check-sync-async-method-for-queue pre-commit
* Add check for operation as well
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jason810496 <[email protected]>
Co-authored-by: LIU ZHE YOU <[email protected]>
* Initial plan
* Add compelete_missing_test_for_operation.py script with CST-based approach
Co-authored-by: jason810496 <[email protected]>
* Fix code review feedback: remove redundant code and use Tuple from typing
Co-authored-by: jason810496 <[email protected]>
* Finalize test_operation
* Fix _check_pg_partman_ext naming
---------
Co-authored-by: LIU ZHE YOU <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: jason810496 <[email protected]>
* Add script to generate missing async tests using CST transformations (#38)
* Add pre-commit hooks and scripts for async method checks in PGMQueue
Distinguish sync and async operations in PGMQueue
- Introduced a pre-commit hook to check for missing async methods in PGMQueue.
- Added scripts to identify and generate missing async methods.
- Created utility functions for AST manipulation and method transformation.
- Established configuration for project paths and console output.
* Refactor code transformation scripts from ast to libcst (#35)
* Initial plan
* Refactor AST-based code to use libcst for better code transformation
Co-authored-by: jason810496 <[email protected]>
* Fix: only wrap call expressions in await, not literals
Co-authored-by: jason810496 <[email protected]>
* Ask whether to apply change
* Apply missing async methods
* Correct files for check-sync-async-method-for-queue pre-commit
* Add check for operation as well
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jason810496 <[email protected]>
Co-authored-by: LIU ZHE YOU <[email protected]>
* Initial plan
* Add complete_missing_test_for_queue.py script with CST-based approach
Co-authored-by: jason810496 <[email protected]>
* Apply ruff formatting to test generation scripts
Co-authored-by: jason810496 <[email protected]>
* Address code review feedback: fix path resolution, type hints, and documentation
Co-authored-by: jason810496 <[email protected]>
* Fix missing async replacment for compelete test queue
* Fix imports for async fixtures
---------
Co-authored-by: LIU ZHE YOU <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: jason810496 <[email protected]>
* Unifing script name for queue
* Add missing async test methods for queue, fix check_pg_partman_ext
---------
Co-authored-by: Copilot <[email protected]>1 parent f373b79 commit 8a63206
26 files changed
Lines changed: 4649 additions & 77 deletions
File tree
- pgmq_sqlalchemy
- scripts
- ci/pre_commit
- scripts_utils
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments