Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Jan 23, 2024
1 parent 2f50c40 commit 4cd698f
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 113 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Curvefit"
name = "VegCurveFit"
uuid = "dec11fe7-d51b-4c55-8237-c7557eff4313"
authors = ["Dongdong Kong"]
version = "0.1.0"
Expand Down
89 changes: 0 additions & 89 deletions docs/Manifest.toml

This file was deleted.

37 changes: 24 additions & 13 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
using Documenter, nlminb
using Documenter, VegCurveFit
CI = get(ENV, "CI", nothing) == "true"

makedocs(;
modules=[nlminb],
format=Documenter.HTML(),
pages=[
"Home" => "index.md",
],
repo="https://kongdd/kongdd/nlminb.jl/blob/{commit}{path}#L{line}",
sitename="nlminb.jl",
authors="Dongdong Kong",
assets=String[],
# Logging.disable_logging(Logging.Warn)

# Make the docs, without running the tests again
# We need to explicitly add all the extensions here
makedocs(
modules=[
VegCurveFit
],
format=Documenter.HTML(
prettyurls=CI,
),
pages=[
"Home" => "index.md",
],
sitename="VegCurveFit.jl",
warnonly=true,
clean=false,
)

deploydocs(;
repo="kongdd/kongdd/nlminb.jl",
# Enable logging to console again
# Logging.disable_logging(Logging.BelowMinLevel)

deploydocs(
repo="github.com/eco-hydro/VegCurveFit.jl.git",
)
9 changes: 3 additions & 6 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# nlminb.jl
# VegCurveFit.jl

```@index
```

```@autodocs
Modules = [nlminb]
```docs
nlminb
```
2 changes: 1 addition & 1 deletion src/CurveFit/CurveFit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ FUNCS_doubleLog = Dict(
)


function curvefits(y::AbstractArray{T,1}, t, w::::AbstractArray{T,1},
function curvefits(y::AbstractArray{T,1}, t, w::AbstractArray{T,1},
ylu::Vector{Float64}, nptperyear::Integer,
dt;
methods=["AG", "Zhang", "Beck", "Elmore"]) where {T<:Real}
Expand Down
7 changes: 4 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using nlminb
using Test
using VegCurveFit

@testset "nlminb.jl" begin
@testset "nlminb" begin
# Write your own tests here.
start = [0.0] # [1, 2, 3, 4]
lower = [-4.0]
Expand All @@ -12,5 +12,6 @@ using Test
end

f(x) = x[1] - cos(x[1])
r = optim_nlminb(start, f, verbose=false)
r = nlminb(start, f, verbose=false)
@test r["par"][1] == -1.5701006351106073
end

0 comments on commit 4cd698f

Please sign in to comment.