-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci][doc/03] add a command to query and validate apis for ray packages (
#45531) As title, a command to: - Query apis for a given ray package - Print out the information for these APIs Test: - CI --------- Signed-off-by: can <[email protected]>
- Loading branch information
1 parent
b54ee68
commit bc76b19
Showing
4 changed files
with
31 additions
and
74 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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,23 @@ | ||
import click | ||
|
||
from ci.ray_ci.doc.module import Module | ||
|
||
|
||
@click.command() | ||
@click.argument("module", required=True, type=str) | ||
def main(module: str) -> None: | ||
""" | ||
This script checks for annotated classes and functions in a module, and finds | ||
discrepancies between the annotations and the documentation. | ||
""" | ||
module = Module(module) | ||
for api in module.get_apis(): | ||
print( | ||
f"API: {api.name}, " | ||
f"Annotation Type: {api.annotation_type}, " | ||
f"Code Type: {api.code_type}" | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |