diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..7993b91 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,28 @@ +name: Documentation + +on: + push: + branches: + - master + tags: '*' + pull_request: + +jobs: + Documentation: + name: Documentation + runs-on: ubuntu-latest + + permissions: + contents: write + statuses: write + + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + show-versioninfo: true # this causes versioninfo to be printed to the action log + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-docdeploy@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 1209b4f..0dd2c1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Manifest.toml +Manifest-*.toml docs/build diff --git a/Project.toml b/Project.toml index a6c625f..98d3362 100644 --- a/Project.toml +++ b/Project.toml @@ -9,3 +9,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [compat] LinearAlgebra = "1.2" julia = "1.2" + +[workspace] +projects = ["docs", "test"] diff --git a/README.md b/README.md index b093463..cbde96a 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,6 @@ [![Build status](https://github.com/JuliaFirstOrder/ProximalCore.jl/workflows/Test/badge.svg)](https://github.com/JuliaFirstOrder/ProximalCore.jl/actions?query=workflow%3ATest) [![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) +[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliafirstorder.github.io/ProximalCore.jl/stable/) Core definitions for the [ProximalOperators](https://github.com/JuliaFirstOrder/ProximalOperators.jl) and [ProximalAlgorithms](https://github.com/JuliaFirstOrder/ProximalAlgorithms.jl) ecosystem. diff --git a/docs/make.jl b/docs/make.jl index cbf9b0b..f4522f7 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,6 +1,8 @@ using Documenter using ProximalCore +DocMeta.setdocmeta!(ProximalCore, :DocTestSetup, :(using ProximalCore); recursive=true) + makedocs( sitename = "ProximalCore.jl", format = Documenter.HTML(), @@ -11,7 +13,7 @@ makedocs( ] ) -#=deploydocs( +deploydocs( repo = "github.com/JuliaFirstOrder/ProximalCore.jl", devbranch = "main" -)=# +) diff --git a/src/base_functions.jl b/src/base_functions.jl index 498e546..f635d59 100644 --- a/src/base_functions.jl +++ b/src/base_functions.jl @@ -5,8 +5,8 @@ Constructs the zero function, i.e., the function that is zero everywhere. # Example ```jldoctest -julia> f = Zero() -Zero() +julia> f = ProximalCore.Zero() +ProximalCore.Zero() julia> f(rand(3)) 0.0 @@ -36,13 +36,13 @@ Constructs the indicator function of the zero set, i.e., the function that is ze # Example ```jldoctest -julia> f = IndZero() -IndZero() +julia> f = ProximalCore.IndZero() +ProximalCore.IndZero() -julia> f([1, 2, 3]) +julia> f([1.0, 2.0, 3.0]) Inf -julia> f([0, 0, 0]) +julia> f([0.0, 0.0, 0.0]) 0.0 ``` """ diff --git a/test/Project.toml b/test/Project.toml index 43493de..dfcb05e 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,5 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +ProximalCore = "dc4f5ac2-75d1-4f31-931e-60435d74994b" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"