Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from JuliaRecsys/develop
Develop
- Loading branch information
Showing
12 changed files
with
283 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ docs/site/ | |
*.jl.mem | ||
*.jld | ||
deps/deps.jl | ||
|
||
Manifest.toml | ||
docs/Manifest.toml | ||
test/coverage/Manifest.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
# Documentation: http://docs.travis-ci.com/user/languages/julia/ | ||
language: julia | ||
|
||
os: | ||
- linux | ||
|
||
julia: | ||
- 1.0 | ||
- 1.2 | ||
- nightly | ||
|
||
matrix: | ||
allow_failures: | ||
- julia: nightly | ||
|
||
codecov: true | ||
|
||
coveralls: true | ||
|
||
notifications: | ||
email: false | ||
# uncomment the following lines to override the default test script | ||
#script: | ||
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi | ||
# - julia -e 'Pkg.clone(pwd()); Pkg.build("Persa"); Pkg.test("Persa"; coverage=true)' | ||
after_success: | ||
- julia -e 'import Pkg; ps=Pkg.PackageSpec(name="Documenter", version="0.19"); Pkg.add(ps); Pkg.pin(ps)' | ||
- julia -e 'import Pkg; cd(Pkg.dir("Persa")); include(joinpath("docs", "make.jl"))' | ||
# push coverage results to Coveralls | ||
- julia -e 'import Pkg; cd(Pkg.dir("Persa")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())' | ||
|
||
jobs: | ||
include: | ||
- stage: "Documentation" | ||
julia: 1.0 | ||
os: linux | ||
script: | ||
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); | ||
Pkg.instantiate()' | ||
- julia --project=docs/ docs/make.jl | ||
after_success: skip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name = "Persa" | ||
uuid = "86800b63-3017-5277-aca5-15d7d6a5f2b2" | ||
keywords = ["recoomendersystems", "recsys", "collaborativefiltering"] | ||
license = "MIT" | ||
desc = " Recommender System framework for Julia." | ||
version = "0.1.2" | ||
|
||
[deps] | ||
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" | ||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
|
||
[extras] | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test", "Random"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
|
||
[compat] | ||
Documenter = "~0.19" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
struct RandomModel{T} <: Persa.Model{T} | ||
preference::Persa.Preference{T} | ||
users::Int | ||
items::Int | ||
end | ||
|
||
RandomModel(dataset::Persa.Dataset) = RandomModel(dataset.preference, Persa.users(dataset), Persa.items(dataset)) | ||
|
||
@testset "Model Learn Tests" begin | ||
df1 = createdummydatasetone() | ||
dataset1 = Persa.Dataset(df1) | ||
|
||
df2 = createdummydatasettwo() | ||
dataset2 = Persa.Dataset(df2, 10, 10) | ||
|
||
Persa.predict(model::RandomModel, user::Int, item::Int) = rand(model.preference.possibles) | ||
|
||
model1 = RandomModel(dataset1) | ||
model2 = RandomModel(dataset2) | ||
|
||
@testset "Dummy Tests" begin | ||
@test model1[1,1] > 0 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.