Skip to content

Commit

Permalink
Rename XPalm into XPalmModel
Browse files Browse the repository at this point in the history
  • Loading branch information
VEZY committed Feb 6, 2025
1 parent b921f97 commit ea404db
Show file tree
Hide file tree
Showing 22 changed files with 99 additions and 99 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ jobs:
shell: julia --project=docs --color=yes {0}
run: |
using Documenter: DocMeta, doctest
using XPalm
DocMeta.setdocmeta!(XPalm, :DocTestSetup, :(using XPalm); recursive=true)
doctest(XPalm)
using XPalmModel
DocMeta.setdocmeta!(XPalmModel, :DocTestSetup, :(using XPalmModel); recursive=true)
doctest(XPalmModel)
6 changes: 3 additions & 3 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@misc{XPalm.jl,
@misc{XPalmModel.jl,
author = {Rémi Vezy <VEZY@users.noreply.github.com> and contributors},
title = {XPalm.jl},
url = {https://github.com/PalmStudio/XPalm.jl},
title = {XPalmModel.jl},
url = {https://github.com/PalmStudio/XPalmModel.jl},
version = {v0.1.0},
year = {2022},
month = {11}
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "XPalm"
name = "XPalmModel"
uuid = "6b523e1e-d512-416c-8e51-a8fbef0064e7"
authors = ["Rémi Vezy <[email protected]> and contributors"]
version = "0.1.0"
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# XPalm - Growth and yield model for oil palm <img src="https://commons.wikimedia.org/wiki/File:Elaeis_guineensis_-_K%C3%B6hler%E2%80%93s_Medizinal-Pflanzen-056.jpg#/media/Fichier:Elaeis_guineensis_-_K%C3%B6hler%E2%80%93s_Medizinal-Pflanzen-056.jpg" alt="" width="300" align="right" />
# XPalm - A Growth and Yield Model for Oil Palm <img src="https://commons.wikimedia.org/wiki/File:Elaeis_guineensis_-_K%C3%B6hler%E2%80%93s_Medizinal-Pflanzen-056.jpg#/media/Fichier:Elaeis_guineensis_-_K%C3%B6hler%E2%80%93s_Medizinal-Pflanzen-056.jpg" alt="" width="300" align="right" />

<!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://PalmStudio.github.io/XPalm.jl/stable/) -->
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://PalmStudio.github.io/XPalm.jl/dev/)
[![Build Status](https://github.com/PalmStudio/XPalm.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/PalmStudio/XPalm.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/PalmStudio/XPalm.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/PalmStudio/XPalm.jl)
<!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://PalmStudio.github.io/XPalmModel.jl/stable/) -->
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://PalmStudio.github.io/XPalmModel.jl/dev/)
[![Build Status](https://github.com/PalmStudio/XPalmModel.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/PalmStudio/XPalmModel.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/PalmStudio/XPalmModel.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/PalmStudio/XPalmModel.jl)
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)

## Overview
Expand Down Expand Up @@ -60,30 +60,30 @@ Fraction of transpirable soil water (FTSW) over time:
The package can be installed using the Julia package manager. From the Julia REPL, type `]` to enter the Pkg REPL mode and run:

```julia
pkg> add XPalm
pkg> add XPalmModel
```

To use the package, type the following in the Julia REPL:

```julia
using XPalm
using XPalmModel
```

## Quick Start

From the Julia REPL, load the package:

```julia
using XPalm
using XPalmModel
```

### The easiest way of running the model

The easiest way to run the model is to use the template notebook provided by the package. To run the notebook, you need to install the Pluto package first by running `] add Pluto`. Then, you can run the notebook using the following commands in the Julia REPL:

```julia
using Pluto, XPalm
XPalm.notebook("xpalm_notebook.jl")
using Pluto, XPalmModel
XPalmModel.notebook("xpalm_notebook.jl")
```

This command will create a new Pluto notebook (named "xpalm_notebook.jl") in the current directory, and open it automatically for you.
Expand All @@ -97,10 +97,10 @@ Once closed, you can re-open this notebook by running the same command again. If
Run a simple simulation using default parameters and meteorological data:

```julia
using XPalm, CSV, DataFrames
using XPalmModel, CSV, DataFrames

# Load example meteorological data
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalm))), "0-data/meteo.csv"), DataFrame)
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalmModel))), "0-data/meteo.csv"), DataFrame)

# Run simulation
df = xpalm(meteo;
Expand All @@ -119,13 +119,13 @@ Customize palm parameters and request multiple outputs:
```julia
# Read the parameters from a YAML file (provided in the example folder of the package):
using YAML
parameters = YAML.load_file(joinpath(dirname(dirname(pathof(XPalm))), "examples/xpalm_parameters.yml"); dicttype=Dict{Symbol,Any})
parameters = YAML.load_file(joinpath(dirname(dirname(pathof(XPalmModel))), "examples/xpalm_parameters.yml"); dicttype=Dict{Symbol,Any})

# Load example meteorological data
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalm))), "0-data/meteo.csv"), DataFrame)
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalmModel))), "0-data/meteo.csv"), DataFrame)

