Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ env:
CARGO_TERM_COLOR: always

jobs:
rustfmt:
typos:
name: Spell checking (typos)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/[email protected]
name: rustfmt
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[files]
extend-exclude = ["netcdf-src/source", "netcdf-sys"]

[default]
extend-ignore-identifiers-re = [
"Dout",
"is_ambigous", # Remove when deprecated item is removed
]
6 changes: 6 additions & 0 deletions netcdf/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,15 @@ pub enum Error {
impl Error {
/// Was the error due to ambiguity of the
/// indices or lengths?
#[deprecated(note = "This item has a typo, use is_ambiguous instead")]
pub fn is_ambigous(&self) -> bool {
matches!(self, Self::Ambiguous)
}
/// Was the error due to ambiguity of the
/// indices or lengths?
pub fn is_ambiguous(&self) -> bool {
matches!(self, Self::Ambiguous)
}
}

impl std::error::Error for Error {
Expand Down
2 changes: 1 addition & 1 deletion netcdf/src/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use super::variable::{Variable, VariableMut};

/// Main component of the netcdf format. Holds all variables,
/// attributes, and dimensions. A group can always see the parents items,
/// but a parent can not access a childs items.
/// but a parent can not access the childrens items.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// but a parent can not access the childrens items.
/// but a parent can not access the children's items.

(and parent's items above)

#[derive(Debug, Clone)]
pub struct Group<'f> {
pub(crate) ncid: nc_type,
Expand Down
2 changes: 1 addition & 1 deletion netcdf/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ pub(crate) fn read_type(ncid: nc_type, xtype: nc_type) -> Result<NcVariableType>
fields,
}))
}
_ => panic!("Unexcepted base type {base_xtype}"),
_ => panic!("Unexpected base type {base_xtype}"),
}
}

Expand Down
6 changes: 3 additions & 3 deletions netcdf/src/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl<'g> Variable<'g> {
}

/// Access the variable in independent mode
/// for parallell reading using MPI.
/// for parallel reading using MPI.
/// File must have been opened using `open_par`
///
/// This is the default access mode
Expand All @@ -200,7 +200,7 @@ impl<'g> Variable<'g> {
self.access_mode(crate::par::AccessMode::Independent)
}
/// Access the variable in collective mode
/// for parallell reading using MPI.
/// for parallel reading using MPI.
/// File must have been opened using `open_par`
#[cfg(feature = "mpi")]
pub fn access_collective(&self) -> error::Result<()> {
Expand Down Expand Up @@ -766,7 +766,7 @@ impl<'g> VariableMut<'g> {
start.push(item.start);
if arr_len != item.count {
if arr_len > item.count && item.is_growable && !item.is_upwards_limited {
// Item is allowed to grow to accomodate the
// Item is allowed to grow to accommodate the
// extra values in the array
} else {
return Err(format!(
Expand Down