diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95eaecf199..53f4cab039 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,3 +43,11 @@ repos: rev: v0.6.13 hooks: - id: cmake-format + - repo: https://github.com/Quantco/pre-commit-mirrors-typos + rev: 1.20.8 + hooks: + - id: typos-conda + exclude: (CHANGELOG.md) + # In case of ambiguity (multiple possible corrections), `typos` will just report it to the user and move on without applying/writing any changes. + # cf. https://github.com/crate-ci/typos + args: [ --write-changes ] diff --git a/Taskfile.dist.yml b/Taskfile.dist.yml index d3949156d5..b4c9bfbbc3 100644 --- a/Taskfile.dist.yml +++ b/Taskfile.dist.yml @@ -266,7 +266,7 @@ tasks: desc: Regenerate libmambapy typing stubs. summary: | Regenerate the stub `*.pyi` stubs files providing Python typing information. - If this command creates any changes, the modifications needs to be commited. + If this command creates any changes, the modifications needs to be committed. deps: [install-py] cmds: - '{{.TEST_RUN}} python -m pybind11_stubgen -o "{{.BUILD_DIR}}/stubs" libmambapy.core.bindings' @@ -315,7 +315,7 @@ tasks: clean: desc: Remove files generated by Task commands. summary: | - Remove files generated by Task commnds. Some files and folder generated by tools may still + Remove files generated by Task commands. Some files and folder generated by tools may still remain. To entirely clean the repository, run: git clean -xdn diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000000..7ceceeee72 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,7 @@ +[default.extend-words] +# False positives to ignore +eit = "eit" +pn = "pn" +Ome = "Ome" +haa = "haa" +"fo" = "fo" diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index a5637ef7ac..61ccbca8ea 100644 --- a/cmake/CompilerWarnings.cmake +++ b/cmake/CompilerWarnings.cmake @@ -27,7 +27,7 @@ function(mamba_target_add_compile_warnings target) /external:W1 # Baseline reasonable warnings /W4 - # "identfier": conversion from "type1" to "type1", possible loss of data + # "identifier": conversion from "type1" to "type1", possible loss of data /w14242 # "operator": conversion from "type1:field_bits" to "type2:field_bits", possible loss of # data @@ -117,7 +117,7 @@ function(mamba_target_add_compile_warnings target) set( gcc_warnings ${clang_warnings} - # Warn if identation implies blocks where blocks do not exist + # Warn if indentation implies blocks where blocks do not exist -Wmisleading-indentation # Warn if if / else chain has duplicated conditions -Wduplicated-cond diff --git a/cmake/LinkTimeOptimization.cmake b/cmake/LinkTimeOptimization.cmake index d42d5866ed..616f05f821 100644 --- a/cmake/LinkTimeOptimization.cmake +++ b/cmake/LinkTimeOptimization.cmake @@ -4,7 +4,7 @@ include(CheckIPOSupported) # Detect is setting Link Time Optimization is recommended. # -# Currenlty checks if LTO is supported and if the build is a release. +# Currently checks if LTO is supported and if the build is a release. function(mamba_should_lto) # Names of option parameters (without arguments) set(options) diff --git a/dev/CMakePresetsMamba.json b/dev/CMakePresetsMamba.json index 08709b2561..8af4155b46 100644 --- a/dev/CMakePresetsMamba.json +++ b/dev/CMakePresetsMamba.json @@ -54,7 +54,7 @@ "CMAKE_C_COMPILER_LAUNCHER": "ccache", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" }, - "description": "Extra convenience flags used when developping", + "description": "Extra convenience flags used when developing", "displayName": "Mamba Dev", "hidden": true, "name": "mamba-dev", diff --git a/docs/source/advanced_usage/more_concepts.rst b/docs/source/advanced_usage/more_concepts.rst index f194608827..aab5e2ae7c 100644 --- a/docs/source/advanced_usage/more_concepts.rst +++ b/docs/source/advanced_usage/more_concepts.rst @@ -26,7 +26,7 @@ In the Mamba's context, it may points to a packages server, a :ref:`channel` structure that is used to classify and administrate more easily a packages server. +| A ``channel`` is an independent and isolated :ref:`repo` structure that is used to classify and administrate more easily a packages server. .. note:: A packages server may host one or multiple ``channels``. @@ -39,7 +39,7 @@ Subdir | A ``subdir`` is a :ref:`channel` subdirectory specific to a given operating system/platform pair. -Mamba is a general purpose, langage agnostic package manager. The ``subdir`` structure is a convenient way to provide and access packages depending on the targeted os and platform. +Mamba is a general purpose, language agnostic package manager. The ``subdir`` structure is a convenient way to provide and access packages depending on the targeted os and platform. Typically ``linux-64``, ``osx-arm64`` or ``win-64`` but not limited to those ones. @@ -96,7 +96,7 @@ The 3 kinds of *links* are: The advanced user may want to change that behavior using configuration (see the relevant CLI or API reference for more details): -- allow ``soft-links`` to be used as a prefered fallback to ``copy`` (try to ``copy`` if ``soft-link`` fails) +- allow ``soft-links`` to be used as a preferred fallback to ``copy`` (try to ``copy`` if ``soft-link`` fails) - use ``soft-links`` instead of ``hard-links`` as default behavior (``copy`` is still a fallback) - always ``copy`` instead of ``hard-links`` as default behavior (no fallback then) @@ -110,7 +110,7 @@ Hard-link ********* | A ``hard-link`` is the relation between a name/path and the actual file located on the file system. -| It is often used to describe additional ``hard-links`` pointed the same file, but the ownership of the file is shared accross all those links (equivalent to a C++ shared pointer): +| It is often used to describe additional ``hard-links`` pointed the same file, but the ownership of the file is shared across all those links (equivalent to a C++ shared pointer): - a reference counter is incremented when creating a new ``hard-link``, decremented when deleting one - the file system location is freed only when that counter decreases to 0 @@ -133,7 +133,7 @@ This is the most efficient way to link: There are some limitations to use ``hard-links``: - all the file systems are not supporting such links -- those links are not working accross file systems/partitions +- those links are not working across file systems/partitions .. _soft_link: @@ -145,7 +145,7 @@ Soft-link It is as efficient as a ``hard-link`` but has different properties: -- works accross a filesystem/partition boundaries +- works across a filesystem/partition boundaries - becomes invalid then the pointed name is deleted or moved (no shared ownership) diff --git a/docs/source/advanced_usage/package_resolution.rst b/docs/source/advanced_usage/package_resolution.rst index d02fc9f08f..951dc19899 100644 --- a/docs/source/advanced_usage/package_resolution.rst +++ b/docs/source/advanced_usage/package_resolution.rst @@ -61,4 +61,4 @@ For this example the default is the cpython build of numpy. However, currently c For the case where we want to simply install ``numpy``, we need to find which numpy variant installs the highest python package. In this case libsolv would decide for ``numpy-1.20-cpython38``. -If we install ``numpy python=3.7`` we have two potential variants: ``numpy-1.20-cpython37`` and ``numpy-1.20-pypy37``. In this case we need to inspect wether one of those two builds will require exclusively packages with a track_feature applied. And indeed, the ``pypy37`` package will have a requirement on ``python_abi 3.7 *pypy`` and **all** packages matching this requirement have a track_feature, so that it will be down-weighted. +If we install ``numpy python=3.7`` we have two potential variants: ``numpy-1.20-cpython37`` and ``numpy-1.20-pypy37``. In this case we need to inspect whether one of those two builds will require exclusively packages with a track_feature applied. And indeed, the ``pypy37`` package will have a requirement on ``python_abi 3.7 *pypy`` and **all** packages matching this requirement have a track_feature, so that it will be down-weighted. diff --git a/docs/source/developer_zone/changes-2.0.rst b/docs/source/developer_zone/changes-2.0.rst index f4dd482f0e..a3d94037f9 100644 --- a/docs/source/developer_zone/changes-2.0.rst +++ b/docs/source/developer_zone/changes-2.0.rst @@ -28,7 +28,7 @@ It now presents the same user interface and experience as ``micromamba``. Micromamba ********** -Micromamba recieves all new features and its CLI remains mostly unchanged. +Micromamba receives all new features and its CLI remains mostly unchanged. Breaking changes include: @@ -51,15 +51,15 @@ All code previously available in Python through ``import mamba`` has been remove Libmambapy (Python bindings) **************************** -The Python bindings to the C++ ``libamamba`` library remain available through ``import libmambapy``. +The Python bindings to the C++ ``libmamba`` library remain available through ``import libmambapy``. They are now considered the first class citizen to using Mamba in Python. -Changes inlcude: +Changes include: - The global ``Context``, previously available through ``Context()``, must now be accessed through ``Context.instance()``. What's more, it is required to be passed explicitly in a few more functions. Future version of ``libmambapy`` will continue in this direction until there are no global context. - In version 2, ``Context()`` will throw an exception to avoid hard to catch errors. + In version 2, ``Context()`` will throw an exception to allow catching errors more smoothly. - ``ChannelContext`` is no longer an implicit global variable. It must be constructed with one of ``ChannelContext.make_simple`` or ``ChannelContext.make_conda_compatible`` (with ``Context.instance`` as argument in most cases) @@ -81,11 +81,11 @@ Changes inlcude: A usage documentation page is available at :ref:`mamba_usage_solver`. - The redesign of the ``Pool``, which is now available as ``libmambapy.solver.libsolv.Database``. - The new interfaces makes it easier to create repositories without using other ``libmambapy`` + The new interfaces make it easier to create repositories without using other ``libmambapy`` objects. - ``Repo`` has been redesigned into a lightweight ``RepoInfo`` and moved to ``libmambapy.solver.libsolv``. - The creation and modification of repos happens through the ``Database``, with methods such as + The creation and modification of repos happen through the ``Database``, with methods such as ``Database.add_repo_from_repodata_json`` and ``Database.add_repo_from_packages``, but also high-level free functions such as ``load_subdir_in_database`` and ``load_installed_packages_in_database``. @@ -96,7 +96,7 @@ Changes inlcude: ``libmambapy.solver.libsolv.Unsolvable`` state from which rich error messages can be extracted. -For many changes, an exception throwing placeholder has ben kept to advise developpers on the new +For many changes, an exception throwing placeholders has been kept to advise developers on the new direction to take. Libmamba (C++) @@ -105,16 +105,16 @@ The C++ library ``libmamba`` has received significant changes. Due to the low usage of the C++ interface, all changes are not listed here. The main changes are: -- Refactoring and testing of a large number of utilities into a ``util::`` namespace, -- Creation of the ``specs::`` the items below. +- Refactoring and testing of a large number of utilities into a ``util::`` namespace. +- Creation of ``specs::`` including the items below. A usage documentation (in Python) is available at :ref:`mamba_usage_specs`. - Implementations of ``Version`` and ``VersionSpec`` for matching versions, - - A refactoring of a purely funcitonal ``Channel`` class, - - Implementaiton of a ``UnresolvedChannel`` to describe unresolved ``Channels``, + - A refactoring of a purely functional ``Channel`` class, + - Implementation of a ``UnresolvedChannel`` to describe unresolved ``Channels``, - A refactored and complete implementation of ``MatchSpec`` using the components above. -- A cleanup of ``ChannelContext`` for be a light proxy and parameter holder wrapping the +- A cleanup of ``ChannelContext`` to be a light proxy and parameter holder wrapping the ``specs::Channel``. - A new ``repodata.json`` parser using `simdjson `_. - The ``MPool``, ``MRepo`` and ``MSolver`` API has been completely redesigned into a ``solver`` diff --git a/docs/source/developer_zone/internals.rst b/docs/source/developer_zone/internals.rst index f1a83ab853..c2f75ea61e 100644 --- a/docs/source/developer_zone/internals.rst +++ b/docs/source/developer_zone/internals.rst @@ -301,7 +301,7 @@ Watches The possible decisions on solvables are ``installation`` or ``removal``/``conflict``, this is stored as resp. positive and negative Ids. -Related rules are then evaluated during another level of decision: those are the one with an opposite first litteral. +Related rules are then evaluated during another level of decision: those are the one with an opposite first literal. Example: diff --git a/docs/source/installation/micromamba-installation.rst b/docs/source/installation/micromamba-installation.rst index 509cb48f1d..78c084fde7 100644 --- a/docs/source/installation/micromamba-installation.rst +++ b/docs/source/installation/micromamba-installation.rst @@ -193,7 +193,7 @@ Build from source .. note:: - These instuction do not work currently on Windows, which requires a more complex hybrid build. + These instructions do not work currently on Windows, which requires a more complex hybrid build. For up-to-date instructions on Windows and Unix, consult the scripts in the `micromamba-feedstock `_. diff --git a/docs/source/tools/mermaid.py b/docs/source/tools/mermaid.py index e1fabd78d8..a96e928547 100644 --- a/docs/source/tools/mermaid.py +++ b/docs/source/tools/mermaid.py @@ -6,7 +6,7 @@ Modified for the purpose of CoSApp by the CoSApp team https://gitlab.com/cosapp/cosapp -Allow mermaid diagramas to be included in Sphinx-generated +Allow mermaid diagrams to be included in Sphinx-generated documents inline. :copyright: Copyright 2016 by Martín Gaitán and others, see AUTHORS. diff --git a/docs/source/usage/solver.rst b/docs/source/usage/solver.rst index f0771b1d98..1cfc269132 100644 --- a/docs/source/usage/solver.rst +++ b/docs/source/usage/solver.rst @@ -31,8 +31,8 @@ Packages are organised in repositories, described by a This serves to resolve explicit channel requirements or channel priority. As such, the database constructor takes a set of :cpp:type:`ChannelResolveParams ` -to work with :cpp:type:`Channel ` work with Channel data -internaly (see :ref:`the usage section on Channels ` for more +to work with :cpp:type:`Channel ` data +internally (see :ref:`the usage section on Channels ` for more information). The first way to add a repository is from a list of |PackageInfo| using @@ -55,10 +55,10 @@ The first way to add a repository is from a list of |PackageInfo| using name="myrepo", ) -The second way of loading packages is throuch Conda's reposoitory index format ``repodata.json`` +The second way of loading packages is through Conda's repository index format ``repodata.json`` using :cpp:func:`DataBase.add_repo_from_repodata `. -This is meant as a convenience and performant alternative to the former method, since these files +This is meant for convenience, and is not a performant alternative to the former method, since these files grow large. .. code:: python @@ -68,9 +68,9 @@ grow large. url="htts://conda.anaconda.org/conda-forge/linux-64", ) -One of the reppository can be set to have a special meaning of "installed repository". +One of the repositories can be set to have a special meaning of "installed repository". It is used as a reference point in the solver to compute changes. -For instance if a package is required but is already available in the installed repo, the solving +For instance, if a package is required but is already available in the installed repo, the solving result will not mention it. The function :cpp:func:`DataBase.set_installed_repo ` is @@ -88,9 +88,9 @@ such as source url and :cpp:type:`RepodataOrigin `, are stored inside the file when calling :cpp:func:`DataBase.native_serialize_repo ` . -Upon reading, similar parameters are expected as input to +Upon reading, similar parameters are expected as inputs to :cpp:func:`DataBase.add_repo_from_native_serialization `. -If they mistmatch, the loading results in an error. +If they mismatch, the loading results in an error. A typical wokflow first tries to load a repository from such binary cache, and then quietly fallbacks to ``repodata.json`` on failure. @@ -120,7 +120,7 @@ This includes installing, updating, removing packages, as well as solving cutomi Solving the request ------------------- The |Request| and the |Database| are the two input parameters needed to solve an environment. -This task is achieve with the :cpp:func:`Solver.solve ` +This task is achieved with the :cpp:func:`Solver.solve ` method. .. code:: python @@ -129,8 +129,8 @@ method. outcome = solver.solve(db, request) The outcome can be of two types, either a |Solution| listing packages (|Packageinfo|) and the -action to take on them (install, remove...), or an |UnSolvable| type when no solution exist -(because of conflict, missing pacakges...). +action to take on them (install, remove...), or an |UnSolvable| type when no solution exists +(because of conflict, missing packages...). Examine the solution ~~~~~~~~~~~~~~~~~~~~ @@ -168,10 +168,10 @@ Alternatively, an easy way to compute the update to the environment is to check Understand unsolvable problems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a problem as no |Solution|, it is inherenty hard to come up with an explanation. -In the easiest case, a requiered package is missing from the |Database|. +When a problem has no |Solution|, it is inherenty hard to come up with an explanation. +In the easiest case, a required package is missing from the |Database|. In the most complex, many package dependencies are incompatible without a single culprit. -In this case, packages should be rebuild with weaker requirements, or with more build variants. +In this case, packages should be rebuilt with weaker requirements, or with more build variants. The |UnSolvable| class attempts to build an explanation. The :cpp:func:`UnSolvable.problems ` is a list diff --git a/docs/source/usage/specs.rst b/docs/source/usage/specs.rst index 9f54ee941f..c154da9bae 100644 --- a/docs/source/usage/specs.rst +++ b/docs/source/usage/specs.rst @@ -13,7 +13,7 @@ Describing Conda Objects .. |MatchSpec| replace:: :cpp:type:`MatchSpec ` -The :any:`libmambapy.specs ` submodule contains object to *describe* abstraction in the Conda ecosystem. +The :any:`libmambapy.specs ` submodule contains objects to *describe* abstraction in the Conda ecosystem. They are purely functional and do not have any observable impact on the user system. For instance |Channel| is used to describe a channel but does not download any file. @@ -22,7 +22,7 @@ CondaURL The |CondaURL| is a rich URL object that has additional capabilities for dealing with tokens, platforms, and packages. -To parse a string into a |CondaURL| use :cpp:func:`CondaURL.parse ` +To parse a string into a |CondaURL|, use :cpp:func:`CondaURL.parse ` as follows: .. code:: python @@ -42,7 +42,7 @@ For instance, here the character ``!`` in the file name ``x264-1!164.3095-h166bd to be replaced with ``%21``. The getter functions, such as :cpp:func:`CondaURL.package ` automatically decoded it for us, but we can specify ``decode=False`` to keep the raw representation. -The setters follow the same logic, as described bellow. +The setters follow the same logic, as described below. .. code:: python @@ -99,7 +99,7 @@ representation of the string. By default, it will hide all credentials ) assert url.str(credentials="Remove") == "https://mamba.pm/" -Similarily the :cpp:func:`CondaURL.pretty_str ` returns a more +Similarly the :cpp:func:`CondaURL.pretty_str ` returns a more user-friendly string, but that may not be parsed back. @@ -110,7 +110,7 @@ A |UnresolvedChannel| is a lightweight object to represent a channel string, as the CLI or configuration. Since channels rely heavily on configuration options, this type can be used as a placeholder for a channel that has not been fully "resolved" to a specific location. -It does minimal parsing and can detect the type of ressource (an unresolved name, a URL, a file) +It does minimal parsing and can detect the type of resource (an unresolved name, a URL, a file) and the platform filters. .. code:: python @@ -180,7 +180,7 @@ There are no hard-coded names: You may have noticed that :cpp:func:`Channel.resolve ` returns multiple channels. -This is because of custom multichannel, a single name can return mutliple channels. +This is because of custom multichannels, a single name can return multiple channels. .. code:: python @@ -229,7 +229,7 @@ There can also be any number, such as in ``1.0.0alpha1dev3``. We can specify another *"local"* version, that we can separate with a ``+``, as in ``1.9.0+2.0.0``, but that is not widely used. Finally, there is also an epoch, similar to `PEP440 `_, to -accomodate for change in the versioning scheme. +accommodate for change in the versioning scheme. For instance, in ``1!2.0.3``, the epoch is ``1``. To sum up, a version like ``7!1.2a3.5b4dev+1.3.0``, can be parsed as: @@ -243,7 +243,7 @@ so ``1.2``, ``1.2.0``, and ``1.2.0.0`` are all considered equal. .. warning:: - The flexibility of conda versions (arguably too flexible) is meant to accomodate differences + The flexibility of conda versions (arguably too flexible) is meant to accommodate differences in various ecosystems. Library authors should stick to well defined version schemes such as `semantic versioning `_, @@ -283,7 +283,7 @@ We have the following primitives: Note that since ``1.2.4.0`` is the same as ``1.2.4``, this is also matched. - ``!=`` for **not equal** is the opposite, it matches all but the given version. For instance ``=!1.2.4`` matches ``1.2.5`` and ``1!1.2.4`` but not ``1.2.4``. -- ``>`` for **greater** matches versions stricly greater than the current one, for instance +- ``>`` for **greater** matches versions strictly greater than the current one, for instance ``>1.2.4`` matches ``2.0.0``, ``1!1.0.0``, but not ``1.1.0`` or ``1.2.4``. - ``>=`` for **greater or equal**. - ``<`` for **less**. @@ -299,7 +299,7 @@ We have the following primitives: all but the last parts specified, including zeros. For instance ``~=2.0`` matches ``2.0.0``, ``2.1.3``, but not ``3.0.1`` or ``2.0.0alpha``. -All version spec can be combine using a boolean grammar where ``|`` means **or** and ``,`` means +All version specs can be combined using a boolean grammar where ``|`` means **or** and ``,`` means **and**. For instance, ``(>2.1.0,<3.0)|==2.0.1`` means: @@ -333,15 +333,15 @@ To check if a given version matches a version spec, we use BuildNumberSpec --------------- -Similarily, a build number spec is a way to describe a set of build numbers. +Similarly, a build number spec is a way to describe a set of build numbers. It's much simpler than the |VersionSpec| in that it does not contain any boolean grammar (the ``,`` and ``|`` operators). -|BuildNumberSpec| only contain primitives similar to that used in |VersionSpec|: +|BuildNumberSpec| only contain primitives similar to those used in |VersionSpec|: - ``*`` or ``=*`` matches all build numbers (unrestricted). - ``=`` for **equal** matches build numbers equal to the given one (a singleton). - ``!=`` for **not equal**. -- ``>`` for **greater** matches versions stricly greater than the current one. +- ``>`` for **greater** matches versions strictly greater than the current one. - ``>=`` for **greater or equal**. - ``<`` for **less**. - ``<=`` for **less or equal**. @@ -387,10 +387,10 @@ Match specs have a complex string representation, which we can informally write with an example ``conda-forge:ns:python>=3.7=*cypthon[subdir="linux-64",fn=pkg.conda]``. -- ````, here ``conda-forge`` describes an |UnresolvedChannel| of where the channel the - package should come from. +- ````, here ``conda-forge``, describes an |UnresolvedChannel| where the package + should come from. It accepts all values from an unresolved channel, such as ``conda-forge/label/micromamba_dev``, - URLs, local file path, and platforms filters in between brackets. + URL, local file path, and platforms filters in between brackets. - ````, here ``ns`` is a future, not implemented, feature. It is nonetheless parsed, and retrievable. - ````, here ``python`` is the package name or glob expression and is the only mandatory @@ -400,8 +400,8 @@ with an example followed by a ```` glob specification, here ``*cpython``. - Last, a bracket section of comma separated ```` = ````. In the example, we have two attributes, ``subdir`` and ``fn``. - Attribute values support quaoting with ``"`` or ``'``. - As such, they can be useful to set previously mentioned field without ambiguity. + Attribute values support quoting with ``"`` or ``'``. + As such, they can be useful to set previously mentioned fields without ambiguity. Valid attribute names are: - ``channel``, similar to ````. @@ -410,7 +410,7 @@ with an example parentheses and ``,`` and ``|`` operators). - ``build``, similar to ````. - ``build_number`` to set the |BuildNumberSpec|. - - ``subdir`` to select the channel subdirectory platform from which the package must come from. + - ``subdir`` to select the channel subdirectory platform from which the package must come. - ``fn`` to select the filename the package must match. - ``md5`` to specify the MD5 hash the package archive must have. - ``sha256`` to specify the SHA256 hash the package archive must have. @@ -420,7 +420,7 @@ with an example .. warning:: - Specifying some value mulitple time, such as in ``python>=3.7[version="(=3.9|>3.11)"]``, or + Specifying some value multiple times, such as in ``python>=3.7[version="(=3.9|>3.11)"]``, or ``python[build="foo"][build="bar"]`` is undefined and subject to change in the future. .. warning:: @@ -435,13 +435,13 @@ with an example The method :cpp:func:`MatchSpec.contains_except_channel ` can be used to check if a package is contained (matched) by the current |MatchSpec|. -The somewhat verbose name serve to indicate that the channel is ignored in this function. -As mentionned in the :ref:`Channel section` resolving and matching channels +The somewhat verbose name serves to indicate that the channel is ignored in this function. +As mentioned in the :ref:`Channel section`, resolving and matching channels is a delicate operation. -In addition, the channel is a part that describe the **provenance** of a package and not is content -so various application ay want to handle it in different ways. +In addition, the channel is a part that describes the **provenance** of a package and not its content, +so various applications may want to handle it in different ways. The :cpp:func:`MatchSpec.channel ` attribute can be used to -reason about the possible channel contained in the |MatchSpec|. +reason about the possible channels contained in the |MatchSpec|. .. code:: python diff --git a/docs/source/user_guide/troubleshooting.rst b/docs/source/user_guide/troubleshooting.rst index 99b91b7408..d6cd6d8f01 100644 --- a/docs/source/user_guide/troubleshooting.rst +++ b/docs/source/user_guide/troubleshooting.rst @@ -118,7 +118,7 @@ Windows API historically supports paths up to 260 characters. While it's now pos Long paths support has to be activated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -source: Robocorp `troubleshooting documentation `_ +source: Robocop `troubleshooting documentation `_ 1. Open the Local Group Policy Editor application: - Start --> type gpedit.msc --> Enter: 2. Navigate to Computer Configuration > Administrative Templates > System > Filesystem. On the right, find the "Enable win32 long paths" item and double-click it diff --git a/libmamba/CMakeLists.txt b/libmamba/CMakeLists.txt index db0b28b3c4..5e8ae976b1 100644 --- a/libmamba/CMakeLists.txt +++ b/libmamba/CMakeLists.txt @@ -34,7 +34,7 @@ set( ) message(STATUS "Building libmamba v${${PROJECT_NAME}_VERSION}") -# Binary version See the following URL for explanations about the binary versionning +# Binary version See the following URL for explanations about the binary versioning # https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info file( STRINGS "${LIBMAMBA_INCLUDE_DIR}/mamba/version.hpp" libmamba_version_defines @@ -591,7 +591,7 @@ macro(libmamba_create_target target_name linkage output_name) yaml-cpp::yaml-cpp fmt::fmt # Since conda-forge spdlog is built with a bundled version of fmt we use the header - # only version to avoid chasing after the correct fmt version mathching the one used + # only version to avoid chasing after the correct fmt version matching the one used # in the bundle spdlog::spdlog_header_only PRIVATE diff --git a/libmamba/ext/solv-cpp/CMakeLists.txt b/libmamba/ext/solv-cpp/CMakeLists.txt index b838c9002e..4af07a432a 100644 --- a/libmamba/ext/solv-cpp/CMakeLists.txt +++ b/libmamba/ext/solv-cpp/CMakeLists.txt @@ -37,7 +37,7 @@ if(BUILD_LIBMAMBA_TESTS) endif() # Object libraries are installed as an interface library (in libmambaTargets) but do not install any -# objects (.o files) or headers without the ``OBJETS DESTINATION`` property. +# objects (.o files) or headers without the ``OBJECTS DESTINATION`` property. install( TARGETS solv-cpp EXPORT ${PROJECT_NAME}Targets diff --git a/libmamba/ext/solv-cpp/include/solv-cpp/pool.hpp b/libmamba/ext/solv-cpp/include/solv-cpp/pool.hpp index 980c38f85e..94262a88ed 100644 --- a/libmamba/ext/solv-cpp/include/solv-cpp/pool.hpp +++ b/libmamba/ext/solv-cpp/include/solv-cpp/pool.hpp @@ -31,7 +31,7 @@ namespace solv * Pool of solvable involved in resolving en environment. * * The pool contains the solvable (packages) information required from the ``::Solver``. - * The pool can be reused by multiple solvers to solve differents requirements with the same + * The pool can be reused by multiple solvers to solve different requirements with the same * ecosystem. */ class ObjPoolView @@ -118,7 +118,7 @@ namespace solv /** Get the registered version of a dependency. */ auto get_dependency_version(DependencyId id) const -> std::string_view; - /** Get the registered realtion between a dependency name and version. */ + /** Get the registered relation between a dependency name and version. */ auto get_dependency_relation(DependencyId id) const -> std::string_view; /** Compute the string representation of a dependency. */ @@ -129,7 +129,7 @@ namespace solv * * Create an index to retrieve the list of solvables satisfying a given dependency. * This is an expensive operation. - * The index is also computed over regular ``StringId``, in which case they reprensent + * The index is also computed over regular ``StringId``, in which case they represent * all packages that provide that name (without restriction on version). */ void create_whatprovides(); @@ -157,7 +157,7 @@ namespace solv * Add an entry to ``whatprovides``. * * This is the table that is looked up to know which solvables satistfy a given dependency. - * Entries set with this function get overriden by @ref create_whatprovides. + * Entries set with this function get overridden by @ref create_whatprovides. */ void add_to_whatprovides(DependencyId dep, OffsetId solvables); @@ -253,7 +253,7 @@ namespace solv * Set the installed repository. * * The installed repository represents package already installed. - * For instance, it is used to filter out the solvable that are alrady available after + * For instance, it is used to filter out the solvable that are already available after * a solve. */ void set_installed_repo(RepoId id); diff --git a/libmamba/ext/solv-cpp/include/solv-cpp/repo.hpp b/libmamba/ext/solv-cpp/include/solv-cpp/repo.hpp index 5ac90c4933..22f0540051 100644 --- a/libmamba/ext/solv-cpp/include/solv-cpp/repo.hpp +++ b/libmamba/ext/solv-cpp/include/solv-cpp/repo.hpp @@ -198,7 +198,7 @@ namespace solv * Set the version used for writing solv files. * * This has no effect for libsolv and is purely for data storing. - * It is up to the user to make comparsions with this attribute. + * It is up to the user to make comparisons with this attribute. * * @note A call to @ref ObjRepoView::internalize is required for this attribute to * be available for lookup. @@ -210,7 +210,7 @@ namespace solv * Clear all solvables from the repository. * * If @p reuse_ids is true, the solvable ids used in the pool can be reused for future - * solvables (incuding in other repositories). + * solvables (including in other repositories). */ void clear(bool reuse_ids) const; @@ -243,7 +243,7 @@ namespace solv * Remove a solvable from the repository. * * If @p reuse_id is true, the solvable id used in the pool can be reused for future - * solvables (incuding in other repositories). + * solvables (including in other repositories). */ auto remove_solvable(SolvableId id, bool reuse_id) const -> bool; diff --git a/libmamba/ext/solv-cpp/include/solv-cpp/solvable.hpp b/libmamba/ext/solv-cpp/include/solv-cpp/solvable.hpp index e919662996..97125721df 100644 --- a/libmamba/ext/solv-cpp/include/solv-cpp/solvable.hpp +++ b/libmamba/ext/solv-cpp/include/solv-cpp/solvable.hpp @@ -87,7 +87,7 @@ namespace solv * When the array is split in two using a maker, @p marker can be used to get * only a part of the the dependency array. * Use ``-1`` to get the first part, ``1`` to get the second part, and ``0`` to get - * eveything including the marker. + * everything including the marker. */ auto dependencies(DependencyMarker marker = -1) const -> ObjQueue; @@ -322,8 +322,8 @@ namespace solv * Set all constraints. * * A constraint is like a dependency that is not part of the solving outcome. - * In other words, if a solvable has a constraint, it is activated ony if another solvable - * in the solving requires that package as a dependencyl + * In other words, if a solvable has a constraint, it is only activated if another solvable + * in the solving requires that package as a dependency * * @warning The pool must be of type conda for this to have an impact in during solving * @ref ``ObjPool::set_disttype``. diff --git a/libmamba/ext/solv-cpp/src/queue.cpp b/libmamba/ext/solv-cpp/src/queue.cpp index a0970937a8..a6f0de120b 100644 --- a/libmamba/ext/solv-cpp/src/queue.cpp +++ b/libmamba/ext/solv-cpp/src/queue.cpp @@ -53,7 +53,7 @@ namespace solv auto ObjQueue::operator=(ObjQueue&& other) -> ObjQueue& { swap(*this, other); - // Leaving other empty to make sure ressources are no longer used + // Leaving other empty to make sure resources are no longer used auto empty = ObjQueue(nullptr); swap(other, empty); return *this; diff --git a/libmamba/ext/solv-cpp/tests/src/test_pool.cpp b/libmamba/ext/solv-cpp/tests/src/test_pool.cpp index 70fdf59fde..3ad96b0745 100644 --- a/libmamba/ext/solv-cpp/tests/src/test_pool.cpp +++ b/libmamba/ext/solv-cpp/tests/src/test_pool.cpp @@ -60,7 +60,7 @@ TEST_SUITE("solv::ObjPool") } } - SUBCASE("Find non-existant string") + SUBCASE("Find non-existent string") { CHECK_FALSE(pool.find_string("Bar").has_value()); } @@ -215,7 +215,7 @@ TEST_SUITE("solv::ObjPool") SUBCASE("Iterate on installed solvables") { - SUBCASE("No instaled repo") + SUBCASE("No installed repo") { pool.for_each_installed_solvable_id([&](SolvableId) { CHECK(false); }); } @@ -225,7 +225,7 @@ TEST_SUITE("solv::ObjPool") pool.set_installed_repo(repo1_id); std::vector ids = {}; pool.for_each_installed_solvable_id([&](auto id) { ids.push_back(id); }); - std::sort(ids.begin(), ids.end()); // Ease comparsion + std::sort(ids.begin(), ids.end()); // Ease comparison CHECK_EQ(ids, decltype(ids){ id1 }); } } diff --git a/libmamba/ext/solv-cpp/tests/src/test_transaction.cpp b/libmamba/ext/solv-cpp/tests/src/test_transaction.cpp index 88ded86586..6a228b9384 100644 --- a/libmamba/ext/solv-cpp/tests/src/test_transaction.cpp +++ b/libmamba/ext/solv-cpp/tests/src/test_transaction.cpp @@ -146,7 +146,7 @@ TEST_SUITE("solv::ObjTransaction") } ); - // Sorting for comaprison + // Sorting for comparison std::sort(solvables.begin(), solvables.end()); auto steps = trans.steps(); std::sort(steps.begin(), steps.end()); diff --git a/libmamba/include/mamba/api/configuration.hpp b/libmamba/include/mamba/api/configuration.hpp index a8a6b65f85..6d1d9ccf52 100644 --- a/libmamba/include/mamba/api/configuration.hpp +++ b/libmamba/include/mamba/api/configuration.hpp @@ -423,11 +423,11 @@ namespace mamba void clear_values(); /** - * Pop values that should have a single operation lifetime to avoid memroy effect + * Pop values that should have a single operation lifetime to avoid memory effect * between multiple operations. * It corresponds to CLI values in most of the cases, but may also include API * values if the `Configurable::has_single_op_lifetime` method returns true. - * RC files and environment variables are always overriden when loading the + * RC files and environment variables are always overridden when loading the * configuration. */ void operation_teardown(); diff --git a/libmamba/include/mamba/core/env_lockfile.hpp b/libmamba/include/mamba/core/env_lockfile.hpp index 869cc88017..8b4abc001f 100644 --- a/libmamba/include/mamba/core/env_lockfile.hpp +++ b/libmamba/include/mamba/core/env_lockfile.hpp @@ -27,12 +27,12 @@ namespace mamba enum class file_parsing_error_code { - unknown_failure, /// Something failed while parsing but we can't identify what. - unsuported_version, /// The version of the file does not matched supported ver. - parsing_failure, /// The content of the file doesnt match the expected format/language - /// structure or constraints. - invalid_data, /// The structure of the data in the file is fine but some fields have - /// invalid values for our purpose. + unknown_failure, /// Something failed while parsing but we can't identify what. + unsupported_version, /// The version of the file does not matched supported ver. + parsing_failure, /// The content of the file doesnt match the expected format/language + /// structure or constraints. + invalid_data, /// The structure of the data in the file is fine but some fields have + /// invalid values for our purpose. }; struct EnvLockFileError diff --git a/libmamba/include/mamba/core/error_handling.hpp b/libmamba/include/mamba/core/error_handling.hpp index 19ab76ea48..3be2e24f4f 100644 --- a/libmamba/include/mamba/core/error_handling.hpp +++ b/libmamba/include/mamba/core/error_handling.hpp @@ -71,7 +71,7 @@ namespace mamba error_list_t m_error_list; mutable std::string m_aggregated_message; - static constexpr const char* m_base_message = "Multiple errors occured:\n"; + static constexpr const char* m_base_message = "Multiple errors occurred:\n"; }; /******************************** @@ -277,7 +277,7 @@ namespace mamba } /*********************************** - * helper funcitons implementation * + * helper functions implementation * ***********************************/ template diff --git a/libmamba/include/mamba/core/execution.hpp b/libmamba/include/mamba/core/execution.hpp index 6d6b1af87a..82b9ca17f8 100644 --- a/libmamba/include/mamba/core/execution.hpp +++ b/libmamba/include/mamba/core/execution.hpp @@ -59,7 +59,7 @@ namespace mamba // Schedules a task for execution. // The task must be a callable which takes either the provided arguments or none. // If this executor is open, the task is scheduled for execution and will be called - // as soon as execution resources are available. The call to the task is not garanteed + // as soon as execution resources are available. The call to the task is not guaranteed // to have been done at the end of the execution of this function, nor before. // If this executor is closed, the task is ignored and no code will be executed nor the task // be called. @@ -81,7 +81,7 @@ namespace mamba // Moves ownership of a thread into this executor. // This is used in case a thread needs to be manipulated in a particular way, // but we still want to avoid having to use `std::thread::detach()`. By - // transfering the ownership of the thread to this executor, we are guaranteed that + // transferring the ownership of the thread to this executor, we are guaranteed that // the thread will be joined before the end of the lifetime of this executor. // If this executor is closed, no code will be executed and the thread will be destroyed, // resulting in a call to `std::terminate()` if the thread is not already joined. diff --git a/libmamba/include/mamba/core/mirror.hpp b/libmamba/include/mamba/core/mirror.hpp index e44fe7eacc..567d6154bf 100644 --- a/libmamba/include/mamba/core/mirror.hpp +++ b/libmamba/include/mamba/core/mirror.hpp @@ -104,7 +104,7 @@ namespace mamba std::chrono::system_clock::time_point m_next_retry; std::chrono::system_clock::duration m_retry_wait_seconds; std::size_t m_retry_backoff_factor; - // count number of retries (this is not the same as failed transfers, as mutiple + // count number of retries (this is not the same as failed transfers, as multiple // transfers can be started at the same time, but should all be retried only once) std::size_t m_retry_counter; diff --git a/libmamba/include/mamba/core/palette.hpp b/libmamba/include/mamba/core/palette.hpp index 180cbbfdf6..1eec8c2f13 100644 --- a/libmamba/include/mamba/core/palette.hpp +++ b/libmamba/include/mamba/core/palette.hpp @@ -13,9 +13,9 @@ namespace mamba { struct Palette { - /** Something that is possible or exsists. */ + /** Something that is possible or exists. */ fmt::text_style success; - /** Something that is impossible or does not exsist. */ + /** Something that is impossible or does not exist. */ fmt::text_style failure; /** Refers to external ecosystem. */ fmt::text_style external; diff --git a/libmamba/include/mamba/core/tasksync.hpp b/libmamba/include/mamba/core/tasksync.hpp index bcdb6ae0b5..dcb5224a64 100644 --- a/libmamba/include/mamba/core/tasksync.hpp +++ b/libmamba/include/mamba/core/tasksync.hpp @@ -31,7 +31,7 @@ namespace mamba - if this object is being joined and/or destroyed, it will block until any already started tasks are ended; - WARNING: When used as a member of a type to syncrhonized tasks of the `this` instance, it is + WARNING: When used as a member of a type to synchronized tasks of the `this` instance, it is best to set the TaskSynchronizer as the last member so that it is the first one to be destroyed; alternatively, `.join_tasks()` can be called manually in the destructor too. @@ -161,14 +161,14 @@ namespace mamba assert(!is_joined()); } - /** @return true if all synchronized tasks have beeen joined, false otherwise. @see + /** @return true if all synchronized tasks have been joined, false otherwise. @see * join_tasks(), reset()*/ bool is_joined() const { return !m_status && m_running_tasks == 0; } - /** @return Number of synchronized tasks which are currently beeing executed. */ + /** @return Number of synchronized tasks which are currently being executed. */ int64_t running_tasks() const { return m_running_tasks; diff --git a/libmamba/include/mamba/core/thread_utils.hpp b/libmamba/include/mamba/core/thread_utils.hpp index 784c80ce22..f0fc0f4960 100644 --- a/libmamba/include/mamba/core/thread_utils.hpp +++ b/libmamba/include/mamba/core/thread_utils.hpp @@ -60,7 +60,7 @@ namespace mamba // Waits until all other threads have finished // Must be called by the cleaning thread to ensure - // it won't free ressources that could be required + // it won't free resources that could be required // by threads still active. void wait_for_all_threads(); diff --git a/libmamba/include/mamba/core/util.hpp b/libmamba/include/mamba/core/util.hpp index c579ec88e7..fd83d79733 100644 --- a/libmamba/include/mamba/core/util.hpp +++ b/libmamba/include/mamba/core/util.hpp @@ -222,7 +222,7 @@ namespace mamba // { // print("locked file {}, locking counts: {}", some_path, // lock.count_lock_owners()); // success might mean we are locking the same path - // from multiple threads do_something(som_path); // locking was a success + // from multiple threads do_something(some_path); // locking was a success // } // else // locking didnt succeed for some reason // { @@ -232,7 +232,7 @@ namespace mamba // other reason, maybe a configuration option // } // some_more_work(some_path); // do this that the lock failed or not - // return lock; // The locking ownership can be transfered to another function if + // return lock; // The locking ownership can be transferred to another function if // necessary // } // diff --git a/libmamba/include/mamba/core/util_scope.hpp b/libmamba/include/mamba/core/util_scope.hpp index de09998eb1..4323aeb61c 100644 --- a/libmamba/include/mamba/core/util_scope.hpp +++ b/libmamba/include/mamba/core/util_scope.hpp @@ -29,11 +29,11 @@ namespace mamba } catch (const std::exception& ex) { - LOG_ERROR << fmt::format("Scope exit error (catched and ignored): {}", ex.what()); + LOG_ERROR << fmt::format("Scope exit error (caught and ignored): {}", ex.what()); } catch (...) { - LOG_ERROR << "Scope exit unknown error (catched and ignored)"; + LOG_ERROR << "Scope exit unknown error (caught and ignored)"; } } diff --git a/libmamba/include/mamba/download/mirror.hpp b/libmamba/include/mamba/download/mirror.hpp index 1648461df3..a9c21e23de 100644 --- a/libmamba/include/mamba/download/mirror.hpp +++ b/libmamba/include/mamba/download/mirror.hpp @@ -96,7 +96,7 @@ namespace mamba::download MirrorID m_id; size_t m_max_retries; - // TODO: use sychronized value + // TODO: use synchronized value std::mutex m_stats_mutex; std::optional m_allowed_connections = std::nullopt; std::size_t m_max_tried_connections = 0; diff --git a/libmamba/include/mamba/download/mirror_map.hpp b/libmamba/include/mamba/download/mirror_map.hpp index 0f96b0101f..5fdae26ebc 100644 --- a/libmamba/include/mamba/download/mirror_map.hpp +++ b/libmamba/include/mamba/download/mirror_map.hpp @@ -40,7 +40,7 @@ namespace mamba::download // Returns true if there are registered mirrors stored here, false if none are. bool has_mirrors(std::string_view mirror_name) const; - // Get a list of unique mirorrs if existing for the provided mirror name, or an empty list + // Get a list of unique mirrors if existing for the provided mirror name, or an empty list // otherwise. mirror_set_view get_mirrors(std::string_view mirror_name) const; diff --git a/libmamba/include/mamba/solver/libsolv/database.hpp b/libmamba/include/mamba/solver/libsolv/database.hpp index 7ccc3331bd..7dc4a0ecc0 100644 --- a/libmamba/include/mamba/solver/libsolv/database.hpp +++ b/libmamba/include/mamba/solver/libsolv/database.hpp @@ -46,7 +46,7 @@ namespace mamba::solver::libsolv * Database of solvable involved in resolving en environment. * * The database contains the solvable (packages) information required from the @ref Solver. - * The database can be reused by multiple solvers to solve differents requirements with the + * The database can be reused by multiple solvers to solve different requirements with the * same ecosystem. */ class Database diff --git a/libmamba/include/mamba/solver/libsolv/repo_info.hpp b/libmamba/include/mamba/solver/libsolv/repo_info.hpp index e20e55519a..e0c0d313a3 100644 --- a/libmamba/include/mamba/solver/libsolv/repo_info.hpp +++ b/libmamba/include/mamba/solver/libsolv/repo_info.hpp @@ -26,9 +26,9 @@ namespace mamba::solver::libsolv * * In libsolv, most of the data is help in the @ref Database, and repo are tightly coupled * with them. - * This repository class is a lightwight description of a repository returned when creating + * This repository class is a lightweight description of a repository returned when creating * a new repository in the @ref Database. - * Some modifications to the repo are possible throught the @ref Database. + * Some modifications to the repo are possible through the @ref Database. * @see Database::add_repo_from_repodata_json * @see Database::add_repo_from_packages * @see Database::remove_repo diff --git a/libmamba/include/mamba/specs/authentication_info.hpp b/libmamba/include/mamba/specs/authentication_info.hpp index a8cc171f61..02455fc31e 100644 --- a/libmamba/include/mamba/specs/authentication_info.hpp +++ b/libmamba/include/mamba/specs/authentication_info.hpp @@ -72,7 +72,7 @@ namespace mamba::specs /** * A class that holds the authentication info stored by users. * - * Essentially a map, except that some keys can match mutliple queries. + * Essentially a map, except that some keys can match multiple queries. * For instance "mamba.org/private" should be matched by queries "mamba.org/private", * "mamba.org/private/channel", but not "mamba.org/public". * @@ -81,7 +81,7 @@ namespace mamba::specs * Future development of this class should aim to replace the map and keys with a * `AuthenticationSpec`, that can decide whether or not a URL should benefit from such * its authentication. - * Possibly, a string reprensentation such as "*.mamba.org/private/channel*" could be added + * Possibly, a string representation such as "*.mamba.org/private/channel*" could be added * to parse users intentions, rather than relying on the assumptions made here. */ using AuthenticationDataBase = util:: diff --git a/libmamba/include/mamba/specs/build_number_spec.hpp b/libmamba/include/mamba/specs/build_number_spec.hpp index af5a085c7d..b9e0533e9d 100644 --- a/libmamba/include/mamba/specs/build_number_spec.hpp +++ b/libmamba/include/mamba/specs/build_number_spec.hpp @@ -81,7 +81,7 @@ namespace mamba::specs /** * Match a build number with a predicate. * - * Conda does not implement expression for build numbers but they could be added similarily + * Conda does not implement expression for build numbers but they could be added similarly * to @ref VersionSpec. */ class BuildNumberSpec @@ -90,7 +90,7 @@ namespace mamba::specs using BuildNumber = typename BuildNumberPredicate::BuildNumber; - static constexpr std::string_view prefered_free_str = "=*"; + static constexpr std::string_view preferred_free_str = "=*"; static constexpr std::array all_free_strs = { "", "*", "=*", "==*" }; static constexpr std::string_view equal_str = "="; static constexpr std::string_view not_equal_str = "!="; @@ -107,7 +107,7 @@ namespace mamba::specs explicit BuildNumberSpec(BuildNumberPredicate predicate) noexcept; /** - * Returns wether the BuildNumberSpec is unconstrained. + * Returns whether the BuildNumberSpec is unconstrained. */ [[nodiscard]] auto is_explicitly_free() const -> bool; diff --git a/libmamba/include/mamba/specs/channel.hpp b/libmamba/include/mamba/specs/channel.hpp index b818366772..59f66ed89b 100644 --- a/libmamba/include/mamba/specs/channel.hpp +++ b/libmamba/include/mamba/specs/channel.hpp @@ -113,7 +113,7 @@ namespace mamba::specs /* * This ID is a cross URL id, and is dependent on the * channel_alias when the channel has not been specified in - * the new mirrord_channel section of the configuration. + * the new mirrored_channel section of the configuration. */ [[nodiscard]] auto id() const -> const std::string&; [[nodiscard]] auto display_name() const -> const std::string&; diff --git a/libmamba/include/mamba/specs/conda_url.hpp b/libmamba/include/mamba/specs/conda_url.hpp index 37717c86e7..caa46ba94f 100644 --- a/libmamba/include/mamba/specs/conda_url.hpp +++ b/libmamba/include/mamba/specs/conda_url.hpp @@ -105,7 +105,7 @@ namespace mamba::specs */ void append_path(std::string_view path, Encode::no_type); - /** Return wether a token is set. */ + /** Return whether a token is set. */ [[nodiscard]] auto has_token() const -> bool; /** Return the Conda token, as delimited with "/t/", or empty if there isn't any. */ @@ -115,7 +115,7 @@ namespace mamba::specs * Set a token. * * If the URL already contains one replace it at the same location, otherwise, add it at - * the begining of the path. + * the beginning of the path. */ void set_token(std::string_view token); @@ -216,7 +216,7 @@ namespace mamba::specs * Due to decoding, the outcome may not be understood by parser and usable to reach an * asset. * @param strip_scheme If true, remove the scheme and "localhost" on file URI. - * @param rstrip_path If non-null, remove the given charaters at the end of the path. + * @param rstrip_path If non-null, remove the given characters at the end of the path. * @param credentials If true, hide password and tokens in the decoded string. * @param credentials Decide to keep, remove, or hide passwrd, users, and token. */ diff --git a/libmamba/include/mamba/specs/glob_spec.hpp b/libmamba/include/mamba/specs/glob_spec.hpp index 4010574a4c..71d8411453 100644 --- a/libmamba/include/mamba/specs/glob_spec.hpp +++ b/libmamba/include/mamba/specs/glob_spec.hpp @@ -37,7 +37,7 @@ namespace mamba::specs [[nodiscard]] auto is_free() const -> bool; /** - * Return true if the spec will match exaclty one input. + * Return true if the spec will match exactly one input. */ [[nodiscard]] auto is_exact() const -> bool; diff --git a/libmamba/include/mamba/specs/match_spec.hpp b/libmamba/include/mamba/specs/match_spec.hpp index d5e1bd2d6f..52108f295c 100644 --- a/libmamba/include/mamba/specs/match_spec.hpp +++ b/libmamba/include/mamba/specs/match_spec.hpp @@ -39,11 +39,11 @@ namespace mamba::specs using string_set_const_ref = typename std::reference_wrapper; inline static constexpr char url_md5_sep = '#'; - inline static constexpr char prefered_list_open = '['; - inline static constexpr char prefered_list_close = ']'; + inline static constexpr char preferred_list_open = '['; + inline static constexpr char preferred_list_close = ']'; inline static constexpr char alt_list_open = '('; inline static constexpr char alt_list_close = ')'; - inline static constexpr char prefered_quote = '"'; + inline static constexpr char preferred_quote = '"'; inline static constexpr char alt_quote = '\''; inline static constexpr char channel_namespace_spec_sep = ':'; inline static constexpr char attribute_sep = ','; @@ -123,7 +123,7 @@ namespace mamba::specs * comparing unresolved channels and the fact that this check can be also be done once * at a repository level when the user knows how packages are organised. * - * This function is written as a generic template, to acomodate various uses: the fact + * This function is written as a generic template, to accommodate various uses: the fact * that the attributes may not always be in the correct format in the package, and that * their parsing may be cached. */ @@ -131,7 +131,7 @@ namespace mamba::specs [[nodiscard]] auto contains_except_channel(const Pkg& pkg) const -> bool; /** - * Convenience wrapper making necessary convertions. + * Convenience wrapper making necessary conversions. */ [[nodiscard]] auto contains_except_channel(const PackageInfo& pkg) const -> bool; diff --git a/libmamba/include/mamba/specs/regex_spec.hpp b/libmamba/include/mamba/specs/regex_spec.hpp index 5466f1320d..28420a0b6c 100644 --- a/libmamba/include/mamba/specs/regex_spec.hpp +++ b/libmamba/include/mamba/specs/regex_spec.hpp @@ -41,7 +41,7 @@ namespace mamba::specs [[nodiscard]] auto is_explicitly_free() const -> bool; /** - * Return true if the spec will match exaclty one input. + * Return true if the spec will match exactly one input. */ [[nodiscard]] auto is_exact() const -> bool; diff --git a/libmamba/include/mamba/specs/unresolved_channel.hpp b/libmamba/include/mamba/specs/unresolved_channel.hpp index 9c4d58b97d..ac8096be8a 100644 --- a/libmamba/include/mamba/specs/unresolved_channel.hpp +++ b/libmamba/include/mamba/specs/unresolved_channel.hpp @@ -27,12 +27,12 @@ namespace mamba::specs * Due the the heavy reliance of channels on configuration options, this placeholder type * can be used to represent channel inputs that have not been "resolved" to s specific * location. - * This can even be true when a full URL or path is given, as some authentification information + * This can even be true when a full URL or path is given, as some authentication information * may come from login database. * * Note that for a string to be considered a URL, it must have an explicit scheme. - * So "repo.anaconda.com" is considered a name, similarily to "conda-forge" and not a URL. - * This is because otherwise it is not possible to tell names and URL appart. + * So "repo.anaconda.com" is considered a name, similarly to "conda-forge" and not a URL. + * This is because otherwise it is not possible to tell names and URL apart. */ class UnresolvedChannel { @@ -41,7 +41,7 @@ namespace mamba::specs enum class Type { /** - * A URL to a full repo strucuture. + * A URL to a full repo structure. * * Example "https://repo.anaconda.com/conda-forge". */ @@ -53,7 +53,7 @@ namespace mamba::specs */ PackageURL, /** - * An (possibly implicit) path to a full repo strucuture. + * An (possibly implicit) path to a full repo structure. * * Example "/Users/name/conda-bld", "./conda-bld", "~/.conda-bld". */ diff --git a/libmamba/include/mamba/specs/version.hpp b/libmamba/include/mamba/specs/version.hpp index 17bdb72d28..4cfd4b7cb4 100644 --- a/libmamba/include/mamba/specs/version.hpp +++ b/libmamba/include/mamba/specs/version.hpp @@ -73,7 +73,7 @@ namespace mamba::specs /** * A sequence of VersionPart meant to represent all parts of a version. * - * CommonVersion are composed of an aribtrary postive number parts, such as major, minor. + * CommonVersion are composed of an arbitrary positive number parts, such as major, minor. * They are typically separated by dots, for instance the three parts in 3.0post1dev.4 are * {{3, ""}}, {{0, "post"}, {1, "dev"}}, and {{4, ""}}. * @@ -85,7 +85,7 @@ namespace mamba::specs /** * A version according to Conda specifications. * - * A verison is composed of + * A version is composed of * - A epoch number, usually 0; * - A regular version, * - An optional local. @@ -153,7 +153,7 @@ namespace mamba::specs * * For instance 1.3.1 is compatible with 1.2.1 at level 0 (first component `1 == 1``), * at level 1 (second component `` 3 >= 2``), but not at level two (because the second - * component is stricly larger ``3 > 2``). + * component is strictly larger ``3 > 2``). * Compatible versions are always smaller than the current version. */ [[nodiscard]] auto compatible_with(const Version& older, std::size_t level) const -> bool; diff --git a/libmamba/include/mamba/specs/version_spec.hpp b/libmamba/include/mamba/specs/version_spec.hpp index 3bfb514af4..62228e163f 100644 --- a/libmamba/include/mamba/specs/version_spec.hpp +++ b/libmamba/include/mamba/specs/version_spec.hpp @@ -137,7 +137,7 @@ namespace mamba::specs static constexpr char left_parenthesis_token = '('; static constexpr char right_parenthesis_token = ')'; - static constexpr std::string_view prefered_free_str = "=*"; + static constexpr std::string_view preferred_free_str = "=*"; static constexpr std::array all_free_strs = { "", "*", "=*", "==*" }; static constexpr std::string_view starts_with_str = "="; static constexpr std::string_view equal_str = "=="; @@ -162,10 +162,10 @@ namespace mamba::specs explicit VersionSpec(tree_type&& tree) noexcept; /** - * Returns wether the VersionSpec is unconstrained. + * Returns whether the VersionSpec is unconstrained. * * Due to the complex nature of VersionSpec expressions, it is not always easy to know - * whether a complex expression can be simpified to the unconstrained one. + * whether a complex expression can be simplified to the unconstrained one. * This functions only handles the trivial cases. */ [[nodiscard]] auto is_explicitly_free() const -> bool; diff --git a/libmamba/include/mamba/util/cfile.hpp b/libmamba/include/mamba/util/cfile.hpp index 012cd7efea..bdaa3d3a24 100644 --- a/libmamba/include/mamba/util/cfile.hpp +++ b/libmamba/include/mamba/util/cfile.hpp @@ -26,7 +26,7 @@ namespace mamba::util * * In case of error, set the error code @p ec. * - * @param path must hae filesystem default encoding. + * @param path must have filesystem default encoding. */ static auto try_open( // const fs::u8path& path, diff --git a/libmamba/include/mamba/util/cryptography.hpp b/libmamba/include/mamba/util/cryptography.hpp index 034a17bb6e..13d5b972c9 100644 --- a/libmamba/include/mamba/util/cryptography.hpp +++ b/libmamba/include/mamba/util/cryptography.hpp @@ -46,7 +46,7 @@ namespace mamba::util }; /** - * Hash a blob of data and write the hashed bytes to the provided ouput. + * Hash a blob of data and write the hashed bytes to the provided output. */ void blob_bytes_to(blob_type blob, std::byte* out); @@ -71,7 +71,7 @@ namespace mamba::util [[nodiscard]] auto blob_hex_str(blob_type blob) -> std::string; /** - * Hash a string and write the hashed bytes to the provided ouput. + * Hash a string and write the hashed bytes to the provided output. */ void str_bytes_to(std::string_view data, std::byte* out); @@ -96,7 +96,7 @@ namespace mamba::util [[nodiscard]] auto str_hex_str(std::string_view data) -> std::string; /** - * Incrementally hash a file and write the hashed bytes to the provided ouput. + * Incrementally hash a file and write the hashed bytes to the provided output. */ void file_bytes_to(std::ifstream& file, std::byte* out); diff --git a/libmamba/include/mamba/util/encoding.hpp b/libmamba/include/mamba/util/encoding.hpp index 98a8926033..6df0355e18 100644 --- a/libmamba/include/mamba/util/encoding.hpp +++ b/libmamba/include/mamba/util/encoding.hpp @@ -27,7 +27,7 @@ namespace mamba::util [[nodiscard]] auto nibble_to_hex(std::byte b) noexcept -> char; /** - * Convert a buffer of bytes to a hexadecimal string written in the @p out paremeter. + * Convert a buffer of bytes to a hexadecimal string written in the @p out parameter. * * The @p out parameter must be allocated with twice the size of the input byte buffer. */ @@ -80,7 +80,7 @@ namespace mamba::util /** * Escape reserved URL reserved characters with '%' encoding. * - * The secons argument can be used to specify characters to exclude from encoding, + * The second argument can be used to specify characters to exclude from encoding, * so that for instance path can be encoded without splitting them (if they have no '/' other * than separators). * diff --git a/libmamba/include/mamba/util/environment.hpp b/libmamba/include/mamba/util/environment.hpp index 92e4639573..483af92a79 100644 --- a/libmamba/include/mamba/util/environment.hpp +++ b/libmamba/include/mamba/util/environment.hpp @@ -37,22 +37,22 @@ namespace mamba::util /** * Return a map of all environment variables encoded in UTF8. * - * This is useful if one in intersted to do an operatrion over all envrionment variables - * when their name is unknown. + * This is useful if one is interested to do an operation over all environment variables + * when their names are unknown. */ [[nodiscard]] auto get_env_map() -> environment_map; /** * Equivalent to calling set_env in a loop. * - * This leaves environment variables not refered to in the map unmodified. + * This leaves environment variables not referred to in the map unmodified. */ void update_env_map(const environment_map& env); /** * Set the environment to be exactly the map given. * - * This unset all environment variables not refered to in the map unmodified. + * This unsets all environment variables not referred to in the map unmodified. */ void set_env_map(const environment_map& env); @@ -108,7 +108,7 @@ namespace mamba::util /** * Return the full path of a program from its name if found inside the given directories. * - * The directies can be given as a range or as a @ref pathsep separated list. + * The directories can be given as a range or as a @ref pathsep separated list. */ template [[nodiscard]] auto which_in(std::string_view exe, const Range& search_paths) -> fs::u8path; diff --git a/libmamba/include/mamba/util/flat_binary_tree.hpp b/libmamba/include/mamba/util/flat_binary_tree.hpp index f95af83467..749ba9ad16 100644 --- a/libmamba/include/mamba/util/flat_binary_tree.hpp +++ b/libmamba/include/mamba/util/flat_binary_tree.hpp @@ -21,7 +21,7 @@ namespace mamba::util * any kind of binary directed acyclic graph (e.g. there can be multiple trees, * or nodes could have multiple parents) * - * For efficency (and simplicity), this data structure can currenlty only grow. + * For efficiency (and simplicity), this data structure can currently only grow. * The tree must also be grown from the leaves, adding children first and their * parents afterwards. */ @@ -55,7 +55,7 @@ namespace mamba::util /** * Reserve (allocate) space for @p nodes. * - * This improves the efficency of ``add_leaf`` and ``add_branch`` but does not + * This improves the efficiency of ``add_leaf`` and ``add_branch`` but does not * modify the tree in any way. */ void reserve(size_type size); @@ -63,7 +63,7 @@ namespace mamba::util /** * Add a node with no children. * - * Return an ID that can be used to poin to this node as a children in ``add_branch``. + * Return an ID that can be used to point to this node as a children in ``add_branch``. */ auto add_leaf(const leaf_type& leaf) -> idx_type; auto add_leaf(leaf_type&& leaf) -> idx_type; @@ -71,7 +71,7 @@ namespace mamba::util /** * Add a node with exactly two children. * - * The children must have been previously added to the tree and thei IDs can be used + * The children must have been previously added to the tree and their IDs can be used * to point to them. */ auto diff --git a/libmamba/include/mamba/util/flat_bool_expr_tree.hpp b/libmamba/include/mamba/util/flat_bool_expr_tree.hpp index bd0965233e..93f797b0fc 100644 --- a/libmamba/include/mamba/util/flat_bool_expr_tree.hpp +++ b/libmamba/include/mamba/util/flat_bool_expr_tree.hpp @@ -564,7 +564,7 @@ namespace mamba::util template auto flat_bool_expr_tree::evaluate_impl(UnaryFunc& var_eval, idx_type idx) const -> bool { - // We do a tree evluation rather than a stack-based postfix evaluation to + // We do a tree evaluation rather than a stack-based postfix evaluation to // avoid evaluation sub trees thanks to operator && and || short circuiting. assert(idx < m_tree.size()); if (m_tree.is_leaf(idx)) diff --git a/libmamba/include/mamba/util/flat_set.hpp b/libmamba/include/mamba/util/flat_set.hpp index 4aa586f3e8..55c7a96256 100644 --- a/libmamba/include/mamba/util/flat_set.hpp +++ b/libmamba/include/mamba/util/flat_set.hpp @@ -134,7 +134,7 @@ namespace mamba::util friend auto set_difference(const flat_set&, const flat_set&) -> flat_set; template - friend auto set_symetric_difference(const flat_set&, const flat_set&) + friend auto set_symmetric_difference(const flat_set&, const flat_set&) -> flat_set; }; @@ -218,7 +218,7 @@ namespace mamba::util ) -> flat_set; template - auto set_symetric_difference( + auto set_symmetric_difference( const flat_set& lhs, const flat_set& rhs ) -> flat_set; @@ -542,7 +542,7 @@ namespace mamba::util } template - auto set_symetric_difference(const flat_set& lhs, const flat_set& rhs) + auto set_symmetric_difference(const flat_set& lhs, const flat_set& rhs) -> flat_set { auto out = flat_set(); diff --git a/libmamba/include/mamba/util/graph.hpp b/libmamba/include/mamba/util/graph.hpp index 474b10b52d..5ab2168868 100644 --- a/libmamba/include/mamba/util/graph.hpp +++ b/libmamba/include/mamba/util/graph.hpp @@ -52,7 +52,7 @@ namespace mamba::util bool has_node(node_id id) const; bool has_edge(node_id from, node_id to) const; - // TODO C++20 better to return a range since this search cannot be interupted from the + // TODO C++20 better to return a range since this search cannot be interrupted from the // visitor template UnaryFunc for_each_node_id(UnaryFunc func) const; @@ -97,7 +97,7 @@ namespace mamba::util std::size_t m_number_of_edges = 0; }; - // TODO C++20 better to return a range since this search cannot be interupted from the + // TODO C++20 better to return a range since this search cannot be interrupted from the // visitor // TODO should let user implement reverse with a reverse view when available template diff --git a/libmamba/include/mamba/util/parsers.hpp b/libmamba/include/mamba/util/parsers.hpp index a8528af115..5aa44a1f6b 100644 --- a/libmamba/include/mamba/util/parsers.hpp +++ b/libmamba/include/mamba/util/parsers.hpp @@ -27,8 +27,8 @@ namespace mamba::util /** * Find the first opening parenthesis and its matching pair. * - * Correctly matches parenteses together so that inner parentheses pairs are skipped. - * Open and closing pairs need not be differents. + * Correctly matches parentheses together so that inner parentheses pairs are skipped. + * Open and closing pairs don't need to be different. * If an error is encountered, @p err is modified to contain the error, otherwise it is left * as it is. */ @@ -64,7 +64,7 @@ namespace mamba::util * Find the last closing parenthesese and its matching pair. * * Correctly matches parenteses together so that inner parentheses pairs are skipped. - * Open and closing pairs need not be differents. + * Open and closing pairs don't need to be different. * If an error is encountered, @p err is modified to contain the error, otherwise it is left * as it is. */ @@ -99,12 +99,12 @@ namespace mamba::util /** * Find a character or string, except in matching parentheses pairs. * - * Find the first occurence of the given character, except if such character is inside a valid + * Find the first occurrence of the given character, except if such character is inside a valid * pair of parentheses. - * Open and closing pairs need not be differents. + * Open and closing pairs don't need to be different. * If not found, ``std::string_view::npos`` is returned but no error is set as this is not * considered an error. - * Due to a greedy approach, the functin may not be able to detect all errors, but will be + * Due to a greedy approach, the function may not be able to detect all errors, but will be * correct when parentheses are correctly matched. */ auto find_not_in_parentheses( // @@ -174,12 +174,12 @@ namespace mamba::util /** * Find the last character or string, except in matching parentheses pairs. * - * Find the last occurence of the given character, except if such character is inside a valid + * Find the last occurrence of the given character, except if such character is inside a valid * pair of parentheses. - * Open and closing pairs need not be differents. + * Open and closing pairs don't need to be different. * If not found, ``std::string_view::npos`` is returned but no error is set as this is not * considered an error. - * Due to a greedy approach, the functin may not be able to detect all errors, but will be + * Due to a greedy approach, the function may not be able to detect all errors, but will be * correct when parentheses are correctly matched. */ auto rfind_not_in_parentheses( // @@ -247,7 +247,7 @@ namespace mamba::util ) noexcept -> tl::expected; /** - * Test wether the glob pattern @p pattern matches the string @p str. + * Test whether the glob pattern @p pattern matches the string @p str. */ [[nodiscard]] auto glob_match(std::string_view pattern, std::string_view str, char glob = '*') -> bool; @@ -359,7 +359,7 @@ namespace mamba::util auto pos = start; while (pos != npos) { - // Change depth of corresponding open/close pair, writting in index P for + // Change depth of corresponding open/close pair, writing in index P for // the one not matching. const auto open_depth_idx = detail_parsers::find(open, text[pos]); const auto close_depth_idx = detail_parsers::find(close, text[pos]); @@ -510,7 +510,7 @@ namespace mamba::util auto [last, first] = detail_parsers::find_matching_parentheses_impl( text, err, - close, // swaped + close, // swapped open, detail_parsers::RFindParenthesesSearcher() ); @@ -626,7 +626,7 @@ namespace mamba::util text, c, err, - close, // swaped + close, // swapped open, detail_parsers::RFindParenthesesSearcher() ); @@ -662,7 +662,7 @@ namespace mamba::util text, val, err, - close, // swaped + close, // swapped open, detail_parsers::RFindParenthesesSearcher() ); diff --git a/libmamba/include/mamba/util/string.hpp b/libmamba/include/mamba/util/string.hpp index b02b906caa..8a52099e96 100644 --- a/libmamba/include/mamba/util/string.hpp +++ b/libmamba/include/mamba/util/string.hpp @@ -320,7 +320,7 @@ namespace mamba::util * defined by iterating through the ``n`` elements of the iterator pair, interleaving the * separator in between the elements (thus appearing ``n-1`` times). * - * @param first The iterator pointing to the begining of the range of elements to join. + * @param first The iterator pointing to the beginning of the range of elements to join. * @param last The iterator pointing to past the end of the range of elements to join. * @param func The unary function to apply to all elements (separation and truncation included). * @param sep The separator used in between elements. diff --git a/libmamba/include/mamba/util/url.hpp b/libmamba/include/mamba/util/url.hpp index 45d4898274..0f1300c7e7 100644 --- a/libmamba/include/mamba/util/url.hpp +++ b/libmamba/include/mamba/util/url.hpp @@ -84,7 +84,7 @@ namespace mamba::util * The fields of the URL must be percent encoded, otherwise use the individual * field setters to encode. * For instance, "https://user@email.com@mamba.org/" must be passed as - *"https://user%40email.com@mamba.org/".The first '@' charater is part of the username + *"https://user%40email.com@mamba.org/".The first '@' character is part of the username * "user@email.com" whereas the second is the URL specification for separating username * and hostname. * @@ -108,13 +108,13 @@ namespace mamba::util /** Clear the scheme back to a defaulted value and return the old value. */ auto clear_scheme() -> std::string; - /** Return wether the user is empty. */ + /** Return whether the user is empty. */ [[nodiscard]] auto has_user() const -> bool; /** Return the encoded user, or empty if none. */ [[nodiscard]] auto user(Decode::no_type) const -> const std::string&; - /** Retrun the decoded user, or empty if none. */ + /** Return the decoded user, or empty if none. */ [[nodiscard]] auto user(Decode::yes_type = Decode::yes) const -> std::string; /** Set the user from a not encoded value. */ @@ -126,7 +126,7 @@ namespace mamba::util /** Clear and return the encoded user. */ auto clear_user() -> std::string; - /** Return wether the password is empty. */ + /** Return whether the password is empty. */ [[nodiscard]] auto has_password() const -> bool; /** Return the encoded password, or empty if none. */ @@ -174,7 +174,7 @@ namespace mamba::util /** Clear and return the port number. */ auto clear_port() -> std::string; - /** Return the encoded autority part of the URL. */ + /** Return the encoded authority part of the URL. */ [[nodiscard]] auto authority(Credentials = Credentials::Hide) const -> std::string; /** Return the encoded path, always starts with a '/'. */ @@ -249,7 +249,7 @@ namespace mamba::util * * Due to decoding, the outcome may not be understood by parser and usable to fetch the URL. * @param strip_scheme If true, remove the scheme and "localhost" on file URI. - * @param rstrip_path If non-null, remove the given charaters at the end of the path. + * @param rstrip_path If non-null, remove the given characters at the end of the path. * @param credentials Decide to keep, remove, or hide credentials. */ [[nodiscard]] auto pretty_str( diff --git a/libmamba/include/mamba/util/url_manip.hpp b/libmamba/include/mamba/util/url_manip.hpp index 22434566f4..768b1c3608 100644 --- a/libmamba/include/mamba/util/url_manip.hpp +++ b/libmamba/include/mamba/util/url_manip.hpp @@ -25,7 +25,7 @@ namespace mamba::util [[nodiscard]] auto is_file_uri(std::string_view url) -> bool; /** - * Retrun true if @p url starts with a URL scheme. + * Return true if @p url starts with a URL scheme. */ [[nodiscard]] auto url_has_scheme(std::string_view url) -> bool; @@ -68,13 +68,13 @@ namespace mamba::util * * Windows paths can be expressed in a form, called UNC, where it is possible to express a * server location, as in "\\hostname\folder\data.xml". - * This can be succefully encoded in a file URI like "file://hostname/folder/data.xml" + * This can be successfully encoded in a file URI like "file://hostname/folder/data.xml" * since file URI contain a part for the hostname (empty hostname file URI must start with * "file:///"). * Since CURL does not support hostname in file URI, we can encode UNC hostname as part * of the path (called 4-slash), where it becomes "file:////hostname/folder/data.xml". * - * This function leaves all non-matching URI (inluding a number of invalid URI for unkown + * This function leaves all non-matching URI (including a number of invalid URI for unknown * legacy reasons taken from ``url_to_path`` in conda.common.path) unchanged. * * @see https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths diff --git a/libmamba/include/mamba/util/variant_cmp.hpp b/libmamba/include/mamba/util/variant_cmp.hpp index edef8bce84..9fb3959c05 100644 --- a/libmamba/include/mamba/util/variant_cmp.hpp +++ b/libmamba/include/mamba/util/variant_cmp.hpp @@ -27,7 +27,7 @@ namespace mamba::util alt_cmp = std::forward(alternative_cmp) // ](const auto& lhs, const auto& rhs) -> bool { - // When alternatives are differents, compare the index. + // When alternatives are different, compare the index. if (lhs.index() != rhs.index()) { return int_cmp(lhs.index(), rhs.index()); diff --git a/libmamba/include/mamba/util/weakening_map.hpp b/libmamba/include/mamba/util/weakening_map.hpp index 5937c7d71d..b8bb4efb66 100644 --- a/libmamba/include/mamba/util/weakening_map.hpp +++ b/libmamba/include/mamba/util/weakening_map.hpp @@ -20,7 +20,7 @@ namespace mamba::util * multiple keys. * This can be understood as an extreme generalization of defaults: when a key is not found, * the behaviour is to look for another key. - * The behaviour for generating the sequence of weaken keys is controled by the Weakener. + * The behaviour for generating the sequence of weaken keys is controlled by the Weakener. */ template class weakening_map : private Map diff --git a/libmamba/src/api/channel_loader.cpp b/libmamba/src/api/channel_loader.cpp index dfcb60eaf9..299780a509 100644 --- a/libmamba/src/api/channel_loader.cpp +++ b/libmamba/src/api/channel_loader.cpp @@ -28,7 +28,7 @@ namespace mamba { if (!fs::exists(pkgs_dir)) { - // TODO : us tl::expected mechanis + // TODO : us tl::expected mechanism throw std::runtime_error("Specified pkgs_dir does not exist\n"); } auto sprefix_data = PrefixData::create(pkgs_dir, channel_context); diff --git a/libmamba/src/api/configuration.cpp b/libmamba/src/api/configuration.cpp index c7a4b3f683..fa026100a9 100644 --- a/libmamba/src/api/configuration.cpp +++ b/libmamba/src/api/configuration.cpp @@ -532,7 +532,7 @@ namespace mamba auto& spec_file_env_name = config.at("spec_file_env_name"); auto& spec_file_name = spec_file_env_name.value(); - // Allow spec file environment name to be overriden by target prefix + // Allow spec file environment name to be overridden by target prefix if (env_name.cli_configured() && config.at("target_prefix").cli_configured()) { LOG_ERROR << "Cannot set both prefix and env name"; @@ -1251,7 +1251,7 @@ namespace mamba .set_env_var_names({ "CONDA_SUBDIR", "MAMBA_PLATFORM" }) .description("The platform description") .long_description(unindent(R"( - The plaftorm description points what channels + The platform description points what channels subdir/platform have to be fetched for package solving. This can be 'linux-64' or similar.)"))); @@ -1349,7 +1349,7 @@ namespace mamba .description("Custom multichannels") .long_description( // "A dictionary where keys are multi channels names, and values are a list " - "of correspinding names / urls / file paths to use.\n" + "of corresponding names / urls / file paths to use.\n" ) .needs({ "default_channels", "target_prefix", "root_prefix" })); @@ -1387,8 +1387,8 @@ namespace mamba .set_env_var_names() .description("Path (file or directory) SSL certificate(s)") .long_description(unindent(R"( - Path (file or directory) SSL certificate(s) to use whe - 'ssl_verify' in turned on but not set with path to certs. + Path (file or directory) SSL certificate(s) to use when + 'ssl_verify' is turned on but not set with path to certs. WARNING: overrides 'ssl_verify' if provided and 'ssl_verify' also contains a path to SSL certificates.)"))); diff --git a/libmamba/src/api/install.cpp b/libmamba/src/api/install.cpp index 9e3df895f1..76dfc17f07 100644 --- a/libmamba/src/api/install.cpp +++ b/libmamba/src/api/install.cpp @@ -581,7 +581,7 @@ namespace mamba { auto out = Console::stream(); print_request_pins_to(request, out); - // Console stream prints on destrucion + // Console stream prints on destruction } auto outcome = solver::libsolv::Solver().solve(db, request).value(); @@ -637,10 +637,10 @@ namespace mamba Console::instance().json_write({ { "success", true } }); // The point here is to delete the database before executing the transaction. - // The database can have high memrory impact, and so can installing pacakges as it + // The database can have high memrory impact, and so can installing packages as it // requires downloading, extracgint, and launching Python interpreters for // creating ``.pyc`` files. - // Ideally this whole function should be properly refactored and the transction itself + // Ideally this whole function should be properly refactored and the transaction itself // should not need the database. auto trans = [&](auto db) { diff --git a/libmamba/src/api/remove.cpp b/libmamba/src/api/remove.cpp index ae99e71378..ff5eb66e39 100644 --- a/libmamba/src/api/remove.cpp +++ b/libmamba/src/api/remove.cpp @@ -160,7 +160,7 @@ namespace mamba .value(); const auto& installed = prefix_data.records(); // TODO should itreate over all packages and use MatchSpec.contains - // TODO should move such method over Pool for consitent use + // TODO should move such method over Pool for consistent use if (auto iter = installed.find(spec.name().str()); iter != installed.cend()) { pkgs_to_remove.push_back(iter->second); diff --git a/libmamba/src/api/shell.cpp b/libmamba/src/api/shell.cpp index dd9ed8b599..7b71f6ffc3 100644 --- a/libmamba/src/api/shell.cpp +++ b/libmamba/src/api/shell.cpp @@ -94,7 +94,7 @@ namespace mamba void shell_hook(Context& ctx, const std::string& shell_type) { auto activator = make_activator(ctx, shell_type); - // TODO do we need to do something wtih `shell_prefix -> root_prefix?`? + // TODO do we need to do something with `shell_prefix -> root_prefix?`? if (ctx.output_params.json) { Console::instance().json_write({ { "success", true }, diff --git a/libmamba/src/api/update.cpp b/libmamba/src/api/update.cpp index c8abdb7446..ecfb7dfda1 100644 --- a/libmamba/src/api/update.cpp +++ b/libmamba/src/api/update.cpp @@ -160,7 +160,7 @@ namespace mamba { auto out = Console::stream(); print_request_pins_to(request, out); - // Console stream prints on destrucion + // Console stream prints on destruction } auto outcome = solver::libsolv::Solver().solve(db, request).value(); diff --git a/libmamba/src/core/channel_context.cpp b/libmamba/src/core/channel_context.cpp index 794a50223d..aff570f39c 100644 --- a/libmamba/src/core/channel_context.cpp +++ b/libmamba/src/core/channel_context.cpp @@ -177,7 +177,7 @@ namespace mamba params.custom_multichannels.emplace("local", std::move(channels)); } - // Called after to guarentee there are no custom multichannels when calling + // Called after to guarantee there are no custom multichannels when calling // make_unique_chan. add_simple_params_custom_multichannel(params, ctx); } diff --git a/libmamba/src/core/download_progress_bar.cpp b/libmamba/src/core/download_progress_bar.cpp index 99bb6c696a..6c5d1240c9 100644 --- a/libmamba/src/core/download_progress_bar.cpp +++ b/libmamba/src/core/download_progress_bar.cpp @@ -20,8 +20,8 @@ namespace mamba { const auto now = std::chrono::steady_clock::now(); - const auto throttle_treshold = std::chrono::milliseconds(50); - if (now - throttle_time < throttle_treshold) + const auto throttle_threshold = std::chrono::milliseconds(50); + if (now - throttle_time < throttle_threshold) { return; } diff --git a/libmamba/src/core/env_lockfile.cpp b/libmamba/src/core/env_lockfile.cpp index cecbc87973..eea2e06726 100644 --- a/libmamba/src/core/env_lockfile.cpp +++ b/libmamba/src/core/env_lockfile.cpp @@ -198,7 +198,7 @@ namespace mamba default: { return tl::unexpected(EnvLockFileError::make_error( - file_parsing_error_code::unsuported_version, + file_parsing_error_code::unsupported_version, fmt::format( "Failed to read environment lockfile at '{}' : unknown version '{}'", file_path.string(), diff --git a/libmamba/src/core/error_handling.cpp b/libmamba/src/core/error_handling.cpp index f899e12cdf..a779da6c00 100644 --- a/libmamba/src/core/error_handling.cpp +++ b/libmamba/src/core/error_handling.cpp @@ -56,7 +56,7 @@ namespace mamba return m_data; } - constexpr const char* mamba_aggregated_error::m_base_message; // = "Many errors occured:\n"; + constexpr const char* mamba_aggregated_error::m_base_message; // = "Many errors occurred:\n"; mamba_aggregated_error::mamba_aggregated_error(error_list_t&& error_list) : base_type(mamba_aggregated_error::m_base_message, mamba_error_code::aggregated) diff --git a/libmamba/src/core/prefix_data.cpp b/libmamba/src/core/prefix_data.cpp index 38180e70c4..5ea296f3ed 100644 --- a/libmamba/src/core/prefix_data.cpp +++ b/libmamba/src/core/prefix_data.cpp @@ -115,7 +115,7 @@ namespace mamba } // Flip known problematic edges. - // This is made to adress cycles but there is no straightforward way to make + // This is made to address cycles but there is no straightforward way to make // a generic cycle handler so we instead force flip the given edges static constexpr auto edges_to_flip = std::array{ std::pair{ "pip", "python" } }; for (const auto& [from, to] : edges_to_flip) diff --git a/libmamba/src/core/progress_bar_impl.cpp b/libmamba/src/core/progress_bar_impl.cpp index 864d3f0218..7304de5aee 100644 --- a/libmamba/src/core/progress_bar_impl.cpp +++ b/libmamba/src/core/progress_bar_impl.cpp @@ -154,7 +154,7 @@ namespace cursor namespace mamba { - // TODO: bytes sould be size_t and the implementation is wrong + // TODO: bytes should be size_t and the implementation is wrong void to_human_readable_filesize(std::ostream& o, double bytes, std::size_t precision) { static constexpr const char* sizes[] = { " B", "kB", "MB", "GB", "TB", "PB" }; @@ -755,7 +755,7 @@ namespace mamba + postfix.width() + elapsed.width() + 1; // Add extra whitespaces between fields (prefix, progress, - // and elasped fields are assumed always displayed) + // and elapsed fields are assumed always displayed) if (current) { total_width += 1; @@ -836,7 +836,7 @@ namespace mamba } // Redistribute available space - // 1: start with the prefix if it was shrinked + // 1: start with the prefix if it was shrunk if (total_width < max_width && prefix && prefix.width() < prefix_min_width) { if ((max_width - total_width) < (prefix_min_width - prefix.width())) diff --git a/libmamba/src/core/query.cpp b/libmamba/src/core/query.cpp index 0747990da4..f201152189 100644 --- a/libmamba/src/core/query.cpp +++ b/libmamba/src/core/query.cpp @@ -148,8 +148,8 @@ namespace mamba // This is an approximation. // Resolving all depenndencies, even of a single Matchspec isnot as simple // as taking any package matching a dependency recursively. - // Package dependencies can appear mulitple time, further reducing its valid set. - // To do this properly, we should instanciate a solver and resolve the spec. + // Package dependencies can appear multiple time, further reducing its valid set. + // To do this properly, we should instantiate a solver and resolve the spec. const auto ms = specs::MatchSpec::parse(dep) .or_else([](specs::ParseError&& err) { throw std::move(err); }) .value(); @@ -871,7 +871,7 @@ namespace mamba for (auto id : m_pkg_id_list) { nlohmann::json pkg_info_json = m_dep_graph.node(id); - // We want the cannonical channel name here. + // We want the canonical channel name here. // We do not know what is in the `channel` field so we need to make sure. // This is most likely legacy and should be updated on the next major release. pkg_info_json["channel"] = cut_subdir( @@ -886,7 +886,7 @@ namespace mamba if (!m_dep_graph.successors(0).empty()) { nlohmann::json pkg_info_json = m_dep_graph.node(0); - // We want the cannonical channel name here. + // We want the canonical channel name here. // We do not know what is in the `channel` field so we need to make sure. // This is most likely legacy and should be updated on the next major release. pkg_info_json["channel"] = cut_subdir( diff --git a/libmamba/src/core/singletons.cpp b/libmamba/src/core/singletons.cpp index be6ad4e5f5..d1bc6be4cf 100644 --- a/libmamba/src/core/singletons.cpp +++ b/libmamba/src/core/singletons.cpp @@ -31,7 +31,7 @@ namespace mamba // Other static objects from other translation units can be destroyed in parallel to the ones // here as C++ does not guarantee any order of destruction after `main()`. - //--- Dependencie's singletons + //--- Dependencies singletons //---------------------------------------------------------------------- @@ -106,7 +106,7 @@ namespace mamba static std::atomic main_executor{ nullptr }; static std::unique_ptr default_executor; - static std::mutex default_executor_mutex; // TODO: replace by sychronized_value once available + static std::mutex default_executor_mutex; // TODO: replace by synchronized_value once available MainExecutor& MainExecutor::instance() { diff --git a/libmamba/src/core/subdirdata.cpp b/libmamba/src/core/subdirdata.cpp index 4708fdbcd3..54ae7908b4 100644 --- a/libmamba/src/core/subdirdata.cpp +++ b/libmamba/src/core/subdirdata.cpp @@ -414,7 +414,7 @@ namespace mamba catch (...) { return make_unexpected( - "Unkown error when trying to load subdir data " + "Unknown error when trying to load subdir data " + SubdirData::get_name(channel.id(), platform), mamba_error_code::unknown ); @@ -624,7 +624,7 @@ namespace mamba for (const fs::u8path& cache_path : cache_paths) { - // TODO: rewite this with pipe chains of ranges + // TODO: rewrite this with pipe chains of ranges fs::u8path json_file = cache_path / "cache" / m_json_fn; if (!fs::is_regular_file(json_file)) { diff --git a/libmamba/src/core/util.cpp b/libmamba/src/core/util.cpp index d5bc008f28..30bf08bc58 100644 --- a/libmamba/src/core/util.cpp +++ b/libmamba/src/core/util.cpp @@ -295,7 +295,7 @@ namespace mamba std::string line; while (std::getline(file_stream, line)) { - // Remove the trailing \r to accomodate Windows line endings. + // Remove the trailing \r to accommodate Windows line endings. if ((!line.empty()) && (line.back() == '\r')) { line.pop_back(); @@ -366,7 +366,7 @@ namespace mamba bs_buf.clear(); if (!result.empty()) { - // seperate arguments + // separate arguments result += " "; } @@ -451,7 +451,7 @@ namespace mamba std::size_t clean_trash_files(const fs::u8path& prefix, bool deep_clean) { std::size_t deleted_files = 0; - std::size_t remainig_trash = 0; + std::size_t remaining_trash = 0; std::error_code ec; std::vector remaining_files; auto trash_txt = prefix / "conda-meta" / "mamba_trash.txt"; @@ -469,7 +469,7 @@ namespace mamba else { LOG_INFO << "Trash: could not remove " << full_path; - remainig_trash += 1; + remaining_trash += 1; // save relative path remaining_files.push_back(f); } @@ -496,7 +496,7 @@ namespace mamba } else { - remainig_trash += 1; + remaining_trash += 1; // save relative path remaining_files.push_back(fs::relative(p, prefix)); } @@ -519,7 +519,7 @@ namespace mamba } } - LOG_INFO << "Cleaned " << deleted_files << " .mamba_trash files. " << remainig_trash + LOG_INFO << "Cleaned " << deleted_files << " .mamba_trash files. " << remaining_trash << " remaining."; return deleted_files; } diff --git a/libmamba/src/core/util_os.cpp b/libmamba/src/core/util_os.cpp index fca5c451d7..fd6e38ee07 100644 --- a/libmamba/src/core/util_os.cpp +++ b/libmamba/src/core/util_os.cpp @@ -147,9 +147,9 @@ namespace mamba "with the fall 2016 \"Anniversary update\" or newer."; return false; } - auto splitted = util::split(win_ver.value(), "."); - if (!(splitted.size() >= 3 && std::stoull(splitted[0]) >= 10 - && std::stoull(splitted[2]) >= 14352)) + auto split_out = util::split(win_ver.value(), "."); + if (!(split_out.size() >= 3 && std::stoull(split_out[0]) >= 10 + && std::stoull(split_out[2]) >= 14352)) { LOG_WARNING << "Not setting long path registry key; Windows version must be at least 10 " "with the fall 2016 \"Anniversary update\" or newer."; @@ -414,9 +414,9 @@ namespace mamba if (auto version = util::windows_version()) { - auto splitted = util::split(version.value(), '.'); - if (splitted.size() >= 3 && std::stoull(splitted[0]) >= 10 - && std::stoull(splitted[2]) >= 15063) + auto split_out = util::split(version.value(), '.'); + if (split_out.size() >= 3 && std::stoull(split_out[0]) >= 10 + && std::stoull(split_out[2]) >= 15063) { features.true_colors = true; } diff --git a/libmamba/src/solver/helpers.cpp b/libmamba/src/solver/helpers.cpp index e8576409c4..a42cf9c905 100644 --- a/libmamba/src/solver/helpers.cpp +++ b/libmamba/src/solver/helpers.cpp @@ -29,7 +29,7 @@ namespace mamba::solver auto python_binary_compatible(const specs::Version& older, const specs::Version& newer) -> bool { - // Python binary compatiblity is defined athe the same MINOR level. + // Python binary compatibility is defined at the same MINOR level. return older.compatible_with(newer, /* level= */ 2); } } diff --git a/libmamba/src/solver/libsolv/helpers.cpp b/libmamba/src/solver/libsolv/helpers.cpp index 8517f7c28c..b73010c700 100644 --- a/libmamba/src/solver/libsolv/helpers.cpp +++ b/libmamba/src/solver/libsolv/helpers.cpp @@ -860,7 +860,7 @@ namespace mamba::solver::libsolv // Locking on a spec applies the lock to all packages matching the spec. // In mamba, we do not want to lock the package because we want to allow other variants // (matching the same spec) to unlock more solutions. - // For instance we may pin ``libfmt=8.*`` but allow it to be swaped with a version built + // For instance we may pin ``libfmt=8.*`` but allow it to be swapped with a version built // by a more recent compiler. // // A previous version of this function would use ``SOLVER_LOCK`` to lock all packages not @@ -870,7 +870,7 @@ namespace mamba::solver::libsolv // // Another wrong idea is to add the pin as an install job. // This is not what is expected of pins, as they must not be installed if they were not - // in the environement. + // in the environment. // They can be configure in ``.condarc`` for generally specifying what versions are wanted. // // The idea behind the current version is to add the pin/spec as a constraint that must be @@ -898,7 +898,7 @@ namespace mamba::solver::libsolv // If the installed repo does not exists, we can safely create it because this is // called right before the solve function. // If it gets modified latter on the pin should not interfere with user packages. - // If it gets overriden this it is not a problem for the solve because pins are added + // If it gets overridden this it is not a problem for the solve because pins are added // on each solve. auto [id, repo] = pool.add_repo("installed"); pool.set_installed_repo(id); @@ -991,7 +991,7 @@ namespace mamba::solver::libsolv // We can specifically filter out packages, for things such as deps-only or // no-deps. - // We add them as ommited anyhow so that downstream code can print them for + // We add them as omitted anyhow so that downstream code can print them for // instance. if (!filter(pkginfo)) { @@ -1476,7 +1476,7 @@ namespace mamba::solver::libsolv // Pins add solvables to Pol and hence require a call to create_whatprovides. // For some reason we need to add them first. pool.create_whatprovides(); - for (const auto& unkown_job : request.jobs) + for (const auto& unknown_job : request.jobs) { auto xpt = std::visit( [&](const auto& job) -> expected_t @@ -1487,7 +1487,7 @@ namespace mamba::solver::libsolv } return {}; }, - unkown_job + unknown_job ); if (!xpt) { diff --git a/libmamba/src/solver/libsolv/helpers.hpp b/libmamba/src/solver/libsolv/helpers.hpp index ab35f8a126..b7a411b5ea 100644 --- a/libmamba/src/solver/libsolv/helpers.hpp +++ b/libmamba/src/solver/libsolv/helpers.hpp @@ -26,7 +26,7 @@ #include "solver/libsolv/matcher.hpp" /** - * Solver, repo, and solvable helpers dependent on specifi libsolv logic and objects. + * Solver, repo, and solvable helpers are dependent on specific libsolv logic and objects. */ namespace mamba::fs diff --git a/libmamba/src/solver/libsolv/matcher.cpp b/libmamba/src/solver/libsolv/matcher.cpp index 9965d3455b..71efbd3cec 100644 --- a/libmamba/src/solver/libsolv/matcher.cpp +++ b/libmamba/src/solver/libsolv/matcher.cpp @@ -186,7 +186,7 @@ namespace mamba::solver::libsolv Matcher::get_channels(const specs::UnresolvedChannel& uc) -> expected_t { // Channel maps require converting channel to string because unresolved channels are - // akward to compare. + // awkward to compare. auto str = uc.str(); if (const auto it = m_channel_cache.find(str); it != m_channel_cache.end()) { diff --git a/libmamba/src/solver/libsolv/unsolvable.cpp b/libmamba/src/solver/libsolv/unsolvable.cpp index 1a98e670e2..cfc14c79d5 100644 --- a/libmamba/src/solver/libsolv/unsolvable.cpp +++ b/libmamba/src/solver/libsolv/unsolvable.cpp @@ -172,7 +172,7 @@ namespace mamba::solver::libsolv void warn_unexpected_problem(const SolverProblem& problem) { // TODO: Once the new error message are not experimental, we should consider - // reducing this level since it is not somethig the user has control over. + // reducing this level since it is not something the user has control over. LOG_WARNING << "Unexpected empty optionals for problem type " << solv::enum_name(problem.type); } @@ -462,7 +462,7 @@ namespace mamba::solver::libsolv { // A package dependency does not exist. // Could be a wrong name or missing channel. - // This is a partial exaplanation of why a specific solvable (could be any + // This is a partial explanation of why a specific solvable (could be any // of the parent) cannot be installed. if (!source || !dep) { @@ -486,7 +486,7 @@ namespace mamba::solver::libsolv { // Looking for a valid solution to the installation satisfiability expand to // two solvables of same package that cannot be installed together. This is - // a partial exaplanation of why one of the solvables (could be any of the + // a partial explanation of why one of the solvables (could be any of the // parent) cannot be installed. if (!source || !target) { @@ -533,7 +533,7 @@ namespace mamba::solver::libsolv } default: { - // Many more SolverRuleinfo that heve not been encountered. + // Many more SolverRuleinfo that have not been encountered. LOG_WARNING << "Problem type not implemented " << solv::enum_name(type); break; } diff --git a/libmamba/src/solver/problems_graph.cpp b/libmamba/src/solver/problems_graph.cpp index 4038b310f9..6e1c40f092 100644 --- a/libmamba/src/solver/problems_graph.cpp +++ b/libmamba/src/solver/problems_graph.cpp @@ -81,7 +81,7 @@ namespace mamba::solver for (const auto& [id, id_conflicts] : old_conflicts) { // We are trying to detect node that are in conflicts but are not leaves. - // This shows up in Pyhon dependencies because the constraint on ``python`` and + // This shows up in Python dependencies because the constraint on ``python`` and // ``python_abi`` was reversed. if (has_constraint_child(id)) { @@ -94,10 +94,10 @@ namespace mamba::solver // between the ``id_child`` and the parents ``c_parent`` of the ``c``. // This is a bit hacky but the intuition is to replicate the structure of // nodes conflicting with ``id_child`` with ``c_parent``. - // They likely reprensent the same thing and so we want them to be able to + // They likely represent the same thing and so we want them to be able to // merge later on. - // id_child may alrady have been removed through a preivous iteration + // id_child may already have been removed through a previous iteration if (graph.has_node(id_child) && is_constraint(old_graph.node(c))) { for (const node_id c_parent : old_graph.predecessors(c)) @@ -133,8 +133,8 @@ namespace mamba::solver * that will be merged together. * * @param node_indices The indices of nodes of a given type. - * @param merge_criteria A binary function that decices whether two nodes should be merged - * together. The function is assumed to be symetric and transitive. + * @param merge_criteria A binary function that decides whether two nodes should be merged + * together. The function is assumed to be symmetric and transitive. * @return A partition of the the indices in @p node_indices. */ template @@ -157,7 +157,7 @@ namespace mamba::solver std::vector current_group{}; current_group.push_back(id_i); node_added_to_a_group[i] = true; - // This is where we use symetry and transitivity, going through all remaining + // This is where we use symmetry and transitivity, going through all remaining // nodes and adding them to the current group if they match the criteria. for (std::size_t j = i + 1; j < n_nodes; ++j) { @@ -208,8 +208,8 @@ namespace mamba::solver * * Merge by applying the @p merge_criteria to nodes that hold the same type in the variant. * - * @param merge_criteria A binary function that decices whether two nodes should be merged - * together. The function is assumed to be symetric and transitive. + * @param merge_criteria A binary function that decides whether two nodes should be merged + * together. The function is assumed to be symmetric and transitive. * @return For each node type, a partition of the the indices in @p of that type.. */ template @@ -438,8 +438,8 @@ namespace mamba::solver * * Merge by applying the @p merge_criteria to nodes that hold the same type in the variant. * - * @param merge_criteria A binary function that decices whether two nodes should be merged - * together. The function is assumed to be symetric and transitive. + * @param merge_criteria A binary function that decides whether two nodes should be merged + * together. The function is assumed to be symmetric and transitive. * @return A tuple of the graph with newly created nodes (without edges), the new root node, * and a mapping between old node ids and new node ids. */ @@ -733,7 +733,7 @@ namespace mamba::solver ) const -> std::pair { auto builds = std::vector(size()); - // TODO(C++20) *this | std::ranges::transform(invoke_buid_string) | ranges::unique + // TODO(C++20) *this | std::ranges::transform(invoke_build_string) | ranges::unique std::transform( begin(), end(), @@ -840,7 +840,7 @@ namespace mamba::solver last = true, }; - /** Progagate a status up the tree, such as whether the package is installable. */ + /** Propagate a status up the tree, such as whether the package is installable. */ using Status = bool; using node_id = CompressedProblemsGraph::node_id; @@ -867,7 +867,7 @@ namespace mamba::solver * * We need to reimplement a DFS algorithm instead of using the one provided by the one * from DiGraph because we need a more complex exploration, including: - * - Controling the order in which neighbors are explored; + * - Controlling the order in which neighbors are explored; * - Dynamically adding and removing nodes; * - Executing some operations before and after a node is visited; * - Propagating information from the exploration of the subtree back to the current @@ -920,7 +920,7 @@ namespace mamba::solver * Function to decide if a node is not installable. * * For a leaf this sets the final status. - * For other nodes, a pacakge could still be not installable because of its children. + * For other nodes, a package could still be not installable because of its children. */ auto node_not_installable(node_id id) -> Status; @@ -1005,7 +1005,7 @@ namespace mamba::solver return false; } - // Assuming any other type of leave is a kind of problem and other nodes not. + // Assuming any other type of leaves is a kind of problem and other nodes not. return m_pbs.graph().successors(id).size() == 0; } @@ -1016,7 +1016,7 @@ namespace mamba::solver const bool is_visited = m_node_visited.at(id).has_value(); // We purposefully check if the node is a leaf before checking if it // is visited because showing a single node again is more intelligible than - // refering to another one. + // referring to another one. if (!has_successors) { return TreeNode::Type::leaf; @@ -1041,7 +1041,7 @@ namespace mamba::solver std::string key = edge.name(); if (!name_only) { - // Making up an arbitrary string represnetation of the edge + // Making up an arbitrary string representation of the edge key += edge.versions_and_build_strings_trunc( "", "", @@ -1096,7 +1096,7 @@ namespace mamba::solver const auto child_pos = last ? SiblingNumber::last : SiblingNumber::not_last; Status status; std::tie(out, status) = visit_node(children_ids[i], child_pos, ongoing, out); - // If there are any valid option in the split, the split is iself valid. + // If there are any valid options in the split, the split is itself valid. ongoing.status |= status; } @@ -1350,7 +1350,7 @@ namespace mamba::solver } else { - // Single depenency with only name constraint often end up looking like + // Single dependency with only name constraint often end up looking like // ``python =* *`` so we strip all this. // Best would be to handle this with a richer NamedList that contains // ``VersionSpecs`` to avoid flaky reliance on string modification. diff --git a/libmamba/src/specs/build_number_spec.cpp b/libmamba/src/specs/build_number_spec.cpp index a576b8641b..860c189883 100644 --- a/libmamba/src/specs/build_number_spec.cpp +++ b/libmamba/src/specs/build_number_spec.cpp @@ -126,7 +126,7 @@ fmt::formatter::format( using Op = std::decay_t; if constexpr (std::is_same_v) { - out = fmt::format_to(out, "{}", BuildNumberSpec::prefered_free_str); + out = fmt::format_to(out, "{}", BuildNumberSpec::preferred_free_str); } if constexpr (std::is_same_v>) { diff --git a/libmamba/src/specs/conda_url.cpp b/libmamba/src/specs/conda_url.cpp index 622d342afb..46b45a0d1a 100644 --- a/libmamba/src/specs/conda_url.cpp +++ b/libmamba/src/specs/conda_url.cpp @@ -305,7 +305,7 @@ namespace mamba::specs if (!plat.has_value()) { throw std::invalid_argument( - fmt::format(R"(No platform in orignial path "{}")", path(Decode::no)) + fmt::format(R"(No platform in original path "{}")", path(Decode::no)) ); } assert(1 < len); @@ -351,7 +351,7 @@ namespace mamba::specs auto CondaURL::package(Decode::no_type) const -> std::string_view { - // Must not decode to find the meaningful '/' spearators + // Must not decode to find the meaningful '/' separators const auto& l_path = path(Decode::no); if (has_archive_extension(l_path)) { @@ -374,7 +374,7 @@ namespace mamba::specs fmt::format(R"(Invalid CondaURL package "{}", use path_append instead)", pkg) ); } - // Must not decode to find the meaningful '/' spearators + // Must not decode to find the meaningful '/' separators if (has_archive_extension(path(Decode::no))) { auto l_path = clear_path(); @@ -390,7 +390,7 @@ namespace mamba::specs auto CondaURL::clear_package() -> bool { - // Must not decode to find the meaningful '/' spearators + // Must not decode to find the meaningful '/' separators if (has_archive_extension(path(Decode::no))) { auto l_path = clear_path(); diff --git a/libmamba/src/specs/match_spec.cpp b/libmamba/src/specs/match_spec.cpp index 1331357928..e5fb33fdd6 100644 --- a/libmamba/src/specs/match_spec.cpp +++ b/libmamba/src/specs/match_spec.cpp @@ -80,16 +80,16 @@ namespace mamba::specs namespace { inline constexpr auto open_or_quote_tokens = std::array{ - MatchSpec::prefered_list_open, + MatchSpec::preferred_list_open, MatchSpec::alt_list_open, - MatchSpec::prefered_quote, + MatchSpec::preferred_quote, MatchSpec::alt_quote, }; inline constexpr auto close_or_quote_tokens = std::array{ - MatchSpec::prefered_list_close, + MatchSpec::preferred_list_close, MatchSpec::alt_list_close, - MatchSpec::prefered_quote, + MatchSpec::preferred_quote, MatchSpec::alt_quote, }; @@ -180,7 +180,7 @@ namespace mamba::specs return util::strip_if( str, [](char c) -> bool { - return !util::is_graphic(c) || (c == MatchSpec::prefered_quote) + return !util::is_graphic(c) || (c == MatchSpec::preferred_quote) || (c == MatchSpec::alt_quote); } @@ -410,7 +410,7 @@ namespace mamba::specs // - ``target=blarg,optional`` // - ``build=3`` - if (!util::ends_with(str, MatchSpec::prefered_list_close) + if (!util::ends_with(str, MatchSpec::preferred_list_close) && !util::ends_with(str, MatchSpec::alt_list_close)) { return str; @@ -1107,7 +1107,7 @@ fmt::formatter<::mamba::specs::MatchSpec>::format( out = fmt::format_to( out, "{}", - bracket_written ? MatchSpec::attribute_sep : MatchSpec::prefered_list_open + bracket_written ? MatchSpec::attribute_sep : MatchSpec::preferred_list_open ); bracket_written = true; }; @@ -1115,7 +1115,7 @@ fmt::formatter<::mamba::specs::MatchSpec>::format( { if (bracket_written) { - out = fmt::format_to(out, "{}", MatchSpec::prefered_list_close); + out = fmt::format_to(out, "{}", MatchSpec::preferred_list_close); } }; @@ -1124,18 +1124,18 @@ fmt::formatter<::mamba::specs::MatchSpec>::format( if (const auto& ver = spec.version(); !ver.is_explicitly_free()) { ensure_bracket_open_or_comma(); - out = fmt::format_to(out, "version={0}{1}{0}", MatchSpec::prefered_quote, ver); + out = fmt::format_to(out, "version={0}{1}{0}", MatchSpec::preferred_quote, ver); } if (const auto& bs = spec.build_string(); !bs.is_explicitly_free()) { ensure_bracket_open_or_comma(); - out = fmt::format_to(out, "build={0}{1}{0}", MatchSpec::prefered_quote, bs); + out = fmt::format_to(out, "build={0}{1}{0}", MatchSpec::preferred_quote, bs); } } if (const auto& num = spec.build_number(); !num.is_explicitly_free()) { ensure_bracket_open_or_comma(); - out = fmt::format_to(out, "build_number={0}{1}{0}", MatchSpec::prefered_quote, num); + out = fmt::format_to(out, "build_number={0}{1}{0}", MatchSpec::preferred_quote, num); } if (const auto& tf = spec.track_features(); tf.has_value() && !tf->get().empty()) { @@ -1143,7 +1143,7 @@ fmt::formatter<::mamba::specs::MatchSpec>::format( out = fmt::format_to( out, "track_features={0}{1}{0}", - MatchSpec::prefered_quote, + MatchSpec::preferred_quote, fmt::join(tf->get(), std::string_view(&MatchSpec::feature_sep.front(), 1)) ); } diff --git a/libmamba/src/specs/unresolved_channel.cpp b/libmamba/src/specs/unresolved_channel.cpp index f9ae6bbe08..ff7bb0942c 100644 --- a/libmamba/src/specs/unresolved_channel.cpp +++ b/libmamba/src/specs/unresolved_channel.cpp @@ -181,7 +181,7 @@ namespace mamba::specs if (m_type == Type::Unknown) { m_location = unknown_channel; - // Allowing in any platform filters for unkown type can be useful in MatchSpec + // Allowing in any platform filters for unknown type can be useful in MatchSpec } if (m_location.empty()) { diff --git a/libmamba/src/specs/version.cpp b/libmamba/src/specs/version.cpp index 50c6551765..d46115d95b 100644 --- a/libmamba/src/specs/version.cpp +++ b/libmamba/src/specs/version.cpp @@ -103,7 +103,7 @@ namespace mamba::specs return num_ord; } - // Certain literals have sepcial meaning we map then to a priority + // Certain literals have special meaning we map then to a priority // 0 meaning regular string auto lit_priority = [](const auto& l) -> int { @@ -142,7 +142,7 @@ namespace mamba::specs auto VersionPartAtom::operator==(const VersionPartAtom& other) const -> bool { - // More efficient thatn three way comparison because of edge cases + // More efficient than three way comparison because of edge cases auto attrs = [](const VersionPartAtom& a) -> std::tuple { return { a.numeral(), a.literal() }; }; return attrs(*this) == attrs(other); @@ -150,7 +150,7 @@ namespace mamba::specs auto VersionPartAtom::operator!=(const VersionPartAtom& other) const -> bool { - // More efficient thatn three way comparison + // More efficient than three way comparison return !(*this == other); } @@ -233,7 +233,7 @@ namespace mamba::specs auto Version::str(std::size_t level) const -> std::string { // We should be able to do, as it works with numbers but it is not clear how this works - // with the cusotm parser + // with the custom parser // return fmt::format("{:{}}", *this, level); auto fmt = fmt::format("{{:{}}}", level); return fmt::format(fmt, *this); @@ -242,15 +242,15 @@ namespace mamba::specs namespace { /** - * Compare two range where some trailing elements can be considered as empty. + * Compare two ranges where some trailing elements can be considered as empty. * * If ``0`` is considered "empty" then all the ranges ``[1, 2] and ``[1, 2, 0]``, * ``[1, 2, 0, 0]`` are considered equal, however ``[1, 2]`` and ``[1, 0, 2]`` are not. - * Similarily ``[1, 1] is less than ``[1, 2, 0]`` but more than ``[1, 1, -1]`` + * Similarly ``[1, 1] is less than ``[1, 2, 0]`` but more than ``[1, 1, -1]`` * because ``-1 < 0``. * - * @return The comparison between the two sequence - * @return The first index where the two sequence diverge. + * @return The comparison between the two sequences + * @return The first index where the two sequences diverge. */ template constexpr auto lexicographical_compare_three_way_trailing( @@ -277,7 +277,7 @@ namespace mamba::specs } // They have the same leading elements but 1 has more elements - // We do a lexicographic compare with an infite sequence of empties + // We do a lexicographic comparison with an infinite sequence of empties if ((iter1 != last1)) { for (; iter1 != last1; ++iter1) @@ -290,7 +290,7 @@ namespace mamba::specs } // first2 != last2 // They have the same leading elements but 2 has more elements - // We do a lexicographic compare with an infite sequence of empties + // We do a lexicographic comparison with an infinite sequence of empties if ((iter2 != last2)) { for (; iter2 != last2; ++iter2) @@ -671,7 +671,7 @@ namespace mamba::specs while (true) { tail_delim_pos = tail.find_first_of(delims); - // `_` is both a delimiter and has sepcial meaning. + // `_` is both a delimiter and has special meaning. // We need to check if it is at the end and omit it if ((tail_delim_pos == tail.size() - 1) && tail[tail_delim_pos] == Version::part_delim_special) diff --git a/libmamba/src/specs/version_spec.cpp b/libmamba/src/specs/version_spec.cpp index 8899a4dbf7..6bc74139bc 100644 --- a/libmamba/src/specs/version_spec.cpp +++ b/libmamba/src/specs/version_spec.cpp @@ -587,7 +587,7 @@ fmt::formatter::format( auto out = ctx.out(); if (spec.m_tree.empty()) { - return fmt::format_to(out, "{}", VersionSpec::prefered_free_str); + return fmt::format_to(out, "{}", VersionSpec::preferred_free_str); } spec.m_tree.infix_for_each( [&](const auto& token) diff --git a/libmamba/src/util/url.cpp b/libmamba/src/util/url.cpp index b4105d9632..e3d4b39375 100644 --- a/libmamba/src/util/url.cpp +++ b/libmamba/src/util/url.cpp @@ -68,7 +68,7 @@ namespace mamba::util /** * A RAII wrapper for string mananged by CURL. * - * String can possibly be null, or zero-lenght, depending on the data returned by CURL. + * String can possibly be null, or zero-length, depending on the data returned by CURL. */ class CurlStr { diff --git a/libmamba/tests/src/core/test_channel_context.cpp b/libmamba/tests/src/core/test_channel_context.cpp index 219bccea08..3821b260fd 100644 --- a/libmamba/tests/src/core/test_channel_context.cpp +++ b/libmamba/tests/src/core/test_channel_context.cpp @@ -245,7 +245,7 @@ TEST_SUITE("ChannelContext") ); } - // Explicilty override defaults + // Explicitly override defaults { const auto& defaults = chan_ctx.params().custom_multichannels.at("defaults"); @@ -371,7 +371,7 @@ TEST_SUITE("ChannelContext") ); } - // Explicilty created defaults + // Explicitly created defaults { const auto& defaults = chan_ctx.params().custom_multichannels.at("defaults"); diff --git a/libmamba/tests/src/core/test_configuration.cpp b/libmamba/tests/src/core/test_configuration.cpp index 421454c00d..a221f0f6d3 100644 --- a/libmamba/tests/src/core/test_configuration.cpp +++ b/libmamba/tests/src/core/test_configuration.cpp @@ -104,7 +104,7 @@ namespace mamba private: - // Variables to restore the original COntext state and avoid + // Variables to restore the original Context state and avoid // side effect across the tests. A better solution would be to // save and restore the whole context (that requires refactoring // of the Context class) diff --git a/libmamba/tests/src/core/test_env_lockfile.cpp b/libmamba/tests/src/core/test_env_lockfile.cpp index 19019165d6..df5d5651fa 100644 --- a/libmamba/tests/src/core/test_env_lockfile.cpp +++ b/libmamba/tests/src/core/test_env_lockfile.cpp @@ -48,7 +48,7 @@ namespace mamba const auto error = maybe_lockfile.error(); REQUIRE_EQ(mamba_error_code::env_lockfile_parsing_failed, error.error_code()); const auto& error_details = EnvLockFileError::get_details(error); - CHECK_EQ(file_parsing_error_code::unsuported_version, error_details.parsing_error_code); + CHECK_EQ(file_parsing_error_code::unsupported_version, error_details.parsing_error_code); } TEST_CASE("valid_no_package_succeed") diff --git a/libmamba/tests/src/core/test_execution.cpp b/libmamba/tests/src/core/test_execution.cpp index aa095b9429..6d2addb41e 100644 --- a/libmamba/tests/src/core/test_execution.cpp +++ b/libmamba/tests/src/core/test_execution.cpp @@ -46,7 +46,7 @@ namespace mamba TEST_CASE("stop_default_always_succeeds") { MainExecutor::stop_default(); // Make sure no other default main executor is running. - MainExecutor::instance(); // Make sure we use the defaut main executor. + MainExecutor::instance(); // Make sure we use the default main executor. MainExecutor::stop_default(); // Stop the default main executor and make sure it's not // enabled for the following tests. MainExecutor::stop_default(); // However the number of time we call it it should never diff --git a/libmamba/tests/src/core/test_lockfile.cpp b/libmamba/tests/src/core/test_lockfile.cpp index c73fb5ac02..c35afe684a 100644 --- a/libmamba/tests/src/core/test_lockfile.cpp +++ b/libmamba/tests/src/core/test_lockfile.cpp @@ -146,7 +146,7 @@ namespace mamba } catch (...) { - std::cout << "convertion error" << std::endl; + std::cout << "conversion error" << std::endl; } CHECK(is_locked); @@ -168,7 +168,7 @@ namespace mamba } catch (...) { - std::cout << "convertion error" << std::endl; + std::cout << "conversion error" << std::endl; } CHECK_FALSE(new_lock_created); } @@ -270,7 +270,7 @@ namespace mamba } catch (...) { - std::cout << "convertion error" << std::endl; + std::cout << "conversion error" << std::endl; } CHECK(is_locked); @@ -292,7 +292,7 @@ namespace mamba } catch (...) { - std::cout << "convertion error" << std::endl; + std::cout << "conversion error" << std::endl; } CHECK_FALSE(new_lock_created); } diff --git a/libmamba/tests/src/core/test_virtual_packages.cpp b/libmamba/tests/src/core/test_virtual_packages.cpp index a0e89f139f..c93bc2e6ae 100644 --- a/libmamba/tests/src/core/test_virtual_packages.cpp +++ b/libmamba/tests/src/core/test_virtual_packages.cpp @@ -81,7 +81,7 @@ namespace mamba CHECK_EQ(pkgs.back().build_string.find("x86_64"), 0); #endif - // This is bad design, tests should not interfer + // This is bad design, tests should not interfere // Will get rid of that when implementing context as not a singleton auto restore_ctx = [&ctx, old_plat = ctx.platform]() { ctx.platform = old_plat; }; auto finally = Finally{ restore_ctx }; diff --git a/libmamba/tests/src/solver/libsolv/test_solver.cpp b/libmamba/tests/src/solver/libsolv/test_solver.cpp index 1234924f43..5263975c1d 100644 --- a/libmamba/tests/src/solver/libsolv/test_solver.cpp +++ b/libmamba/tests/src/solver/libsolv/test_solver.cpp @@ -879,7 +879,7 @@ TEST_SUITE("solver::libsolv::solver") ); REQUIRE(repo_linux.has_value()); - // FIXME the subdir is not overriden here so it is still linux-64 because that's what + // FIXME the subdir is not overridden here so it is still linux-64 because that's what // is in the json file. // We'de want to pass option to the database to override channel and subsir. const auto repo_noarch = db.add_repo_from_repodata_json( diff --git a/libmamba/tests/src/solver/test_problems_graph.cpp b/libmamba/tests/src/solver/test_problems_graph.cpp index 8c6d9d9f08..4eae01825b 100644 --- a/libmamba/tests/src/solver/test_problems_graph.cpp +++ b/libmamba/tests/src/solver/test_problems_graph.cpp @@ -34,7 +34,7 @@ using namespace mamba::solver; TEST_SUITE("solver::conflict_map") { - TEST_CASE("symetric") + TEST_CASE("symmetric") { auto c = conflict_map(); CHECK_EQ(c.size(), 0); @@ -100,7 +100,7 @@ namespace /** * Create a solver and a database of a conflict. * - * The underlying packages do not exist, we are onl interested in the conflict. + * The underlying packages do not exist, we are only interested in the conflict. */ template auto create_pkgs_database(ChannelContext& channel_context, const PkgRange& packages) @@ -370,7 +370,7 @@ namespace const std::vector& platforms = { "linux-64", "noarch" } ) { - // Reusing the cache for all invocation of this funciton for speedup + // Reusing the cache for all invocations of this function for speedup static const auto tmp_dir = TemporaryDirectory(); diff --git a/libmamba/tests/src/specs/test_channel.cpp b/libmamba/tests/src/specs/test_channel.cpp index 2ac7846cb8..7da74db183 100644 --- a/libmamba/tests/src/specs/test_channel.cpp +++ b/libmamba/tests/src/specs/test_channel.cpp @@ -851,7 +851,7 @@ TEST_SUITE("specs::channel") auto found_names = util::flat_set(); for (const auto& chan : channels) { - CHECK_EQ(chan.platforms(), uc.platform_filters()); // Overriden + CHECK_EQ(chan.platforms(), uc.platform_filters()); // Overridden found_names.insert(chan.display_name()); } CHECK_EQ(found_names, util::flat_set{ "pkgs/main", "pkgs/pro", "pkgs/r" }); diff --git a/libmamba/tests/src/specs/test_conda_url.cpp b/libmamba/tests/src/specs/test_conda_url.cpp index 4913e9a46a..5a7bc386ed 100644 --- a/libmamba/tests/src/specs/test_conda_url.cpp +++ b/libmamba/tests/src/specs/test_conda_url.cpp @@ -97,7 +97,7 @@ TEST_SUITE("specs::CondaURL") { url.set_path("/bar/t/xy-12345678-1234-1234-1234-123456789012/"); CHECK_FALSE(url.has_token()); - CHECK_EQ(url.token(), ""); // Not at begining of path + CHECK_EQ(url.token(), ""); // Not at beginning of path url.set_token("abcd"); CHECK(url.has_token()); @@ -223,11 +223,11 @@ TEST_SUITE("specs::CondaURL") url.set_path("conda-forge/OSX-64"); CHECK_EQ(url.platform(), KnownPlatform::osx_64); - CHECK_EQ(url.platform_name(), "OSX-64"); // Captialization not changed + CHECK_EQ(url.platform_name(), "OSX-64"); // Capitalization not changed url.set_platform("Win-64"); CHECK_EQ(url.platform(), KnownPlatform::win_64); - CHECK_EQ(url.path(), "/conda-forge/Win-64"); // Captialization not changed + CHECK_EQ(url.path(), "/conda-forge/Win-64"); // Capitalization not changed CHECK(url.clear_platform()); CHECK_EQ(url.path(), "/conda-forge"); @@ -364,7 +364,7 @@ TEST_SUITE("specs::CondaURL") CondaURL url = {}; url.set_host("mamba.org"); - SUBCASE("defaut scheme") + SUBCASE("default scheme") { CHECK_EQ(url.pretty_str(CondaURL::StripScheme::no), "https://mamba.org/"); CHECK_EQ(url.pretty_str(CondaURL::StripScheme::yes), "mamba.org/"); diff --git a/libmamba/tests/src/specs/test_match_spec.cpp b/libmamba/tests/src/specs/test_match_spec.cpp index 5b7ef365fc..0ade3a8523 100644 --- a/libmamba/tests/src/specs/test_match_spec.cpp +++ b/libmamba/tests/src/specs/test_match_spec.cpp @@ -445,7 +445,7 @@ TEST_SUITE("specs::match_spec") } } - TEST_CASE("Conda discrepencies") + TEST_CASE("Conda discrepancies") { SUBCASE("python=3.7=bld") { diff --git a/libmamba/tests/src/specs/test_platform.cpp b/libmamba/tests/src/specs/test_platform.cpp index ad9e56d892..7aa4a32fd3 100644 --- a/libmamba/tests/src/specs/test_platform.cpp +++ b/libmamba/tests/src/specs/test_platform.cpp @@ -46,7 +46,7 @@ TEST_SUITE("specs::platform") { SUBCASE("KnownPlatform") { - // Making sure no-one forgot to ad the platform witha specific OS + // Making sure no-one forgot to add the platform with a specific OS for (auto plat : known_platforms()) { auto check = platform_is_linux(plat) // diff --git a/libmamba/tests/src/specs/test_version.cpp b/libmamba/tests/src/specs/test_version.cpp index d1dfae5044..513a921895 100644 --- a/libmamba/tests/src/specs/test_version.cpp +++ b/libmamba/tests/src/specs/test_version.cpp @@ -84,7 +84,7 @@ TEST_SUITE("specs::version") // Different epoch 0!2post < 1!1dev CHECK_LT(Version(0, { { { 2, "post" } } }), Version(1, { { { 1, "dev" } } })); CHECK_GE(Version(1, { { { 1, "dev" } } }), Version(0, { { { 2, "post" } } })); - // Different lenght with dev + // Different length with dev CHECK_LT(Version(0, { { { 1 } }, { { 0, "dev" } } }), Version(0, { { { 1 } } })); CHECK_LT(Version(0, { { { 1 } }, { { 0 } }, { { 0, "dev" } } }), Version(0, { { { 1 } } })); // Different major 0!1post < 0!2dev diff --git a/libmamba/tests/src/specs/test_version_spec.cpp b/libmamba/tests/src/specs/test_version_spec.cpp index 630a3ca52f..fb5c097ef1 100644 --- a/libmamba/tests/src/specs/test_version_spec.cpp +++ b/libmamba/tests/src/specs/test_version_spec.cpp @@ -370,7 +370,7 @@ TEST_SUITE("specs::version_spec") // CHECK("1.*.1"_vs.contains("1.7.1"_v)); } - SUBCASE("Unsuccesful") + SUBCASE("Unsuccessful") { using namespace std::literals::string_view_literals; static constexpr auto bad_specs = std::array{ diff --git a/libmamba/tests/src/util/test_encoding.cpp b/libmamba/tests/src/util/test_encoding.cpp index f46993bbfc..56a8271ef7 100644 --- a/libmamba/tests/src/util/test_encoding.cpp +++ b/libmamba/tests/src/util/test_encoding.cpp @@ -109,7 +109,7 @@ TEST_SUITE("util::encoding") } } - TEST_CASE("precent") + TEST_CASE("percent") { SUBCASE("encode") { diff --git a/libmamba/tests/src/util/test_environment.cpp b/libmamba/tests/src/util/test_environment.cpp index 7d0eed316b..f3f6bdccb7 100644 --- a/libmamba/tests/src/util/test_environment.cpp +++ b/libmamba/tests/src/util/test_environment.cpp @@ -84,23 +84,23 @@ TEST_SUITE("util::environment") { const auto restore = mambatests::EnvironmentCleaner(); - const auto key_inexistant = std::string(u8"CONDA😀"); + const auto key_inexistent = std::string(u8"CONDA😀"); const auto key_unchanged = std::string(u8"MAMBA😀"); const auto key_changed = std::string(u8"PIXI😀"); - CHECK_FALSE(get_env(key_inexistant).has_value()); + CHECK_FALSE(get_env(key_inexistent).has_value()); CHECK_FALSE(get_env(key_unchanged).has_value()); CHECK_FALSE(get_env(key_changed).has_value()); const auto val_set_1 = std::string(u8"a😀"); update_env_map({ { key_changed, val_set_1 }, { key_unchanged, val_set_1 } }); - CHECK_EQ(get_env(key_inexistant), std::nullopt); + CHECK_EQ(get_env(key_inexistent), std::nullopt); CHECK_EQ(get_env(key_unchanged), val_set_1); CHECK_EQ(get_env(key_changed), val_set_1); const auto val_set_2 = std::string(u8"b😀"); update_env_map({ { key_changed, val_set_2 } }); - CHECK_EQ(get_env(key_inexistant), std::nullopt); + CHECK_EQ(get_env(key_inexistent), std::nullopt); CHECK_EQ(get_env(key_unchanged), val_set_1); CHECK_EQ(get_env(key_changed), val_set_2); } @@ -109,23 +109,23 @@ TEST_SUITE("util::environment") { const auto restore = mambatests::EnvironmentCleaner(); - const auto key_inexistant = std::string(u8"CONDA🤗"); + const auto key_inexistent = std::string(u8"CONDA🤗"); const auto key_unchanged = std::string(u8"MAMBA🤗"); const auto key_changed = std::string(u8"PIXI🤗"); - CHECK_FALSE(get_env(key_inexistant).has_value()); + CHECK_FALSE(get_env(key_inexistent).has_value()); CHECK_FALSE(get_env(key_unchanged).has_value()); CHECK_FALSE(get_env(key_changed).has_value()); const auto val_set_1 = std::string(u8"a😀"); set_env_map({ { key_changed, val_set_1 }, { key_unchanged, val_set_1 } }); - CHECK_EQ(get_env(key_inexistant), std::nullopt); + CHECK_EQ(get_env(key_inexistent), std::nullopt); CHECK_EQ(get_env(key_unchanged), val_set_1); CHECK_EQ(get_env(key_changed), val_set_1); const auto val_set_2 = std::string(u8"b😀"); set_env_map({ { key_changed, val_set_2 } }); - CHECK_EQ(get_env(key_inexistant), std::nullopt); + CHECK_EQ(get_env(key_inexistent), std::nullopt); CHECK_EQ(get_env(key_unchanged), std::nullopt); // Difference with update_env_map CHECK_EQ(get_env(key_changed), val_set_2); } @@ -195,7 +195,7 @@ TEST_SUITE("util::environment") TEST_CASE("which_in") { - SUBCASE("Inexistant search dirs") + SUBCASE("Inexistent search dirs") { CHECK_EQ(which_in("echo", "/obviously/does/not/exist"), ""); } @@ -255,9 +255,9 @@ TEST_SUITE("util::environment") } } - SUBCASE("Inexistant path") + SUBCASE("Inexistent path") { - CHECK_EQ(which("obvisously-does-not-exist"), ""); + CHECK_EQ(which("obviously-does-not-exist"), ""); } } } diff --git a/libmamba/tests/src/util/test_flat_set.cpp b/libmamba/tests/src/util/test_flat_set.cpp index 32725c26de..570fc3cf23 100644 --- a/libmamba/tests/src/util/test_flat_set.cpp +++ b/libmamba/tests/src/util/test_flat_set.cpp @@ -185,15 +185,15 @@ TEST_SUITE("util::flat_set") CHECK_EQ(set_difference(s3, s2), s3); } - SUBCASE("Symetric difference") + SUBCASE("Symmetric difference") { - CHECK_EQ(set_symetric_difference(s1, s1), flat_set{}); - CHECK_EQ(set_symetric_difference(s1, s2), flat_set{ 1, 4 }); - CHECK_EQ(set_symetric_difference(s2, s1), set_symetric_difference(s1, s2)); - CHECK_EQ(set_symetric_difference(s1, s3), flat_set{ 1, 3, 5, 6 }); - CHECK_EQ(set_symetric_difference(s3, s1), set_symetric_difference(s1, s3)); - CHECK_EQ(set_symetric_difference(s2, s3), flat_set{ 3, 4, 5, 6 }); - CHECK_EQ(set_symetric_difference(s3, s2), set_symetric_difference(s2, s3)); + CHECK_EQ(set_symmetric_difference(s1, s1), flat_set{}); + CHECK_EQ(set_symmetric_difference(s1, s2), flat_set{ 1, 4 }); + CHECK_EQ(set_symmetric_difference(s2, s1), set_symmetric_difference(s1, s2)); + CHECK_EQ(set_symmetric_difference(s1, s3), flat_set{ 1, 3, 5, 6 }); + CHECK_EQ(set_symmetric_difference(s3, s1), set_symmetric_difference(s1, s3)); + CHECK_EQ(set_symmetric_difference(s2, s3), flat_set{ 3, 4, 5, 6 }); + CHECK_EQ(set_symmetric_difference(s3, s2), set_symmetric_difference(s2, s3)); } SUBCASE("Algebra") @@ -210,12 +210,12 @@ TEST_SUITE("util::flat_set") set_union(u, v) ); CHECK_EQ( - set_union(set_symetric_difference(u, v), set_intersection(u, v)), + set_union(set_symmetric_difference(u, v), set_intersection(u, v)), set_union(u, v) ); CHECK_EQ( set_difference(set_union(u, v), set_intersection(u, v)), - set_symetric_difference(u, v) + set_symmetric_difference(u, v) ); } } diff --git a/libmamba/tests/src/util/test_graph.cpp b/libmamba/tests/src/util/test_graph.cpp index f4b803cf95..353163da01 100644 --- a/libmamba/tests/src/util/test_graph.cpp +++ b/libmamba/tests/src/util/test_graph.cpp @@ -492,10 +492,10 @@ TEST_SUITE("util::graph") { CAPTURE(std::pair(g.node(from), g.node(to))); const auto from_pos = std::find(sorted.cbegin(), sorted.cend(), from); - // Must be true given the permuation assumption + // Must be true given the permutation assumption REQUIRE_LT(from_pos, sorted.cend()); const auto to_pos = std::find(sorted.cbegin(), sorted.cend(), to); - // Must be true given the permuation assumption + // Must be true given the permutation assumption REQUIRE_LT(to_pos, sorted.cend()); // The topological sort property CHECK_LT(from_pos, to_pos); diff --git a/libmamba/tests/src/util/test_parsers.cpp b/libmamba/tests/src/util/test_parsers.cpp index 4d34d16def..1fd1581c5e 100644 --- a/libmamba/tests/src/util/test_parsers.cpp +++ b/libmamba/tests/src/util/test_parsers.cpp @@ -134,7 +134,7 @@ TEST_SUITE("util::parsers") ParseError::InvalidInput ); - // The following unfortunaltely does not work as we would need to allocate a stack + // The following unfortunately does not work as we would need to allocate a stack // to keep track of the opening and closing of parentheses. // CHECK_EQ( // find_not_in_parentheses("(hello, [world, )welcome, here],", ',', opens, diff --git a/libmamba/tests/src/util/test_tuple_hash.cpp b/libmamba/tests/src/util/test_tuple_hash.cpp index faf7c47d06..013e09983a 100644 --- a/libmamba/tests/src/util/test_tuple_hash.cpp +++ b/libmamba/tests/src/util/test_tuple_hash.cpp @@ -20,7 +20,8 @@ TEST_SUITE("util::tuple_hash") const auto t1 = std::tuple{ 33, std::string("hello") }; CHECK_NE(hash_tuple(t1), 0); - // Hash colision are hard to predict, but this is so trivial it is likely a bug if it fails. + // Hash collision are hard to predict, but this is so trivial it is likely a bug if it + // fails. const auto t2 = std::tuple{ 0, std::string("hello") }; CHECK_NE(hash_tuple(t1), hash_tuple(t2)); @@ -31,7 +32,8 @@ TEST_SUITE("util::tuple_hash") TEST_CASE("hash_combine_val_range") { const auto hello = std::string("hello"); - // Hash colision are hard to predict, but this is so trivial it is likely a bug if it fails. + // Hash collision are hard to predict, but this is so trivial it is likely a bug if it + // fails. CHECK_NE(hash_combine_val_range(0, hello.cbegin(), hello.cend()), 0); CHECK_NE(hash_combine_val_range(0, hello.crbegin(), hello.crend()), 0); CHECK_NE( @@ -44,7 +46,8 @@ TEST_SUITE("util::tuple_hash") { const auto hello = std::string("hello"); const auto world = std::string("world"); - // Hash colision are hard to predict, but this is so trivial it is likely a bug if it fails. + // Hash collision are hard to predict, but this is so trivial it is likely a bug if it + // fails. CHECK_NE(hash_range(hello), 0); CHECK_NE(hash_range(world), 0); CHECK_NE(hash_range(hello), hash_range(world)); diff --git a/libmamba/tests/src/util/test_url.cpp b/libmamba/tests/src/util/test_url.cpp index 86ee19aebb..6cee0325a7 100644 --- a/libmamba/tests/src/util/test_url.cpp +++ b/libmamba/tests/src/util/test_url.cpp @@ -421,7 +421,7 @@ TEST_SUITE("util::URL") URL url = {}; url.set_host("mamba.org"); - SUBCASE("defaut scheme") + SUBCASE("default scheme") { CHECK_EQ(url.pretty_str(URL::StripScheme::no), "https://mamba.org/"); CHECK_EQ(url.pretty_str(URL::StripScheme::yes), "mamba.org/"); diff --git a/libmambapy/src/libmambapy/bindings/legacy.cpp b/libmambapy/src/libmambapy/bindings/legacy.cpp index 477bcbb000..28c45f1589 100644 --- a/libmambapy/src/libmambapy/bindings/legacy.cpp +++ b/libmambapy/src/libmambapy/bindings/legacy.cpp @@ -101,7 +101,7 @@ namespace mambapy mamba::MainExecutor m_main_executor; mamba::Context m_context{ { /* .enable_logging_and_signal_handling = */ true } }; mamba::Console m_console{ m_context }; - // ChannelContext needs to be lazy initialized, to enusre the Context has been initialized + // ChannelContext needs to be lazy initialized, to ensure the Context has been initialized // before std::unique_ptr p_channel_context = nullptr; mamba::Configuration m_config{ m_context }; diff --git a/libmambapy/src/libmambapy/bindings/solver.cpp b/libmambapy/src/libmambapy/bindings/solver.cpp index 60eb0c6cbc..7e7176dd30 100644 --- a/libmambapy/src/libmambapy/bindings/solver.cpp +++ b/libmambapy/src/libmambapy/bindings/solver.cpp @@ -17,13 +17,13 @@ namespace mamba::solver { - // Fix Pybind11 py::bind_vector has trouble detecting the abscence - // of comparions operators, so we tell it explicitly. + // Fix Pybind11 py::bind_vector has trouble detecting the absence + // of comparison operators, so we tell it explicitly. auto operator==(const Request::Job&, const Request::Job&) -> bool = delete; auto operator!=(const Request::Job&, const Request::Job&) -> bool = delete; - // Fix Pybind11 py::bind_vector has trouble detecting the abscence - // of comparions operators, so we tell it explicitly. + // Fix Pybind11 py::bind_vector has trouble detecting the absence + // of comparison operators, so we tell it explicitly. auto operator==(const Solution::Action&, const Solution::Action&) -> bool = delete; auto operator!=(const Solution::Action&, const Solution::Action&) -> bool = delete; } diff --git a/libmambapy/src/libmambapy/bindings/specs.cpp b/libmambapy/src/libmambapy/bindings/specs.cpp index b2a35a4483..21556dfa0d 100644 --- a/libmambapy/src/libmambapy/bindings/specs.cpp +++ b/libmambapy/src/libmambapy/bindings/specs.cpp @@ -594,7 +594,7 @@ namespace mambapy .def_readonly_static("or_token", &VersionSpec::or_token) .def_readonly_static("left_parenthesis_token", &VersionSpec::left_parenthesis_token) .def_readonly_static("right_parenthesis_token", &VersionSpec::right_parenthesis_token) - .def_readonly_static("prefered_free_str", &VersionSpec::prefered_free_str) + .def_readonly_static("preferred_free_str", &VersionSpec::preferred_free_str) .def_readonly_static("all_free_strs", &VersionSpec::all_free_strs) .def_readonly_static("starts_with_str", &VersionSpec::starts_with_str) .def_readonly_static("equal_str", &VersionSpec::equal_str) @@ -763,11 +763,11 @@ namespace mambapy .def_property_readonly_static("NameSpec", &py::type::of) .def_property_readonly_static("BuildStringSpec", &py::type::of) .def_readonly_static("url_md5_sep", &MatchSpec::url_md5_sep) - .def_readonly_static("prefered_list_open", &MatchSpec::prefered_list_open) - .def_readonly_static("prefered_list_close", &MatchSpec::prefered_list_close) + .def_readonly_static("preferred_list_open", &MatchSpec::preferred_list_open) + .def_readonly_static("preferred_list_close", &MatchSpec::preferred_list_close) .def_readonly_static("alt_list_open", &MatchSpec::alt_list_open) .def_readonly_static("alt_list_close", &MatchSpec::alt_list_close) - .def_readonly_static("prefered_quote", &MatchSpec::prefered_quote) + .def_readonly_static("preferred_quote", &MatchSpec::preferred_quote) .def_readonly_static("alt_quote", &MatchSpec::alt_quote) .def_readonly_static("channel_namespace_spec_sep", &MatchSpec::channel_namespace_spec_sep) .def_readonly_static("attribute_sep", &MatchSpec::attribute_sep) @@ -776,7 +776,7 @@ namespace mambapy .def_static("parse", &MatchSpec::parse) .def_static("parse_url", &MatchSpec::parse_url) .def( - // V2 Migation: Hard deperecation since errors would be hard to track. + // V2 Migation: Hard deprecation since errors would be hard to track. py::init( [](std::string_view) -> MatchSpec { throw std::invalid_argument( diff --git a/libmambapy/tests/test_specs.py b/libmambapy/tests/test_specs.py index 3261a2f5f5..3207b1de07 100644 --- a/libmambapy/tests/test_specs.py +++ b/libmambapy/tests/test_specs.py @@ -309,7 +309,7 @@ def test_BasicHTTPAuthentication(): assert other.user == auth.user assert other is not auth - # Comparion + # Comparison assert auth == auth assert auth == other other.user = "rattler" @@ -332,7 +332,7 @@ def test_BearerToken(): assert other is not auth assert other.token == auth.token - # Comparion + # Comparison assert auth == auth assert auth == other other.token = "foo" @@ -459,7 +459,7 @@ def test_Channel(): # Constructor chan = Channel(url=url_1, platforms=platforms_1, display_name=display_name_1) - # Gettters + # Getters assert chan.url == url_1 assert chan.platforms == platforms_1 assert chan.display_name == display_name_1 @@ -714,7 +714,7 @@ def test_VersionSpec(): assert isinstance(VersionSpec.or_token, str) assert isinstance(VersionSpec.left_parenthesis_token, str) assert isinstance(VersionSpec.right_parenthesis_token, str) - assert isinstance(VersionSpec.prefered_free_str, str) + assert isinstance(VersionSpec.preferred_free_str, str) assert isinstance(VersionSpec.all_free_strs, list) assert isinstance(VersionSpec.starts_with_str, str) assert isinstance(VersionSpec.equal_str, str) diff --git a/micromamba/src/env.cpp b/micromamba/src/env.cpp index 78da345d7c..f50d8aedb5 100644 --- a/micromamba/src/env.cpp +++ b/micromamba/src/env.cpp @@ -195,7 +195,7 @@ set_env_command(CLI::App* com, Configuration& config) if (channel_subdir) { dependencies - // If the size is not one, it's a custom mutli channel + // If the size is not one, it's a custom multi channel << ((chans.size() == 1) ? chans.front().display_name() : v.channel) << "/" << v.platform << "::"; } diff --git a/micromamba/test-server/reposerver.py b/micromamba/test-server/reposerver.py index 0f64767f3e..593c6f93d4 100644 --- a/micromamba/test-server/reposerver.py +++ b/micromamba/test-server/reposerver.py @@ -407,7 +407,7 @@ def token_do_GET(self, server_token: str) -> None: ) -# Gobal args can be given anywhere with the first set of args for backward compatibility. +# Global args can be given anywhere with the first set of args for backward compatibility. args, argv_remaining = global_parser.parse_known_args() PORT = args.port @@ -440,8 +440,8 @@ def token_do_GET(self, server_token: str) -> None: print(channels) -# Unamed channel in multi-channel case would clash URLs but we want to allow -# a single unamed channel for backward compatibility. +# Unnamed channel in multi-channel case would clash URLs but we want to allow +# a single unnamed channel for backward compatibility. if (len(channels) > 1) and (None in channels): fatal_error("Cannot use empty channel name when using multiple channels") diff --git a/micromamba/tests/conftest.py b/micromamba/tests/conftest.py index 3a6727f6fe..8bc497566d 100644 --- a/micromamba/tests/conftest.py +++ b/micromamba/tests/conftest.py @@ -80,7 +80,7 @@ def tmp_home( if not request.config.getoption("--no-eager-clean"): try: helpers.rmtree(new_home) - # Silence possible cleanup exeptions on CI, weird things happening there + # Silence possible cleanup exceptions on CI, weird things happening there except Exception as e: if not on_ci: raise e @@ -153,7 +153,7 @@ def tmp_root_prefix( if not request.config.getoption("--no-eager-clean"): try: helpers.rmtree(new_root_prefix) - # Silence possible cleanup exeptions on CI, weird things happening there + # Silence possible cleanup exceptions on CI, weird things happening there except Exception as e: if not on_ci: raise e diff --git a/micromamba/tests/test-server/reposerver.py b/micromamba/tests/test-server/reposerver.py index 79fb0beddc..7df97dd4c8 100644 --- a/micromamba/tests/test-server/reposerver.py +++ b/micromamba/tests/test-server/reposerver.py @@ -146,7 +146,7 @@ def token_do_GET(self, server_token: str) -> None: ) -# Gobal args can be given anywhere with the first set of args for backward compatibility. +# Global args can be given anywhere with the first set of args for backward compatibility. args, argv_remaining = global_parser.parse_known_args() PORT = args.port @@ -175,8 +175,8 @@ def token_do_GET(self, server_token: str) -> None: print(channels) -# Unamed channel in multi-channel case would clash URLs but we want to allow -# a single unamed channel for backward compatibility. +# Unnamed channel in multi-channel case would clash URLs but we want to allow +# a single unnamed channel for backward compatibility. if (len(channels) > 1) and (None in channels): print("Cannot use empty channel name when using multiple channels", file=sys.stderr) exit(1) diff --git a/micromamba/tests/test_activation.py b/micromamba/tests/test_activation.py index 6be2496877..bbf5b8c9b8 100644 --- a/micromamba/tests/test_activation.py +++ b/micromamba/tests/test_activation.py @@ -39,7 +39,7 @@ class WindowsProfiles: def __getitem__(self, shell: str) -> str: if shell == "powershell": - # find powershell profile path dyanmically + # find powershell profile path dynamically args = [ "powershell", "-NoProfile", @@ -882,7 +882,7 @@ def test_activate_path(tmp_empty_env, tmp_env_name, interpreter, tmp_path): @pytest.mark.parametrize("interpreter", get_interpreters()) def test_activate_envs_dirs(tmp_root_prefix: Path, interpreter, tmp_path: Path): - """Activate an environemt as the non leading entry in ``envs_dirs``.""" + """Activate an environment as the non leading entry in ``envs_dirs``.""" env_name = "myenv" helpers.create("-p", tmp_path / env_name, "--offline", "--no-rc", no_dry_run=True) os.environ["CONDA_ENVS_DIRS"] = f"{Path('/noperm')},{tmp_path}" diff --git a/micromamba/tests/test_pkg_cache.py b/micromamba/tests/test_pkg_cache.py index 832aab49f2..25e058afac 100644 --- a/micromamba/tests/test_pkg_cache.py +++ b/micromamba/tests/test_pkg_cache.py @@ -22,7 +22,7 @@ def find_cache_archive(cache: Path, pkg_name: str) -> Optional[Path]: def find_pkg_build(cache: Path, name: str) -> str: - """Find the build name of a package in the cache from the pacakge name.""" + """Find the build name of a package in the cache from the package name.""" matches = [p for p in cache.glob(f"{name}*") if p.is_dir()] assert len(matches) == 1 return matches[0].name diff --git a/micromamba/tests/test_shell.py b/micromamba/tests/test_shell.py index 8547181b10..4eff0d233f 100644 --- a/micromamba/tests/test_shell.py +++ b/micromamba/tests/test_shell.py @@ -136,7 +136,7 @@ def custom_shell(shell): @pytest.mark.parametrize("shell_type", ["bash", "posix", "powershell", "cmd.exe"]) @pytest.mark.parametrize("prefix_is_root", [False, True]) @pytest.mark.parametrize("prefix_exists", [False, True]) -@pytest.mark.parametrize("prefix_type", ["shrinked_prefix", "expanded_prefix", "name"]) +@pytest.mark.parametrize("prefix_type", ["shrunk_prefix", "expanded_prefix", "name"]) def test_activate( tmp_home, tmp_root_prefix, @@ -162,7 +162,7 @@ def test_activate( cmd = ["activate", "-s", shell_type] if prefix_type == "expanded_prefix": cmd.append(p) - elif prefix_type == "shrinked_prefix": + elif prefix_type == "shrunk_prefix": cmd.append(str(p).replace(os.path.expanduser("~"), "~")) else: cmd.append(n)