https://github.com/clima/climautilities.jl
Shared utilities for the CliMA project
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Repository
Shared utilities for the CliMA project
Basic Info
- Host: GitHub
- Owner: CliMA
- License: apache-2.0
- Language: Julia
- Default Branch: main
- Homepage: https://clima.github.io/ClimaUtilities.jl/dev/
- Size: 8.49 MB
Statistics
- Stars: 9
- Watchers: 5
- Forks: 2
- Open Issues: 23
- Releases: 27
Metadata Files
README.md
ClimaUtilities.jl
[](https://github.com/CliMA/ClimaUtilities.jl/actions/workflows/ci.yml)
[](https://github.com/CliMA/ClimaUtilities.jl/actions/workflows/downstream.yml)
[](https://codecov.io/gh/CliMA/ClimaUtilities.jl)
[](https://clima.github.io/ClimaUtilities.jl/dev/)
[](http://juliapkgstats.com/pkg/ClimaUtilities)
ClimaUtilities is collection of general-purpose tools and types for CliMA packages.
ClimaUtilities.jl contains:
- ClimaArtifacts,
a module that provides an MPI-safe (with ClimaComms) way to lazily download
artifacts and to tag artifacts that are being accessed in a given simulation.
- TimeManager to
handle time and dates. TimeManager implements ITime, the time type used in
CliMA simulations.
- SpaceVaryingInputs and
TimeVaryingInputs to
work with external input data.
- DataStructures
with useful general purpose data structures.
- FileReaders,
DataHandling,
and Regridders
to process input data and remap it onto the simulation grid.
- OnlineLogging
to add output information while a simulation is running.
- OutputPathGenerator
to prepare the output directory structure of a simulation.
ClimaUtilities.jl Developer Guidelines
These guidelines aim to ensure consistent code quality, maintainability, and a
smooth collaborative workflow for ClimaUtilities.jl. Please, read these
guidelines even if you are familiar with other CliMA packages as there may be
some differences.
A key design principle
ClimaUtilities.jl is meant to be a foundational package, so it should have
near-zero-cost for features that are not explicitly requested. This means that
it should not depend on any package outside of the standard library and
ClimaComms and should have negligible import costs. To accomplish this,
everything is implemented in Julia extensions.
Extensions are organized in the following way. The extensions defined in the
Project.toml are defined in terms of the packages they require to be loaded.
This avoids circular dependencies among extensions. Each of these extensions
includes modules that match what is defined in src.
For example, ClimaUtilitiesClimaCoreNCDatasetsExt is loaded when ClimaCore
and NCDatasets are loaded. Internally, ClimaUtilitiesClimaCoreNCDatasetsExt
loads DataHandlingExt.jl, SpaceVaryingInputsExt.jl, and
TimeVaryingInputsExt.jl. Each of them implements methods defined in
src/DataHandling.jl, src/SpaceVaryingInputs.jl, and
src/TimeVaryingInputs.jl respectively
Tests and environments
We prioritize well-tested code to guarantee ClimaUtilities.jl functions
reliably. Here are some principles we follow:
Tests are collected in the test folder and are exclusively there
This means that:
- All the tests can be run with Pkg.test() or julia --project=test tests/runtests.jl;
- There are no special tests in the Buildkite pipeline;
- In fact, we use Buildkite only to run the tests with MPI/GPUs.
There are no checked-in Manifest.toml files
While checking in Manifest.toml files ensures reproducibility, it also
introduces some nuisance, including:
- lot of git/repository noise just for "up deps";
- multiple environments that have to be managed;
- busywork to keep the manifests updated.
In this repository, we have four environments: - project, - documentation, - test, - buildkite.
The buildkite environment, in .buildkite, contains everything that is required
to test ClimaUtilities.jl in its most general configuration (ie, including
CUDA.jl and MPI.jl). As the name suggests, this is the (only) environment
used by our Buildkite pipeline.
:note: Please, open an issue if you find workflow problems/friction with this system.
Running tests
There are two equivalent ways to run tests.
First, Start a Julia session in the ClimaUtilities directory:
sh
julia --project
Enter Pkg mode by typing ]. This will change the prompt. Run test.
Equivalently, you can run
sh
julia --project=test tests/runtests.jl
:note: Please, open an issue if you find workflow problems/friction with this system.
Code Formatting with JuliaFormatter.jl
One of the tests consists in checking that the code is uniformly formatted. We use JuliaFormatter.jl to achieve consistent formatting. Here's how to use it:
You can either install in your base environment with
sh
julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
or use it from within the TestEnv or the .buildkite environments (see previous section).
Then, you can format the package running:
julia
using JuliaFormatter; format(".")
or just with format(".") if the package is already imported.
The rules for formatting are defined in the .JuliaFormatter.toml.
If you are used to formatting from the command line instead of the REPL, you can
install JuliaFormatter in your base environment and call
sh
julia -e 'using JuliaFormatter; format(".")'
You could also define a shell alias
sh
alias julia_format_here="julia -e 'using JuliaFormatter; format(\".\")'"
:note: Please, open an issue if you find workflow problems/friction with this system.
Documentation
Documentation is generated with Documenter.jl. We strive to have complete and up-to-date information.
To generate documentation, run
sh
julia --project=docs docs/make.jl
Please, update the documentation if you add new features or change the behavior of existing ones.
Pull Request (PR) and commits
Here's how to structure your contributions effectively:
- Descriptive Title: Briefly summarize the changes your PR introduces. Commit titles should preferably be under 50 characters, start with a capital latter, and use imperative verbs (e.g., "Remove superfluous function call").
- Detailed Description: Explain the purpose of your changes. Focus on the intent.
- Breaking Changes: If your PR introduces breaking changes, highlight them clearly in the description.
Your pull request can contain one or multiple commits. In either cases, it is important that each commit is atomic (meaning that each commit represents a single logical change).
Please, squash commits that represent a single logical change (e.g., do not have two commits when the second just fixes the first).
Credits
The Space and TimeVaryingInputs modules were initially developed in the
context of ClimaLand, the
TempestRegridder and TimeManager ones were initially developed in
ClimaCoupler.
Owner
- Name: Climate Modeling Alliance
- Login: CliMA
- Kind: organization
- Email: clima@caltech.edu
- Website: https://clima.caltech.edu
- Repositories: 67
- Profile: https://github.com/CliMA
An alliance of scientists, engineers and applied mathematicians, dedicated to pioneering a new, data-informed approach to climate modeling
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Julia Sloan | j****n@c****u | 4 |
| Julia Sloan | 5****5 | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 63
- Total pull requests: 124
- Average time to close issues: 2 months
- Average time to close pull requests: 8 days
- Total issue authors: 9
- Total pull request authors: 9
- Average comments per issue: 0.81
- Average comments per pull request: 0.52
- Merged pull requests: 98
- Bot issues: 0
- Bot pull requests: 6
Past Year
- Issues: 26
- Pull requests: 67
- Average time to close issues: about 1 month
- Average time to close pull requests: 7 days
- Issue authors: 7
- Pull request authors: 8
- Average comments per issue: 0.23
- Average comments per pull request: 0.39
- Merged pull requests: 51
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
- Sbozzolo (29)
- juliasloan25 (14)
- ph-kev (5)
- charleskawczynski (5)
- imreddyTeja (5)
- kmdeck (1)
- a-charbon (1)
- dependabot[bot] (1)
- szy21 (1)
- JuliaTagBot (1)
- Julians42 (1)
Pull Request Authors
- Sbozzolo (120)
- juliasloan25 (27)
- imreddyTeja (20)
- ph-kev (15)
- dependabot[bot] (10)
- akshaysridhar (2)
- kmdeck (2)
- Julians42 (2)
- szy21 (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 148 total
- Total dependent packages: 2
- Total dependent repositories: 0
- Total versions: 27
juliahub.com: ClimaUtilities
Shared utilities for the CliMA project
- Homepage: https://clima.github.io/ClimaUtilities.jl/dev/
- Documentation: https://docs.juliahub.com/General/ClimaUtilities/stable/
- License: Apache-2.0
-
Latest release: 0.1.26
published 7 months ago
Rankings
Dependencies
- actions/checkout v4 composite
- dorny/paths-filter v3.0.2 composite
- julia-actions/setup-julia latest composite
- styfle/cancel-workflow-action 0.12.1 composite
- JuliaRegistries/TagBot v1 composite
- actions/cache v4 composite
- actions/checkout v4 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- actions/checkout v4 composite
- julia-actions/setup-julia latest composite