/
make.jl
executable file
·130 lines (118 loc) · 4.45 KB
/
make.jl
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
if Base.HOME_PROJECT[] !== nothing
Base.HOME_PROJECT[] = abspath(Base.HOME_PROJECT[])
end
using Pkg
using Documenter
using MLJ
import MLJIteration
import IterationControl
import EarlyStopping
import MLJBase
import MLJTuning
import MLJModels
import MLJEnsembles
import ScientificTypes
import MLJModelInterface
import ScientificTypesBase
import Distributions
using CategoricalArrays
using LossFunctions
import CategoricalDistributions
const MMI = MLJModelInterface
include("model_docstring_tools.jl")
# checking every model has a descriptor, for determining categories under which it appears
# in the Model Browser section of manual:
@info "Checking ModelDescriptors.toml to see all models have descriptors assigned. "
problems = models_missing_descriptors()
isempty(problems) || error(
"The following keys are missing from /docs/ModelDescriptors.toml: "*
"$problems. ")
# compose the individual model docstring pages:
@info "Getting individual model docstrings from the registry and generating "*
"pages for them, written at /docs/src/models/ ."
for model in models()
write_page(model)
end
# compose the model browser page:
@info "Composing the Model Browser page, /docs/src/model_browser.md"
write_page()
# using Literate
# Literate.markdown("common_mlj_workflows.jl", ".",
# codefence = "```@example workflows" => "```")
pages = [
"Home" => "index.md",
"Model Browser" => "model_browser.md",
"About MLJ" => "about_mlj.md",
"Learning MLJ" => "learning_mlj.md",
"Getting Started" => "getting_started.md",
"Common MLJ Workflows" => "common_mlj_workflows.md",
"Working with Categorical Data" => "working_with_categorical_data.md",
"Model Search" => "model_search.md",
"Loading Model Code" => "loading_model_code.md",
"Machines" => "machines.md",
"Evaluating Model Performance" => "evaluating_model_performance.md",
"Performance Measures" => "performance_measures.md",
"Weights" => "weights.md",
"Tuning Models" => "tuning_models.md",
"Learning Curves" => "learning_curves.md",
"Preparing Data" => "preparing_data.md",
"Transformers and Other Unsupervised models" => "transformers.md",
"More on Probabilistic Predictors" => "more_on_probabilistic_predictors.md",
"Composing Models" => "composing_models.md",
"Linear Pipelines" => "linear_pipelines.md",
"Target Transformations" => "target_transformations.md",
"Homogeneous Ensembles" => "homogeneous_ensembles.md",
"Model Stacking" => "model_stacking.md",
"Learning Networks" => "learning_networks.md",
"Controlling Iterative Models" => "controlling_iterative_models.md",
"Generating Synthetic Data" => "generating_synthetic_data.md",
"Logging Workflows" => "logging_workflows.md",
"OpenML Integration" => "openml_integration.md",
"Acceleration and Parallelism" => "acceleration_and_parallelism.md",
"Simple User Defined Models" => "simple_user_defined_models.md",
"Quick-Start Guide to Adding Models" =>
"quick_start_guide_to_adding_models.md",
"Adding Models for General Use" => "adding_models_for_general_use.md",
"Modifying Behavior" => "modifying_behavior.md",
"Internals" => "internals.md",
"List of Supported Models" => "list_of_supported_models.md",
"Third Party Packages" => "third_party_packages.md",
"Glossary" => "glossary.md",
"MLJ Cheatsheet" => "mlj_cheatsheet.md",
"Known Issues" => "known_issues.md",
"FAQ" => "frequently_asked_questions.md",
"Julia BlogPost" => "julia_blogpost.md",
"Index of Methods" => "api.md",
]
for (k, v) in pages
println("$k\t=>$v")
end
makedocs(
doctest = true,
sitename = "MLJ",
format = Documenter.HTML(),
modules = [MLJ,
MLJBase,
MLJTuning,
MLJModels,
MLJEnsembles,
ScientificTypes,
MLJModelInterface,
ScientificTypesBase,
MLJIteration,
EarlyStopping,
IterationControl,
CategoricalDistributions],
pages = pages,
strict = true
)
# By default Documenter does not deploy docs just for PR
# this causes issues with how we're doing things and ends
# up choking the deployment of the docs, so here we
# force the environment to ignore this so that Documenter
# does indeed deploy the docs
ENV["TRAVIS_PULL_REQUEST"] = "false"
deploydocs(
repo = "github.com/alan-turing-institute/MLJ.jl.git",
push_preview=true
)