def make_reports_docs(path): filename = "reports.rst" open(path + filename, "w").close() for report_type_class in [DataReport, EncodingReport, MLReport, TrainMLModelReport, MultiDatasetReport]: with open(path + filename, "a") as file: doc_format = DocumentationFormat(cls=report_type_class, cls_name=f"**{report_type_class.get_title()}**", level_heading=DocumentationFormat.LEVELS[1]) write_class_docs(doc_format, file) subdir = DefaultParamsLoader.convert_to_snake_case(report_type_class.__name__) + "s" classes = ReflectionHandler.all_nonabstract_subclasses(report_type_class, "", f"reports/{subdir}/") make_docs(path, classes, filename, "", "a")
def make_preprocessing_docs(path: Path): classes = ReflectionHandler.all_nonabstract_subclasses( Preprocessor, "", "preprocessing/") make_docs(path, classes, "preprocessings.rst", "")
def make_ml_methods_docs(path: Path): classes = ReflectionHandler.all_nonabstract_subclasses( MLMethod, "", "ml_methods/") make_docs(path, classes, "ml_methods.rst", "")
def make_encodings_docs(path: Path): enc_classes = ReflectionHandler.all_direct_subclasses( DatasetEncoder, "Encoder", "encodings/") make_docs(path, enc_classes, "encodings.rst", "Encoder")
def make_dataset_docs(path: Path): import_classes = ReflectionHandler.all_nonabstract_subclasses( DataImport, "Import", "dataset_import/") make_docs(path, import_classes, "datasets.rst", "Import")