# Create palm with custom parameters
p = XPalm.Palm(parameters=parameters)
p = XPalmModel.Palm(parameters=parameters)

# Run simulation with multiple outputs
results = xpalm(
Expand All @@ -144,7 +144,7 @@ You can also import the parameters from a JSON file using the `JSON` package:

```julia
using JSON # You first need to install the JSON package by running `] add JSON`
params = open(joinpath(dirname(dirname(pathof(XPalm))), "examples/xpalm_parameters.json"), "r") do io
params = open(joinpath(dirname(dirname(pathof(XPalmModel))), "examples/xpalm_parameters.json"), "r") do io
JSON.parse(io; dicttype=Dict{Symbol,Any}, inttype=Int64)
end
```
Expand All @@ -157,8 +157,8 @@ end
The models are available from the `Models` submodule. To import all models, you can use the following command:

```julia
using XPalm
using XPalm.Models
using XPalmModel
using XPalmModel.Models
```

#### More examples
Expand Down
8 changes: 4 additions & 4 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -859,16 +859,16 @@ git-tree-sha1 = "a2fccc6559132927d4c5dc183e3e01048c6dcbd6"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.13.5+0"

[[deps.XPalm]]
[[deps.XPalmModel]]
deps = ["Dates", "MultiScaleTreeGraph", "PlantMeteo", "PlantSimEngine", "Random", "Statistics", "Tables"]
path = ".."
uuid = "6b523e1e-d512-416c-8e51-a8fbef0064e7"
version = "0.1.0"

[deps.XPalm.extensions]
XPalmPluto = "Pluto"
[deps.XPalmModel.extensions]
XPalmModelPluto = "Pluto"

[deps.XPalm.weakdeps]
[deps.XPalmModel.weakdeps]
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"

[[deps.YAML]]
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
XPalm = "6b523e1e-d512-416c-8e51-a8fbef0064e7"
XPalmModel = "6b523e1e-d512-416c-8e51-a8fbef0064e7"
14 changes: 7 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using XPalm
using XPalmModel
using Documenter

DocMeta.setdocmeta!(XPalm, :DocTestSetup, :(using XPalm); recursive=true)
DocMeta.setdocmeta!(XPalmModel, :DocTestSetup, :(using XPalmModel); recursive=true)

makedocs(;
modules=[XPalm],
modules=[XPalmModel],
authors="Rémi Vezy <[email protected]> and contributors",
repo=Documenter.Remotes.GitHub("PalmStudio", "XPalm.jl"),
sitename="XPalm.jl",
repo=Documenter.Remotes.GitHub("PalmStudio", "XPalmModel.jl"),
sitename="XPalmModel.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://PalmStudio.github.io/XPalm.jl",
canonical="https://PalmStudio.github.io/XPalmModel.jl",
edit_link="main",
assets=String[]
),
Expand All @@ -20,6 +20,6 @@ makedocs(;
)

deploydocs(;
repo="github.com/PalmStudio/XPalm.jl",
repo="github.com/PalmStudio/XPalmModel.jl",
devbranch="main"
)
40 changes: 20 additions & 20 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
```@meta
CurrentModule = XPalm
CurrentModule = XPalmModel
```

# XPalm - A growth and yield model for oil palm
# XPalm - A Growth and Yield Model for Oil Palm

```@raw html
<!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://PalmStudio.github.io/XPalm.jl/stable/) -->
<!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://PalmStudio.github.io/XPalmModel.jl/stable/) -->
```

[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://PalmStudio.github.io/XPalm.jl/dev/)
[![Build Status](https://github.com/PalmStudio/XPalm.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/PalmStudio/XPalm.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/PalmStudio/XPalm.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/PalmStudio/XPalm.jl)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://PalmStudio.github.io/XPalmModel.jl/dev/)
[![Build Status](https://github.com/PalmStudio/XPalmModel.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/PalmStudio/XPalmModel.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/PalmStudio/XPalmModel.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/PalmStudio/XPalmModel.jl)
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)

[XPalm](https://github.com/PalmStudio/XPalm.jl) is a growth and yield model for oil palm (*Elaeis guineensis*).
[XPalmModel](https://github.com/PalmStudio/XPalmModel.jl) is a growth and yield model for oil palm (*Elaeis guineensis*).

```@contents
Pages = ["index.md"]
Expand Down Expand Up @@ -75,24 +75,24 @@ Fraction of transpirable soil water (FTSW) over time:
Install XPalm using Julia's package manager, typing `]` in the Julia REPL (*i.e.* the console) to enter the Pkg REPL mode and then typing:

```julia
add XPalm
add XPalmModel
```

## Quick Start

From the Julia REPL, load the package:

```julia
using XPalm
using XPalmModel
```

### The easiest way of running the model

The easiest way to run the model is to use the template notebook provided by the package. To run the notebook, you need to install the Pluto package first by running `] add Pluto`. Then, you can run the notebook using the following commands in the Julia REPL:

```julia
using Pluto, XPalm
XPalm.notebook("xpalm_notebook.jl")
using Pluto, XPalmModel
XPalmModel.notebook("xpalm_notebook.jl")
```

This command will create a new Pluto notebook (named "xpalm_notebook.jl") in the current directory, and open it automatically for you.
Expand All @@ -106,10 +106,10 @@ Once closed, you can re-open this notebook by running the same command again. If
Run a simple simulation using default parameters and meteorological data:

```julia
using XPalm, CSV, DataFrames
using XPalmModel, CSV, DataFrames

# Load example meteorological data
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalm))), "0-data/meteo.csv"), DataFrame)
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalmModel))), "0-data/meteo.csv"), DataFrame)

