generative_ai.dataset_generation.step_1_generation module#
Define functionalities to extract details of docstrings.
- get_all_member_details(module_name: str, member_name: str, member_object: Any) MemberDetails#
Extract all details of a module object.
- get_all_module_contents(module_name: str) ModuleDetails#
Extract all details of a module.
- Parameters:
module_name (
str) -- name of the module to import with- Returns:
details of the module
- Return type:
ModuleDetails
- get_all_package_contents(package_name: str) list[PackageDetails]#
Extract all details of a root package.
- Parameters:
package_name (
str) -- name of the root package to import with- Returns:
all details of the root package and its sub-packages
- Return type:
list[PackageDetails]
- get_all_parameters_details(signature: Signature, docstring: NumpyDocString) list[ParameterDetails]#
Extract all details of arguments of a function or a method.
- Parameters:
signature (
inspect.Signature) -- input and output of the function or methoddocstring (
NumpyDocString) -- documentation of the function or method
- Returns:
all details of the arguments of the function or method
- Return type:
list[ParameterDetails]
- import_package(package_name: str) module#
Load a package from its name.
- Parameters:
package_name (
str) -- name of the package to import with- Returns:
the loaded package
- Return type:
- Raises:
ValueError -- if the package could not be found