Skip to content

Commit

Permalink
fix: typos (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian authored Sep 5, 2024
1 parent adf8465 commit 00ae495
Show file tree
Hide file tree
Showing 45 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ You can [join our discord server via this link][chat-url].

Rattler consists of several crates that provide different functionalities.

* **rattler_conda_types**: foundational types for all datastructures used withing the conda eco-system.
* **rattler_conda_types**: foundational types for all datastructures used within the conda eco-system.
* **rattler_package_streaming**: provides functionality to download, extract and create conda package archives.
* **rattler_repodata_gateway**: downloads, reads and processes information about existing conda packages from an index.
* **rattler_shell**: code to activate an existing environment and run programs in it.
Expand Down
4 changes: 2 additions & 2 deletions crates/file_url/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn url_to_path(url: &Url) -> Option<PathBuf> {
Some(host) => Some(host),
};

let (mut path, seperator) = if let Some(host) = host {
let (mut path, separator) = if let Some(host) = host {
// A host is only present for Windows UNC paths
(format!("\\\\{host}\\"), "\\")
} else {
Expand All @@ -69,7 +69,7 @@ pub fn url_to_path(url: &Url) -> Option<PathBuf> {

for (idx, segment) in segments.enumerate() {
if idx > 0 {
path.push_str(seperator);
path.push_str(separator);
}
match String::from_utf8(percent_decode(segment.as_bytes()).collect()) {
Ok(s) => path.push_str(&s),
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler-bin/src/commands/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub async fn create(opt: Opt) -> anyhow::Result<()> {
);

// Determine virtual packages of the system. These packages define the capabilities of the
// system. Some packages depend on these virtual packages to indiciate compability with the
// system. Some packages depend on these virtual packages to indicate compatibility with the
// hardware of the system.
let virtual_packages = wrap_in_progress("determining virtual packages", move || {
if let Some(virtual_packages) = opt.virtual_package {
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler/src/cli/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub struct Args {
/// Authentication errors that can be returned by the `AuthenticationCLIError`
#[derive(thiserror::Error, Debug)]
pub enum AuthenticationCLIError {
/// An error occured when the input repository URL is parsed
/// An error occurred when the input repository URL is parsed
#[error("Failed to parse the URL")]
ParseUrlError(#[from] url::ParseError),

Expand Down
2 changes: 1 addition & 1 deletion crates/rattler/src/install/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl InstallDriver {
Ok(None)
}

/// Runs a blocking task that will execute on a seperate thread. The task is
/// Runs a blocking task that will execute on a separate thread. The task is
/// not started until an IO permit is acquired. This is used to make
/// sure that the system doesn't try to acquire more IO resources than
/// the system has available.
Expand Down
4 changes: 2 additions & 2 deletions crates/rattler/src/install/installer/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub enum InstallerError {
#[error("failed to unlink {0}")]
UnlinkError(String, #[source] UnlinkError),

/// A generic IO error occured
/// A generic IO error occurred
#[error("{0}")]
IoError(String, #[source] std::io::Error),

Expand All @@ -43,7 +43,7 @@ pub enum InstallerError {
#[error("post-processing failed")]
PostProcessingFailed(#[source] PrePostLinkError),

/// A clobbering error occured
/// A clobbering error occurred
#[error("failed to unclobber clobbered files")]
ClobberError(#[from] ClobberError),

Expand Down
2 changes: 1 addition & 1 deletion crates/rattler/src/install/installer/reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub trait Reporter: Send + Sync {
/// to `on_transaction_start`.
fn on_link_start(&self, operation: usize, record: &RepoDataRecord) -> usize;

/// Called when linking of a package compelted.
/// Called when linking of a package completed.
///
/// The `index` is the value return by `on_link_start` for the corresponding
/// package.
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler/src/install/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub struct InstallOptions {

/// Whether or not to use symbolic links where possible. If this is set to
/// `Some(false)` symlinks are disabled, if set to `Some(true)` symbolic
/// links are alwas used when specified in the [`info/paths.json`] file
/// links are always used when specified in the [`info/paths.json`] file
/// even if this is not supported. If the value is set to `None`
/// symbolic links are only used if they are supported.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! first conceived. Rattler is an attempt at reimplementing a lot of the
//! machinery supporting Conda but making it available to a wider range of
//! languages. The goal is to be able to integrate the Conda ecosystem in a wide
//! variaty of tools that do not rely on Python. Rust has excellent support for
//! variety of tools that do not rely on Python. Rust has excellent support for
//! interfacing with many other languages (WASM, Javascript, Python, C, etc) and
//! is therefore a good candidate for a reimplementation.
#![deny(missing_docs)]
Expand Down
4 changes: 2 additions & 2 deletions crates/rattler/src/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,12 +621,12 @@ mod tests {
}

#[test]
fn intesection_of_complements_is_none(range in strategy()) {
fn intersection_of_complements_is_none(range in strategy()) {
assert_eq!(range.negate().intersection(&range), Range::none());
}

#[test]
fn intesection_contains_both(r1 in strategy(), r2 in strategy(), version in version_strat()) {
fn intersection_contains_both(r1 in strategy(), r2 in strategy(), version in version_strat()) {
assert_eq!(r1.intersection(&r2).contains(&version), r1.contains(&version) && r2.contains(&version));
}

Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_cache/src/package_cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub enum PackageCacheError {
#[error(transparent)]
FetchError(#[from] Arc<dyn std::error::Error + Send + Sync + 'static>),

/// A locking error occured
/// A locking error occurred
#[error("{0}")]
LockError(String, #[source] std::io::Error),

Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_conda_types/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.20.4](https://github.com/conda/rattler/compare/rattler_conda_types-v0.20.3...rattler_conda_types-v0.20.4) - 2024-03-30

### Fixed
- matchspec empty namespace and channel cannonical name ([#582](https://github.com/conda/rattler/pull/582))
- matchspec empty namespace and channel canonical name ([#582](https://github.com/conda/rattler/pull/582))

## [0.20.3](https://github.com/conda/rattler/compare/rattler_conda_types-v0.20.2...rattler_conda_types-v0.20.3) - 2024-03-21

Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_conda_types/src/channel_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct ChannelData {
/// A mapping of all packages in the channel
pub packages: HashMap<String, ChannelDataPackage>,

/// The availalble subdirs for this channel
/// The available subdirs for this channel
#[serde(default)]
pub subdirs: Vec<String>,
}
Expand Down
4 changes: 2 additions & 2 deletions crates/rattler_conda_types/src/match_spec/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ fn split_version_and_build(
))(input)
}

fn parse_version_and_build_seperator<'a, E: ParseError<&'a str> + ContextError<&'a str>>(
fn parse_version_and_build_separator<'a, E: ParseError<&'a str> + ContextError<&'a str>>(
strictness: ParseStrictness,
) -> impl FnMut(&'a str) -> IResult<&'a str, &'a str, E> {
move |input: &'a str| {
Expand All @@ -374,7 +374,7 @@ fn split_version_and_build(
}
}

match parse_version_and_build_seperator(strictness)(input).finish() {
match parse_version_and_build_separator(strictness)(input).finish() {
Ok((rest, version)) => {
let build_string = rest.trim();

Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_conda_types/src/version/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ impl Version {
}

/// Returns the number of segments in the version. Segments are the part of the version
/// seperated by dots or dashes.
/// separated by dots or dashes.
pub fn segment_count(&self) -> usize {
if let Some(local_index) = self.local_segment_index() {
local_index
Expand Down
4 changes: 2 additions & 2 deletions crates/rattler_conda_types/src/version/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ pub enum ParseVersionErrorKind {
/// Expected a version component
#[error("expected a version component e.g. `2` or `rc`")]
ExpectedComponent,
/// Expected a segment seperator
/// Expected a segment separator
#[error("expected a '.', '-', or '_'")]
ExpectedSegmentSeparator,
/// Cannot mix and match dashes and underscores
#[error("cannot use both underscores and dashes as version segment seperators")]
#[error("cannot use both underscores and dashes as version segment separators")]
CannotMixAndMatchDashesAndUnderscores,
/// Expected the end of the string
#[error("encountered more characters but expected none")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ expression: index_map
},
),
"1-2-3_": Error(
"cannot use both underscores and dashes as version segment seperators",
"cannot use both underscores and dashes as version segment separators",
),
"1-2_3": Error(
"cannot use both underscores and dashes as version segment seperators",
"cannot use both underscores and dashes as version segment separators",
),
"1-_": Error(
"cannot use both underscores and dashes as version segment seperators",
"cannot use both underscores and dashes as version segment separators",
),
"1.0.1-": Version(
Version {
Expand Down Expand Up @@ -79,7 +79,7 @@ expression: index_map
},
),
"1_-": Error(
"cannot use both underscores and dashes as version segment seperators",
"cannot use both underscores and dashes as version segment separators",
),
"1_2_3": Version(
Version {
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_conda_types/src/version_spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub enum VersionOperators {
Exact(EqualityOperator),
}

/// Logical operator used two compare groups of version comparisions. E.g.
/// Logical operator used two compare groups of version comparisons. E.g.
/// `>=3.4,<4.0` or `>=3.4|<4.0`,
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Serialize, Deserialize)]
pub enum LogicalOperator {
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_conda_types/src/version_spec/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn logical_constraint_parser(
// sense (e.g. ``>=*``) but they do exist in the wild. This code here
// tries to map it to something that at least makes some sort of sense.
// But this is not the case for everything, for instance what
// what is ment with `!=*` or `<*`?
// what is meant with `!=*` or `<*`?
// See: https://github.com/AnacondaRecipes/repodata-hotfixes/issues/220
if version_str == "*" {
let op = op.expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl<'a> TryFrom<&'a str> for VersionTree<'a> {
}
}

/// Parses a group of version constraints seperated by ,s
/// Parses a group of version constraints separated by ,s
fn parse_and_group<'a, E: ParseError<&'a str> + ContextError<&'a str>>(
input: &'a str,
) -> Result<(&'a str, VersionTree<'_>), nom::Err<E>> {
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_lock/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl LockFileBuilder {
version: FileFormatVersion::LATEST,
conda_packages: self.conda_packages.into_iter().collect(),
pypi_packages: self.pypi_packages.into_iter().collect(),
pypi_environment_package_datas: self
pypi_environment_package_data: self
.pypi_runtime_configurations
.into_iter()
.map(Into::into)
Expand Down
8 changes: 4 additions & 4 deletions crates/rattler_lock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct LockFileInner {
environments: Vec<EnvironmentData>,
conda_packages: Vec<CondaPackageData>,
pypi_packages: Vec<PypiPackageData>,
pypi_environment_package_datas: Vec<PypiPackageEnvironmentData>,
pypi_environment_package_data: Vec<PypiPackageEnvironmentData>,

environment_lookup: FxHashMap<String, usize>,
}
Expand Down Expand Up @@ -319,7 +319,7 @@ impl Environment {
EnvironmentPackageData::Conda(_) => None,
EnvironmentPackageData::Pypi(pkg_data_idx, env_data_idx) => Some((
self.inner.pypi_packages[*pkg_data_idx].clone(),
self.inner.pypi_environment_package_datas[*env_data_idx].clone(),
self.inner.pypi_environment_package_data[*env_data_idx].clone(),
)),
})
.collect();
Expand Down Expand Up @@ -392,7 +392,7 @@ impl Environment {
EnvironmentPackageData::Conda(_) => None,
EnvironmentPackageData::Pypi(package_idx, env_idx) => Some((
self.inner.pypi_packages[*package_idx].clone(),
self.inner.pypi_environment_package_datas[*env_idx].clone(),
self.inner.pypi_environment_package_data[*env_idx].clone(),
)),
})
.collect(),
Expand Down Expand Up @@ -597,7 +597,7 @@ impl PypiPackage {

/// Returns the runtime data from the internal data structure.
fn environment_data(&self) -> &PypiPackageEnvironmentData {
&self.inner.pypi_environment_package_datas[self.runtime_index]
&self.inner.pypi_environment_package_data[self.runtime_index]
}

/// Returns the package data from the internal data structure.
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_lock/src/parse/deserialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pub fn parse_from_document(
environment_lookup,
conda_packages,
pypi_packages,
pypi_environment_package_datas: pypi_runtime_lookup
pypi_environment_package_data: pypi_runtime_lookup
.into_iter()
.map(Into::into)
.collect(),
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_lock/src/parse/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl Serialize for LockFile {
) => {
let pypi_package = &inner.pypi_packages[pypi_index];
let pypi_runtime = &inner
.pypi_environment_package_datas
.pypi_environment_package_data
[pypi_runtime_index];
SerializablePackageSelector::Pypi {
pypi: &pypi_package.url_or_path,
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_lock/src/parse/v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ pub fn parse_v3_or_lower(
version,
conda_packages: conda_packages.into_iter().collect(),
pypi_packages: pypi_packages.into_iter().collect(),
pypi_environment_package_datas: pypi_runtime_configs
pypi_environment_package_data: pypi_runtime_configs
.into_iter()
.map(Into::into)
.collect(),
Expand Down
4 changes: 2 additions & 2 deletions crates/rattler_package_streaming/src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn extract_tar_bz2(
) -> Result<ExtractResult, ExtractError> {
std::fs::create_dir_all(destination).map_err(ExtractError::CouldNotCreateDestination)?;

// Wrap the reading in aditional readers that will compute the hashes of the file while its
// Wrap the reading in additional readers that will compute the hashes of the file while its
// being read.
let sha256_reader = rattler_digest::HashingReader::<_, rattler_digest::Sha256>::new(reader);
let mut md5_reader =
Expand All @@ -54,7 +54,7 @@ pub fn extract_conda_via_streaming(
// Construct the destination path if it doesnt exist yet
std::fs::create_dir_all(destination).map_err(ExtractError::CouldNotCreateDestination)?;

// Wrap the reading in aditional readers that will compute the hashes of the file while its
// Wrap the reading in additional readers that will compute the hashes of the file while its
// being read.
let sha256_reader = rattler_digest::HashingReader::<_, rattler_digest::Sha256>::new(reader);
let mut md5_reader =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl CacheHeaders {
if let Some(last_modified) = self
.last_modified
.as_deref()
.and_then(|last_modifed| HeaderValue::from_str(last_modifed).ok())
.and_then(|last_modified| HeaderValue::from_str(last_modified).ok())
{
headers.insert(header::IF_MODIFIED_SINCE, last_modified);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_repodata_gateway/src/fetch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ fn validate_cached_state(
return ValidatedCacheState::InvalidOrMissing;
}
Err(e) => {
// An error occured while reading the cached state.
// An error occurred while reading the cached state.
tracing::warn!(
"invalid repodata cache state '{}': {e}. Ignoring cached files...",
cache_state_path.display()
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_repodata_gateway/src/gateway/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ mod test {
}

#[tokio::test]
async fn test_flter_with_specs() {
async fn test_filter_with_specs() {
let gateway = Gateway::new();

let index = local_conda_forge().await;
Expand Down
Loading

0 comments on commit 00ae495

Please sign in to comment.