Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test doc generation #27

Closed
wants to merge 13 commits into from
8 changes: 8 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
threshold: 0.5%
patch:
default:
target: 80%
13 changes: 13 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check

on: [pull_request]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
8 changes: 6 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ version = "0.1.0"

[deps]
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
julia = "1.6"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["SparseArrays", "Test"]
test = ["DataFrames", "LinearAlgebra", "MLUtils", "Serialization", "SparseArrays", "Tables", "Test"]
5 changes: 3 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[compat]
Documenter = "^0.27"
julia = "1"
Documenter = "1"
julia = "1.6"
24 changes: 13 additions & 11 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,32 @@ using Documenter
using LearnAPI
using ScientificTypesBase

const REPO="github.com/JuliaAI/LearnAPI.jl"
const REPO = Remotes.GitHub("JuliaAI", "LearnAPI.jl")

makedocs(;
makedocs(
modules=[LearnAPI,],
format=Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
pages=[
"Overview" => "index.md",
"Goals and Approach" => "goals_and_approach.md",
"Home" => "index.md",
"Anatomy of an Implementation" => "anatomy_of_an_implementation.md",
"Reference" => "reference.md",
"Fit, update and ingest" => "fit_update_and_ingest.md",
"Predict and other operations" => "operations.md",
"Kinds of Target Proxy" => "kinds_of_target_proxy.md",
"fit" => "fit.md",
"predict, transform, and relatives" => "predict_transform.md",
"minimize" => "minimize.md",
"obs" => "obs.md",
"Accessor Functions" => "accessor_functions.md",
"Optional Data Interface" => "optional_data_interface.md",
"Algorithm Traits" => "algorithm_traits.md",
"Algorithm Traits" => "traits.md",
"Common Implementation Patterns" => "common_implementation_patterns.md",
"Testing an Implementation" => "testing_an_implementation.md",
],
repo="https://$REPO/blob/{commit}{path}#L{line}",
sitename="LearnAPI.jl"
sitename="LearnAPI.jl",
warnonly = [:cross_references, :missing_docs],
repo = Remotes.GitHub("JuliaAI", "LearnAPI.jl"),
)

deploydocs(
; repo=REPO,
devbranch="dev",
push_preview=false,
repo="github.com/JuliaAI/LearnAPI.jl.git",
)
35 changes: 29 additions & 6 deletions docs/src/accessor_functions.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
# Accessor Functions
# [Accessor Functions](@id accessor_functions)

> **Summary.** While byproducts of training are ordinarily recorded in the `report`
> component of the output of `fit`/`update!`/`ingest!`, some families of algorithms report an
> item that is likely shared by multiple algorithm types, and it is useful to have common
> interface for accessing these directly. Training losses and feature importances are two
> examples.
The sole argument of an accessor function is the output, `model`, of [`fit`](@ref) or
[`obsfit`](@ref).

- [`LearnAPI.algorithm(model)`](@ref)
- [`LearnAPI.extras(model)`](@ref)
- [`LearnAPI.coefficients(model)`](@ref)
- [`LearnAPI.intercept(model)`](@ref)
- [`LearnAPI.tree(model)`](@ref)
- [`LearnAPI.trees(model)`](@ref)
- [`LearnAPI.feature_importances(model)`](@ref)
- [`LearnAPI.training_labels(model)`](@ref)
- [`LearnAPI.training_losses(model)`](@ref)
- [`LearnAPI.training_scores(model)`](@ref)
- [`LearnAPI.components(model)`](@ref)

## Implementation guide

All new implementations must implement [`LearnAPI.algorithm`](@ref). All others are
optional.

## Reference

```@docs
LearnAPI.algorithm
LearnAPI.extras
LearnAPI.coefficients
LearnAPI.intercept
LearnAPI.tree
LearnAPI.trees
LearnAPI.feature_importances
LearnAPI.training_losses
LearnAPI.training_scores
LearnAPI.training_labels
LearnAPI.components
```


139 changes: 0 additions & 139 deletions docs/src/algorithm_traits.md

This file was deleted.

Loading
Loading