From 3ad6366a843e31fbc710f36d11692bd91b52128b Mon Sep 17 00:00:00 2001 From: morris25 Date: Fri, 26 Oct 2018 14:50:35 -0500 Subject: [PATCH 1/8] Adds docs --- .gitignore | 1 + docs/make.jl | 3 +++ docs/src/index.md | 7 +++++++ src/Example.jl | 11 +++++++++++ 4 files changed, 22 insertions(+) create mode 100644 docs/make.jl create mode 100644 docs/src/index.md diff --git a/.gitignore b/.gitignore index 8c960ec..6725ea5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.jl.cov *.jl.*.cov *.jl.mem +/docs/build/ diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..236fa87 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,3 @@ +using Documenter, Example + +makedocs(modules = [Example]) diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..b1cee35 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,7 @@ +# Example + +Example Julia package repo. + +```@autodocs +Modules = [Example] +``` diff --git a/src/Example.jl b/src/Example.jl index cd1d31b..57ac845 100644 --- a/src/Example.jl +++ b/src/Example.jl @@ -1,7 +1,18 @@ module Example export hello, domath +""" + hello(who::String) + +Returns "Hello, `who`" +""" hello(who::String) = "Hello, $who" + +""" + domath(x::Number) + +Returns `x + 5` +""" domath(x::Number) = x + 5 end From 898047e387a96fa90258a8b9d6fe9ef7ba50caf0 Mon Sep 17 00:00:00 2001 From: morris25 Date: Fri, 26 Oct 2018 16:01:14 -0500 Subject: [PATCH 2/8] Fixes punctuation --- src/Example.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Example.jl b/src/Example.jl index 57ac845..4753343 100644 --- a/src/Example.jl +++ b/src/Example.jl @@ -4,14 +4,14 @@ export hello, domath """ hello(who::String) -Returns "Hello, `who`" +Returns "Hello, `who`". """ hello(who::String) = "Hello, $who" """ domath(x::Number) -Returns `x + 5` +Returns `x + 5`. """ domath(x::Number) = x + 5 From cf1da49a378f4805e7032586b9dd5dda642f06a1 Mon Sep 17 00:00:00 2001 From: morris25 Date: Fri, 26 Oct 2018 16:20:28 -0500 Subject: [PATCH 3/8] Adds travis deployment(optional for testing purposes) --- .travis.yml | 1 + docs/make.jl | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3ed3dbf..0b73c58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,3 +25,4 @@ notifications: after_success: - julia -e 'cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; # - julia -e 'cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'; + - julia -e 'Pkg.add("Documenter"); cd(Pkg.dir("PACKAGE_NAME")); include(joinpath("docs", "make.jl"))' diff --git a/docs/make.jl b/docs/make.jl index 236fa87..058ad2e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,3 +1,10 @@ using Documenter, Example makedocs(modules = [Example]) + +if get(ENV, "TEST_DOCS", "false") != "true" + deploydocs( + repo = "github.com/JuliaLang/Example.jl.git", + julia = "0.6" + ) +end From 1e7e52928d9a2cbec85cf53c66b43b1731b08270 Mon Sep 17 00:00:00 2001 From: morris25 Date: Fri, 26 Oct 2018 16:36:55 -0500 Subject: [PATCH 4/8] Updates doc deployment to 1.0 --- docs/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index 058ad2e..a7c6ba9 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,6 +5,6 @@ makedocs(modules = [Example]) if get(ENV, "TEST_DOCS", "false") != "true" deploydocs( repo = "github.com/JuliaLang/Example.jl.git", - julia = "0.6" + julia = "1.0" ) end From 539e6a17c03f175b3f59cb8c2ad33d671098bd61 Mon Sep 17 00:00:00 2001 From: morris25 Date: Fri, 26 Oct 2018 16:44:50 -0500 Subject: [PATCH 5/8] Fixes docstrings to use imperative form --- src/Example.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Example.jl b/src/Example.jl index 4753343..d719874 100644 --- a/src/Example.jl +++ b/src/Example.jl @@ -4,14 +4,14 @@ export hello, domath """ hello(who::String) -Returns "Hello, `who`". +Return "Hello, `who`". """ hello(who::String) = "Hello, $who" """ domath(x::Number) -Returns `x + 5`. +Return `x + 5`. """ domath(x::Number) = x + 5 From d5c1a2a60ea7bab411b505667bf0a282d9286e43 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Sat, 27 Oct 2018 16:00:36 +0200 Subject: [PATCH 6/8] Travis fixes --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b73c58..401ffec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ os: julia: - 0.6 - 0.7 + - 1.0 - nightly # # Uncomment the following lines to allow failures on nightly julia @@ -23,6 +24,6 @@ notifications: # - julia -e 'Pkg.clone(pwd()); Pkg.build("Example"); Pkg.test("Example"; coverage=true)'; after_success: - - julia -e 'cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; -# - julia -e 'cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'; - - julia -e 'Pkg.add("Documenter"); cd(Pkg.dir("PACKAGE_NAME")); include(joinpath("docs", "make.jl"))' + - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; +# - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'; + - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; Pkg.add("Documenter"); cd(Pkg.dir("Example")); include(joinpath("docs", "make.jl"))' From 4ff3383186c051f2a1e79620897d4bbcf88fb136 Mon Sep 17 00:00:00 2001 From: morris25 Date: Wed, 31 Oct 2018 13:22:17 -0500 Subject: [PATCH 7/8] Updates doc deployment, adds badges, and adds Documentation job to travis --- .travis.yml | 12 +++++++++++- README.md | 2 ++ docs/Project.toml | 5 +++++ docs/make.jl | 3 +-- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 docs/Project.toml diff --git a/.travis.yml b/.travis.yml index 401ffec..1d0a566 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,4 +26,14 @@ notifications: after_success: - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; # - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'; - - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; Pkg.add("Documenter"); cd(Pkg.dir("Example")); include(joinpath("docs", "make.jl"))' + +jobs: + include: + - stage: "Documentation" + julia: 1.0 + os: linux + script: + - julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); + Pkg.develop(PackageSpec(path=pwd()))' + - julia --project=docs/ docs/make.jl + after_success: skip diff --git a/README.md b/README.md index 6ce22ff..1c2bf3f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Example Julia package repo. [![Example](http://pkg.julialang.org/badges/Example_0.6.svg)](http://pkg.julialang.org/?pkg=Example) [![Example](http://pkg.julialang.org/badges/Example_0.7.svg)](http://pkg.julialang.org/?pkg=Example) +[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaLang.github.io/Example.jl/stable) +[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaLang.github.io/Example.jl/dev) Linux and macOS: [![Build Status](https://travis-ci.org/JuliaLang/Example.jl.svg?branch=master)](https://travis-ci.org/JuliaLang/Example.jl) diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..c278538 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,5 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" + +[compat] +Documenter = "~0.20" diff --git a/docs/make.jl b/docs/make.jl index a7c6ba9..7914e03 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,10 +1,9 @@ using Documenter, Example -makedocs(modules = [Example]) +makedocs(modules = [Example], sitename = "Example.jl") if get(ENV, "TEST_DOCS", "false") != "true" deploydocs( repo = "github.com/JuliaLang/Example.jl.git", - julia = "1.0" ) end From cd09f3e953dc1d431f632862f9ab7c9c20ac5ab1 Mon Sep 17 00:00:00 2001 From: morris25 Date: Thu, 1 Nov 2018 08:29:30 -0500 Subject: [PATCH 8/8] Adds Manifest to gitignore and removes testing check --- .gitignore | 1 + docs/make.jl | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6725ea5..ef17dbb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.jl.*.cov *.jl.mem /docs/build/ +/docs/Manifest.toml diff --git a/docs/make.jl b/docs/make.jl index 7914e03..4be27ac 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -2,8 +2,6 @@ using Documenter, Example makedocs(modules = [Example], sitename = "Example.jl") -if get(ENV, "TEST_DOCS", "false") != "true" - deploydocs( - repo = "github.com/JuliaLang/Example.jl.git", - ) -end +deploydocs( + repo = "github.com/JuliaLang/Example.jl.git", +)