Skip to content

Commit

Permalink
Merge pull request #184 from CliMA/ne/hotfix
Browse files Browse the repository at this point in the history
Rename to ClimaParams.jl
  • Loading branch information
nefrathenrici authored Feb 23, 2024
2 parents f23a27f + 10037c3 commit 00f531f
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "ClimaParameters"
name = "ClimaParams"
uuid = "5c42b081-d73a-476f-9059-fd94b934656c"
authors = ["Climate Modeling Alliance"]
version = "0.10.0"
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ClimaParameters.jl
# ClimaParams.jl

Contains all universal constants and physical parameters in the [CliMA ecosystem](https://github.com/CliMA).

Expand All @@ -9,15 +9,15 @@ Contains all universal constants and physical parameters in the [CliMA ecosystem
| **GHA CI** | [![gha ci][gha-ci-img]][gha-ci-url] |
| **Code Coverage** | [![codecov][codecov-img]][codecov-url] |

[docs-bld-img]: https://github.com/CliMA/ClimaParameters.jl/actions/workflows/Docs.yml/badge.svg
[docs-bld-url]: https://github.com/CliMA/ClimaParameters.jl/actions/workflows/Docs.yml
[docs-bld-img]: https://github.com/CliMA/ClimaParams.jl/actions/workflows/Docs.yml/badge.svg
[docs-bld-url]: https://github.com/CliMA/ClimaParams.jl/actions/workflows/Docs.yml

[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
[docs-dev-url]: https://CliMA.github.io/ClimaParameters.jl/dev/
[docs-dev-url]: https://CliMA.github.io/ClimaParams.jl/dev/

[gha-ci-img]: https://github.com/CliMA/ClimaParameters.jl/actions/workflows/ci.yml/badge.svg
[gha-ci-url]: https://github.com/CliMA/ClimaParameters.jl/actions/workflows/ci.yml
[gha-ci-img]: https://github.com/CliMA/ClimaParams.jl/actions/workflows/ci.yml/badge.svg
[gha-ci-url]: https://github.com/CliMA/ClimaParams.jl/actions/workflows/ci.yml

[codecov-img]: https://codecov.io/gh/CliMA/ClimaParameters.jl/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/CliMA/ClimaParameters.jl
[codecov-img]: https://codecov.io/gh/CliMA/ClimaParams.jl/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/CliMA/ClimaParams.jl

2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[deps]
ClimaParameters = "5c42b081-d73a-476f-9059-fd94b934656c"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Expand Down
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ClimaParameters, Documenter
using ClimaParams, Documenter

pages = Any[
"Home" => "index.md",
Expand All @@ -23,17 +23,17 @@ format = Documenter.HTML(
)

makedocs(
sitename = "ClimaParameters.jl",
sitename = "ClimaParams.jl",
format = format,
clean = true,
checkdocs = :exports,
strict = true,
modules = [ClimaParameters],
modules = [ClimaParams],
pages = pages,
)

deploydocs(
repo = "github.com/CliMA/ClimaParameters.jl.git",
repo = "github.com/CliMA/ClimaParams.jl.git",
target = "build",
push_preview = true,
devbranch = "main",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/API.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# API

```@meta
CurrentModule = ClimaParameters
CurrentModule = ClimaParams
```

## Parameter dictionaries
Expand Down
10 changes: 5 additions & 5 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# ClimaParameters.jl
# ClimaParams.jl

This package contains all of the parameters used across the [CliMA](https://github.com/CliMA) organization. Some parameters are simply global constants (e.g., speed of light), while others are parameters that may be tuned in a machine-learning layer that sits on-top of the climate model.

## What parameters are good candidates for ClimaParameters?
## What parameters are good candidates for ClimaParams?

ClimaParameters serve several functionalities and require certain attributes. A parameter is a good candidate for ClimaParameters if it has _all_ of the following attributes:
ClimaParams serve several functionalities and require certain attributes. A parameter is a good candidate for ClimaParams if it has _all_ of the following attributes:

- The parameter does not vary in space
- The parameter does not vary in time (per climate simulation)
- The parameter is a function of only constants other ClimaParameters and or constants
- The parameter is a function of only constants other ClimaParams and or constants

## Getting Started

The basic flow is as follows:
1. Create the parameter dictionary with your desired floating point type
2. Retrieve parameters
```julia
import ClimaParameters as CP
import ClimaParams as CP
param_dict = CP.create_toml_dict(Float64)
params = CP.get_parameter_values(param_dict, ["gravitational_acceleration", "planet_radius"])
```
Expand Down
12 changes: 6 additions & 6 deletions docs/src/param_retrieval.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ There are two keys functions for parameter retrieval:
To construct a TOML dictionary, pass in the desired floating point type.
This will source parameter values from the global default list stored in `src/parameters.toml`
```julia
import ClimaParameters as CP
import ClimaParams as CP
toml_dict = CP.create_toml_dict(Float64)
```
To retrieve parameters, pass in the TOML dictionary and the names that match the default parameters.
Expand Down Expand Up @@ -52,7 +52,7 @@ params = CP.get_parameter_values(toml_dict, :gravitational_acceleration => :g,

#### In the user-facing driver file
```julia
import ClimaParameters
import ClimaParams
using Thermodynamics

thermo_params = ThermodynamicsParameters(Float64)
Expand Down Expand Up @@ -90,7 +90,7 @@ function ThermodynamicsParameters(toml_dict)
...
]

parameters = ClimaParameters.get_parameter_values(
parameters = ClimaParams.get_parameter_values(
toml_dict,
name_map,
"Thermodynamics",
Expand All @@ -114,12 +114,12 @@ end
Here we build a `CloudMicrophysics` parameter set. In this case, the user wishes to use a
0-moment microphysics parameterization scheme.
```julia
import ClimaParameters
import ClimaParams
import Thermodynamics
import CloudMicrophysics

#load defaults
toml_dict = ClimaParameters.create_toml_dict(Float64)
toml_dict = ClimaParams.create_toml_dict(Float64)

#build the low level parameter set
param_therm = Thermodynamics.Parameters.ThermodynamicsParameters(toml_dict)
Expand Down Expand Up @@ -169,7 +169,7 @@ function CloudMicrophysicsParameters(

parameter_names = [ "K_therm", ... ]

parameters = ClimaParameters.get_parameter_values(
parameters = ClimaParams.get_parameter_values(
toml_dict,
parameter_names,
"CloudMicrophysics",
Expand Down
12 changes: 6 additions & 6 deletions docs/src/toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The complete user interface consists of two files in `TOML` format
1. A user-defined experiment file - in the local experiment directory
2. A defaults file - in `src/` directory of `ClimaParameters.jl`
2. A defaults file - in `src/` directory of `ClimaParams.jl`

## Parameter style-guide

Expand Down Expand Up @@ -80,7 +80,7 @@ Here, the `value` field has been overwritten by the experiment value.

## File and parameter interaction with CliMA

`ClimaParameters.jl` provides several methods to parse, merge, and log parameter information.
`ClimaParams.jl` provides several methods to parse, merge, and log parameter information.

### Loading from file
We provide the following methods to load parameters from file
Expand All @@ -92,11 +92,11 @@ The `Float64` (or `Float32`) defines the requested precision of the returned par

Typical usage involves passing the local parameter file
```julia
import ClimaParameters
import ClimaParams
local_experiment_file = joinpath(@__DIR__,"local_exp_parameters.toml")
toml_dict = ClimaParameters.create_toml_dict(; override_file = local_experiment_file)
toml_dict = ClimaParams.create_toml_dict(; override_file = local_experiment_file)
```
If no file is passed it will use only the defaults from `ClimaParameters.jl` (causing errors if required parameters are not within this list).
If no file is passed it will use only the defaults from `ClimaParams.jl` (causing errors if required parameters are not within this list).

You can also pass Julia `Dicts` directly to `override_filepath` and `default_filepath`.

Expand All @@ -118,7 +118,7 @@ therm_params = Thermodynamics.ThermodynamicsParameters(toml_dict)
#... build(thermodynamics model,therm_params)

log_file = joinpath(@__DIR__,"parameter_log.toml")
ClimaParameters.log_parameter_information(toml_dict,log_file)
ClimaParams.log_parameter_information(toml_dict,log_file)

# ... run(thermodynamics_model)
```
Expand Down
2 changes: 1 addition & 1 deletion src/ClimaParameters.jl → src/ClimaParams.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ClimaParameters
module ClimaParams

using TOML
using DocStringExtensions
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[deps]
ClimaParameters = "5c42b081-d73a-476f-9059-fd94b934656c"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"

Expand Down
2 changes: 1 addition & 1 deletion test/param_boxes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module ParameterBoxes

using Test

import ClimaParameters as CP
import ClimaParams as CP

Base.@kwdef struct ParameterBox{FT}
molmass_dryair::FT
Expand Down
2 changes: 1 addition & 1 deletion test/test_map.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Test
import ClimaParameters as CP
import ClimaParams as CP
import Thermodynamics.Parameters.ThermodynamicsParameters

@testset "name map tests" begin
Expand Down
2 changes: 1 addition & 1 deletion test/test_merge.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test

import ClimaParameters as CP
import ClimaParams as CP

@testset "Merge correctness" begin

Expand Down
2 changes: 1 addition & 1 deletion test/test_tags.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ClimaParameters as CP
import ClimaParams as CP
using Test

override_file = joinpath("toml", "tags.toml")
Expand Down
2 changes: 1 addition & 1 deletion test/toml_consistency.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test

import ClimaParameters as CP
import ClimaParams as CP

# read parameters needed for tests
full_parameter_set = CP.create_toml_dict(Float64)
Expand Down
2 changes: 1 addition & 1 deletion test/types_from_file.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test

import ClimaParameters as CP
import ClimaParams as CP

path_to_params = joinpath(@__DIR__, "toml", "typed_parameters.toml")

Expand Down

2 comments on commit 00f531f

@nefrathenrici
Copy link
Member Author

Choose a reason for hiding this comment

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

@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/101550

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

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.10.0 -m "<description of version>" 00f531fbb0c49dd97895e15b93ee2ecdab973624
git push origin v0.10.0

Also, note the warning: This looks like a new registration that registers version 0.10.0.
Ideally, you should register an initial release with 0.0.1, 0.1.0 or 1.0.0 version numbers
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.