Skip to content

Commit 68ec138

Browse files
committed
Take MLJOpenML out of MLJBase
1 parent 28822a9 commit 68ec138

File tree

11 files changed

+162
-13
lines changed

11 files changed

+162
-13
lines changed

.github/workflows/CI.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: "dev"
6+
tags: ["*"]
7+
pull_request:
8+
release:
9+
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.julia-arch }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
julia-version:
18+
- "1.0"
19+
- "1"
20+
- "nightly"
21+
os:
22+
- ubuntu-latest
23+
- macos-latest
24+
- windows-latest
25+
julia-arch:
26+
- x64
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: julia-actions/setup-julia@v1
30+
with:
31+
version: ${{ matrix.julia-version }}
32+
arch: ${{ matrix.julia-arch }}
33+
- name: Cache artifacts
34+
uses: actions/cache@v2
35+
env:
36+
cache-name: cache-artifacts
37+
with:
38+
path: |
39+
~/.julia/artifacts
40+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
41+
restore-keys: |
42+
${{ runner.os }}-test-${{ env.cache-name }}-
43+
${{ runner.os }}-test-
44+
${{ runner.os }}-
45+
- uses: julia-actions/julia-buildpkg@latest
46+
- uses: julia-actions/julia-runtest@latest
47+
- uses: julia-actions/[email protected]
48+
continue-on-error: true
49+
- uses: julia-actions/[email protected]
50+
continue-on-error: true
51+
52+
Documentation:
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v2
56+
- uses: julia-actions/setup-julia@latest
57+
with:
58+
version: 1
59+
- name: Cache artifacts
60+
uses: actions/cache@v2
61+
env:
62+
cache-name: cache-artifacts
63+
with:
64+
path: |
65+
~/.julia/artifacts
66+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/docs/Project.toml') }}
67+
restore-keys: |
68+
${{ runner.os }}-test-${{ env.cache-name }}-
69+
${{ runner.os }}-test-
70+
${{ runner.os }}-
71+
- uses: julia-actions/julia-docdeploy@releases/v1
72+
env:
73+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/CompatHelper.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: '00 00 * * *'
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} # optional
16+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

Project.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name = "MLJOpenML"
2+
uuid = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
3+
authors = ["Anthony D. Blaom <[email protected]>"]
4+
version = "1.0.0"
5+
6+
[deps]
7+
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
8+
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
9+
10+
[compat]
11+
HTTP = "^0.8, 0.9"
12+
JSON = "^0.21"
13+
julia = "1"
14+
15+
[extras]
16+
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
17+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
18+
19+
[targets]
20+
test = ["Tables", "Test"]

docs/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "~0.26"

docs/make.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Documenter, MLJOpenML
2+
3+
makedocs(
4+
modules = [MLJOpenML],
5+
sitename = "MLJOpenML.jl",
6+
)
7+
8+
deploydocs(
9+
repo = "github.com/alan-turing-institute/MLJOpenML.jl.git",
10+
)

docs/src/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# MLJOpenML.jl Documentation
2+
3+
This is the reference documentation of
4+
[`MLJOpenML.jl`](https://github.com/alan-turing-institute/MLJOpenML.jl).
5+
6+
```@autodocs
7+
Modules = [MLJOpenML]
8+
```

src/MLJOpenML.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module MLJOpenML
2+
3+
include("openml.jl")
4+
5+
end # module

src/openml.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
module OpenML
2-
31
using HTTP
42
using JSON
53

@@ -87,7 +85,7 @@ function convert_ARFF_to_rowtable(response)
8785
end
8886

8987
"""
90-
OpenML.load(id)
88+
MLJOpenML.load(id)
9189
9290
Load the OpenML dataset with specified `id`, from those listed on the
9391
[OpenML site](https://www.openml.org/search?type=data).
@@ -100,7 +98,7 @@ example:
10098
10199
```julia
102100
using DataFrames
103-
rowtable = OpenML.load(61);
101+
rowtable = MLJOpenML.load(61);
104102
df = DataFrame(rowtable);
105103
df2 = coerce(df, :class=>Multiclass)
106104
```
@@ -262,5 +260,3 @@ end
262260
# Task API
263261

264262
# Run API
265-
266-
end # module

test/openml.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ module TestOpenml
22

33
using Test
44
using HTTP
5-
using MLJBase
5+
using MLJOpenML
66
import Tables.istable
77

8-
response_test = OpenML.load_Dataset_Description(61)
9-
ntp_test = OpenML.load(61)
8+
response_test = MLJOpenML.load_Dataset_Description(61)
9+
ntp_test = MLJOpenML.load(61)
1010
@test istable(ntp_test)
11-
dqlist_test = OpenML.load_Data_Qualities_List()
12-
data_features_test = OpenML.load_Data_Features(61)
13-
data_qualities_test = OpenML.load_Data_Qualities(61)
11+
dqlist_test = MLJOpenML.load_Data_Qualities_List()
12+
data_features_test = MLJOpenML.load_Data_Features(61)
13+
data_qualities_test = MLJOpenML.load_Data_Qualities(61)
1414
limit = 5
1515
offset = 8
16-
filters_test = OpenML.load_List_And_Filter("limit/$limit/offset/$offset")
16+
filters_test = MLJOpenML.load_List_And_Filter("limit/$limit/offset/$offset")
1717

1818
@testset "HTTP connection" begin
1919
@test typeof(response_test) <: Dict

0 commit comments

Comments
 (0)