Skip to content

Commit 075afa3

Browse files
authored
Merge pull request #6 from JuliaAI/dev
Update README.md
2 parents 761d417 + cab3054 commit 075afa3

23 files changed

+708
-328
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -55,64 +55,14 @@ jobs:
5555
- uses: julia-actions/setup-julia@v1
5656
with:
5757
version: '1'
58-
- run: |
59-
julia -e '
60-
function set_environment_variable(name::AbstractString, value::AbstractString)
61-
github_env = ENV["GITHUB_ENV"]
62-
touch(github_env)
63-
open(github_env, "a") do io
64-
println(io, "$(name)=$(value)")
65-
end
66-
end
67-
event_name = "${{ github.event_name }}"
68-
if event_name == "pull_request"
69-
base_ref = "${{ github.base_ref }}"
70-
head_ref = "${{ github.head_ref }}"
71-
base_repository = "${{ github.repository }}"
72-
head_repository = "${{ github.event.pull_request.head.repo.full_name }}"
73-
build_docs = (base_ref == "master") && (head_ref == "dev") && (base_repository == head_repository)
74-
elseif event_name == "push"
75-
ref = "${{ github.ref }}"
76-
build_docs = (ref == "refs/heads/master") || (startswith(ref, "refs/tags/"))
77-
elseif event_name == "schedule"
78-
build_docs = ref == "refs/heads/master"
79-
elseif event_name == "workflow_dispatch"
80-
build_docs = ref == "refs/heads/master"
81-
else
82-
build_docs = false
83-
end
84-
if build_docs
85-
@info("We will build the docs")
86-
set_environment_variable("BUILD_DOCS", "true")
87-
else
88-
@info("We will NOT build the docs")
89-
set_environment_variable("BUILD_DOCS", "false")
90-
end'
91-
- run: |
92-
julia --project=docs -e '
93-
if ENV["BUILD_DOCS"] == "true"
94-
using Pkg
95-
Pkg.develop(PackageSpec(path=pwd()))
96-
Pkg.instantiate()
97-
end'
98-
- run: |
99-
julia --project=docs -e '
100-
if ENV["BUILD_DOCS"] == "true"
101-
using Documenter: doctest
102-
using LearnAPI
103-
@info "attempting to run the doctests"
104-
doctest(LearnAPI)
105-
else
106-
@info "skipping the doctests"
107-
end'
108-
- run: julia --project=docs -e '
109-
if ENV["BUILD_DOCS"] == "true"
110-
@info "attempting to build the docs"
111-
run(`julia --project=docs docs/make.jl`)
112-
@info "successfully built the docs"
113-
else
114-
@info "skipping the docs build"
115-
end'
58+
- uses: julia-actions/julia-buildpkg@v1
59+
- uses: julia-actions/julia-docdeploy@v1
11660
env:
11761
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11862
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
63+
- run: |
64+
julia --project=docs -e '
65+
using Documenter: DocMeta, doctest
66+
using LearnAPI
67+
DocMeta.setdocmeta!(LearnAPI, :DocTestSetup, :(using LearnAPI); recursive=true)
68+
doctest(LearnAPI)'

Project.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ authors = ["Anthony D. Blaom <anthony.blaom@gmail.com>"]
44
version = "0.1.0"
55

66
[deps]
7+
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
78
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
9+
10+
[extras]
11+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
12+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
13+
14+
[targets]
15+
test = ["SparseArrays", "Test"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A Julia interface for training and applying machine learning models.
44

5-
**Status:** Proposal.
5+
**Status:** Proposal.
66

77

88
&#x1F6A7;

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
LearnAPI = "92ad9a40-7767-427a-9ee6-6e577f1266cb"
4+
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"
5+
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
46

57
[compat]
68
Documenter = "^0.27"

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ makedocs(;
99
pages=[
1010
"Introduction" => "index.md",
1111
"Anatomy of an Implementation" => "anatomy_of_an_implementation.md",
12-
"Common Implementation Patterns" => "common_implementation_patterns.md",
1312
"Reference" => "reference.md",
1413
"Fit, update and ingest" => "fit_update_and_ingest.md",
1514
"Predict and other operations" => "operations.md",
1615
"Model Traits" => "model_traits.md",
16+
"Common Implementation Patterns" => "common_implementation_patterns.md",
1717
],
1818
repo="https://$REPO/blob/{commit}{path}#L{line}",
1919
sitename="LearnAPI.jl"

docs/src/accessor_functions

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/src/accessor_functions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Accessor Functions
2+
3+
> **Summary.** While byproducts of training are ordinarily recorded in the `report`
4+
> component of the output of `fit`/`update!`/`ingest!`, some families of models report an
5+
> itme that is likely shared by multiple model types, and it is useful to have common
6+
> interface for accessing these directly. Training losses and feature importances are two
7+
> examples.
8+
9+
```@docs
10+
LearnAPI.feature_importances
11+
LearnAPI.training_labels
12+
LearnAPI.training_losses
13+
LearnAPI.training_scores
14+
```
15+

0 commit comments

Comments
 (0)