# Run simulation
df = xpalm(meteo, DataFrame;
Expand All @@ -127,13 +127,13 @@ Customize palm parameters and request multiple outputs:
```julia
# Read the parameters from a YAML file (provided in the example folder of the package). Note that parameter keys should be imported as `Symbol`s
using YAML
parameters = YAML.load_file(joinpath(dirname(dirname(pathof(XPalm))), "examples/xpalm_parameters.yml"); dicttype=Dict{Symbol,Any})
parameters = YAML.load_file(joinpath(dirname(dirname(pathof(XPalmModel))), "examples/xpalm_parameters.yml"); dicttype=Dict{Symbol,Any})

# Load example meteorological data
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalm))), "0-data/meteo.csv"), DataFrame)
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalmModel))), "0-data/meteo.csv"), DataFrame)

# Create palm with custom parameters
p = XPalm.Palm(parameters=parameters)
p = XPalmModel.Palm(parameters=parameters)

# Run simulation with multiple outputs
results = xpalm(
Expand Down Expand Up @@ -165,8 +165,8 @@ end
The models are available from the `Models` submodule. To import all models, you can use the following command:

```julia
using XPalm
using XPalm.Models
using XPalmModel
using XPalmModel.Models
```

#### More examples
Expand All @@ -191,13 +191,13 @@ This work is supported by the PalmStudio research project, funded by the [SMART
Documentation for the main functions of the XPalm package.

```@autodocs
Modules = [XPalm]
Modules = [XPalmModel]
```

### Models

Documentation for the models available in XPalm.

```@autodocs
Modules = [XPalm.Models]
Modules = [XPalmModel.Models]
```
6 changes: 3 additions & 3 deletions examples/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1863,16 +1863,16 @@ git-tree-sha1 = "a2fccc6559132927d4c5dc183e3e01048c6dcbd6"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.13.5+0"

[[deps.XPalm]]
[[deps.XPalmModel]]
deps = ["Dates", "MultiScaleTreeGraph", "PlantMeteo", "PlantSimEngine", "Random", "Statistics", "Tables"]
path = ".."
uuid = "6b523e1e-d512-416c-8e51-a8fbef0064e7"
version = "0.1.0"

[deps.XPalm.extensions]
[deps.XPalmModel.extensions]
XPalmPluto = "Pluto"

[deps.XPalm.weakdeps]
[deps.XPalmModel.weakdeps]
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"

[[deps.XSLT_jll]]
Expand Down
2 changes: 1 addition & 1 deletion examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ PlantMeteo = "4630fe09-e0fb-4da5-a846-781cb73437b6"
PlantSimEngine = "9a576370-710b-4269-adf9-4f603a9c6423"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
XPalm = "6b523e1e-d512-416c-8e51-a8fbef0064e7"
XPalmModel = "6b523e1e-d512-416c-8e51-a8fbef0064e7"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
8 changes: 4 additions & 4 deletions examples/run_XPalm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using PlantMeteo, PlantSimEngine, MultiScaleTreeGraph
using CairoMakie, AlgebraOfGraphics
using DataFrames, CSV, Statistics
using Dates
using XPalm
using XPalmModel

meteo = CSV.read("0-data/meteo", DataFrame)
meteo.duration = [Dates.Day(i[1:1]) for i in meteo.duration]
Expand All @@ -27,9 +27,9 @@ df = xpalm(m, DataFrame; vars=out_vars)

# Example 2.1: Run the model with custom parameter values from a YAML file:
using YAML, OrderedCollections
params = YAML.load_file(joinpath(dirname(dirname(pathof(XPalm))), "examples/xpalm_parameters.yml"), dicttype=OrderedDict{Symbol,Any})
params = YAML.load_file(joinpath(dirname(dirname(pathof(XPalmModel))), "examples/xpalm_parameters.yml"), dicttype=OrderedDict{Symbol,Any})
params[:k] = 0.6
p = XPalm.Palm(parameters=params)
p = XPalmModel.Palm(parameters=params)
df = xpalm(m, DataFrame; palm=p, vars=out_vars)

# Example 2.2: Run the model with custom parameter values from a JSON file:
Expand All @@ -38,7 +38,7 @@ params = open("examples/xpalm_parameters.json", "r") do io
JSON.parse(io; dicttype=OrderedDict{Symbol,Any}, inttype=Int64)
end
params[:k] = 0.6
p = XPalm.Palm(parameters=params)
p = XPalmModel.Palm(parameters=params)
df = xpalm(m, DataFrame; palm=p, vars=out_vars)

# Making some plots with the results:
Expand Down
4 changes: 2 additions & 2 deletions ext/XPalmPluto.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module XPalmPluto

import XPalm: notebook
import XPalmModel: notebook
import Pluto


Expand All @@ -10,7 +10,7 @@ function template_pluto_notebook(copyto; force=false)
else
cp(joinpath(@__DIR__, "template_notebook.jl"), copyto; force=force)
chmod(copyto, 0o777)
@info "New XPalm notebook created at $copyto"
@info "New XPalmModel notebook created at $copyto"
end

Pluto.run(notebook=copyto)
Expand Down
Loading

2 comments on commit ea404db

@VEZY
Copy link
Member Author

@VEZY VEZY commented on ea404db Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

This is the first release of the package. It is now in a stable enough version to register. Be careful though, it is not fully validated yet, nor properly calibrated.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/124462

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" ea404db52c61fc93332d6c6b844022bf984b6b4c
git push origin v0.1.0

Please sign in to comment.