Skip to content

Commit

Permalink
Start development of the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira authored and dpo committed Jan 22, 2017
1 parent ca3e592 commit bbe6cc6
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,6 @@

deps/*
!deps/build.jl

docs/build
docs/site
11 changes: 11 additions & 0 deletions docs/make.jl
@@ -0,0 +1,11 @@
using Documenter, CUTEst, NLPModels

makedocs(
modules = [CUTEst]
)

deploydocs(deps = Deps.pip("pygmenters", "mkdocs", "mkdocs-material", "python-markdown-math"),
repo = "github.com/JuliaSmoothOptimizers/CUTEst.jl.git",
julia = "release",
latest = "develop"
)
33 changes: 33 additions & 0 deletions docs/mkdocs.yml
@@ -0,0 +1,33 @@
site_name: CUTEst.jl
repo_url: https://github.com/JuliaSmoothOptimizers/CUTEst.jl
site_description: Nonlinear Programming Models
site_author: JuliaSmoothOptimizers

theme: material

extra:
palette:
primary: 'light blue'
accent: 'indigo'
author:
github: JuliaSmoothOptimizers

extra_css:
- assets/Documenter.css
- assets/style.css

extra_javascript:
- https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_HTMLorMML
- assets/mathjaxhelper.js

markdown_extensions:
- extra
- tables
- fenced_code
- mdx_math

docs_dir: 'build'

pages:
- Home: index.md
- API: api.md
21 changes: 21 additions & 0 deletions docs/src/api.md
@@ -0,0 +1,21 @@
# API

## NLPModels API

```@eval
using NLPModels
using Base.Markdown
s = []
mtds = [obj, grad, grad!, cons, cons!, jac_coord, jac, jprod, jprod!,
jtprod, jtprod!, hess_coord, hess, hprod, hprod!, NLPtoMPB, reset!]
for i = 1:length(mtds)
name = split(string(mtds[i]), ".")[2]
push!(s, md"### $name")
push!(s, @doc mtds[i])
sout = []
end
s
```
47 changes: 47 additions & 0 deletions docs/src/index.md
@@ -0,0 +1,47 @@
# CUTEst.jl documentation

This package provides access interfaces to
[CUTEst](http://ccpforge.cse.rl.ac.uk/gf/project/cutest/wiki),
the Constrained and Unconstrained Test Environment with safe threads
for nonlinear optimization.

This package uses
[NLPModels.jl](https://github.com/JuliaSmoothOptimizers/NLPModels.jl), but it
also gives a different interface for accessing the problems.

## Installing

Currently, this package builds its own version of CUTEst, if you have your own
version of CUTEst, this will conflict with it. Check the issues for a fix, or
open one for help.

The following commands should automatically download NLPModels.jl and CUTEst,
installing it.
````julia
Pkg.clone("https://github.com/JuliaSmoothOptimizers/NLPModels.jl.git")
Pkg.checkout("NLPModels", "develop")
Pkg.clone("https://github.com/JuliaSmoothOptimizers/CUTEst.jl.git")
Pkg.checkout("CUTEst", "develop")
Pkg.build("CUTEst")
````

## Usage

The simples use of CUTEst is using the interface of NLPModels.jl

```@example
using CUTEst
nlp = CUTEstModel("ROSENBR")
println("x0 = $(nlp.meta.x0)")
println("fx = $( obj(nlp, nlp.meta.x0) )")
println("gx = $( grad(nlp, nlp.meta.x0) )")
println("Hx = $( hess(nlp, nlp.meta.x0) )")
cutest_finalize(nlp)
```

Check the [API](api/#nlpmodels-api)

There is also a specialized API which provides a more CUTEst-like interface, and
a core API which is only a wrapper for CUTEst.
The documentation os these is under construction.

0 comments on commit bbe6cc6

Please sign in to comment.