Commit b8b40cf
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 <68415893+jason810496@users.noreply.github.com>
* Fix: only wrap call expressions in await, not literals
Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com>
* 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] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com>
Co-authored-by: LIU ZHE YOU <zhu424.dev@gmail.com>
* Initial plan
* Add compelete_missing_test_for_operation.py script with CST-based approach
Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com>
* Fix code review feedback: remove redundant code and use Tuple from typing
Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com>
* Finalize test_operation
* Fix _check_pg_partman_ext naming
---------
Co-authored-by: LIU ZHE YOU <zhu424.dev@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com>1 parent 9e76606 commit b8b40cf
5 files changed
Lines changed: 817 additions & 39 deletions
File tree
- pgmq_sqlalchemy
- scripts
- scripts_utils
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
119 | 113 | | |
120 | 114 | | |
121 | 115 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 116 | + | |
| 117 | + | |
131 | 118 | | |
132 | 119 | | |
133 | 120 | | |
| |||
338 | 325 | | |
339 | 326 | | |
340 | 327 | | |
341 | | - | |
| 328 | + | |
342 | 329 | | |
343 | 330 | | |
344 | 331 | | |
| |||
447 | 434 | | |
448 | 435 | | |
449 | 436 | | |
450 | | - | |
| 437 | + | |
451 | 438 | | |
452 | 439 | | |
453 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
0 commit comments