Exemplo n.º 1
0
    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")
Exemplo n.º 2
0
 def make_preprocessing_docs(path: Path):
     classes = ReflectionHandler.all_nonabstract_subclasses(
         Preprocessor, "", "preprocessing/")
     make_docs(path, classes, "preprocessings.rst", "")
Exemplo n.º 3
0
 def make_ml_methods_docs(path: Path):
     classes = ReflectionHandler.all_nonabstract_subclasses(
         MLMethod, "", "ml_methods/")
     make_docs(path, classes, "ml_methods.rst", "")
Exemplo n.º 4
0
 def make_encodings_docs(path: Path):
     enc_classes = ReflectionHandler.all_direct_subclasses(
         DatasetEncoder, "Encoder", "encodings/")
     make_docs(path, enc_classes, "encodings.rst", "Encoder")
Exemplo n.º 5
0
 def make_dataset_docs(path: Path):
     import_classes = ReflectionHandler.all_nonabstract_subclasses(
         DataImport, "Import", "dataset_import/")
     make_docs(path, import_classes, "datasets.rst", "Import")