Skip to content

Commit

Permalink
[MNT] Fixed spelling mistakes as identified by codespell and typos (
Browse files Browse the repository at this point in the history
#245)

Commands used:

1. `codespell --write-changes .`
2. `typos --locale en --write-changes`

---------

Co-authored-by: Anirban Ray <>
  • Loading branch information
yarnabrina authored Nov 18, 2023
1 parent c3d501e commit 2f91a7b
Show file tree
Hide file tree
Showing 29 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
## Reporting a Vulnerability

Please report security vulnerabilities by email to `rk.skbase@gmail.com`.
This email will be forward to the relevent members of the `skbase` development team.
This email will be forward to the relevant members of the `skbase` development team.

If the security vulnerability is accepted, a patch will be developed privately to provide a bugfix release as soon as possible.
4 changes: 2 additions & 2 deletions docs/source/about/governance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Code of Conduct
===============

The ``skbase`` project believes that everyone should be able to participate
in our community without fear of harrassment or discrimination (see our
in our community without fear of harassment or discrimination (see our
:ref:`Code of Conduct guide <coc>`).

Roles
Expand Down Expand Up @@ -172,7 +172,7 @@ Lazy consensus

Changes are approved "lazily" when after *reasonable* amount of time
the change receives approval from at least one core developer
and no rejections (excercise of core developer veto right).
and no rejections (exercise of core developer veto right).

.. _gov_bep:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def find_source():
nbsphinx_allow_errors = False # False
nbsphinx_timeout = 600 # seconds, set to -1 to disable timeout

# add Binder launch buttom at the top
# add Binder launch button at the top
current_file = "{{ env.doc2path( env.docname, base=None) }}"

# make sure Binder points to latest stable release, not main
Expand Down
4 changes: 2 additions & 2 deletions docs/source/contribute/code_of_conduct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Code of conduct
===============

The ``skbase`` project believes that everyone should be able to participate
in our community without fear of harrassment or discrimination. All contributors
in our community without fear of harassment or discrimination. All contributors
are expected to show respect and courtesy to other members of the community
at all times.

Expand All @@ -21,4 +21,4 @@ to Dr. Franz Király by email at franz.kiraly@sktime.net.
``skbase`` is a new project, and processes associated with the project's
Code of Conduct (including how to report incidents) and may change as the
project matures. However, ``skbase``'s Code of Conduct will remain
dedicated to promoting a community without harrassment and discrimination.
dedicated to promoting a community without harassment and discrimination.
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ to the user guide and link to it if it does not already exist.
See Also
~~~~~~~~

This section should reference other ``skbase`` code artifcats related to the code
This section should reference other ``skbase`` code artifacts related to the code
artifact being documented by the docstring. Developers should use judgement in
determining related code artifcats.
determining related code artifacts.

Notes
~~~~~
Expand Down Expand Up @@ -172,7 +172,7 @@ a minimum this should include a single example that illustrates basic functional


The examples should use simple data (e.g. randomly generated data, etc)
generated using a ``skbase`` dependency and whereever possible only depend
generated using a ``skbase`` dependency and wherever possible only depend
on ``skbase`` or its core dependencies. Examples should also be designed to
run quickly where possible. For quick running code artifacts, additional examples
can be included to illustrate the affect of different parameter settings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Types of dependencies

Making it easy to install and use ``skbase`` in a variety of projects is
on of ``skbase``'s goals. Therefore, we seeks to minimizing the number of
dependencies needed to provide the proejct's functionality.
dependencies needed to provide the project's functionality.

Soft Dependencies
=================
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contribute/development/reviewer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Code Review

.. _reviewer_guide_doc:

Documenation Review
Documentation Review
====================

* Are the docstrings complete and understandable to users?
Expand Down
6 changes: 3 additions & 3 deletions docs/source/user_documentation/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Changelog
=========

All notable changes to this project beggining with version 0.1.0 will be
All notable changes to this project beginning with version 0.1.0 will be
documented in this file. The format is based on
`Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_ and we adhere
to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_. The source
Expand Down Expand Up @@ -228,7 +228,7 @@ Dependency changes
* ``scikit-learn``, ``typing-extensions``, and ``pytest`` are no longer
core dependencies.
``pytest`` remains a dependency in ``dev`` and ``test`` dependency sets.
* ``scikit-learn`` is now part of the ``dev`` and ``test`` depency sets,
* ``scikit-learn`` is now part of the ``dev`` and ``test`` dependency sets,
as it is required to test compatibility with ``scikit-learn``
* a dependency conflict has been resolved in the ``docs`` dependency set for
the docs build,
Expand Down Expand Up @@ -341,7 +341,7 @@ Highlights

- Expanded test coverage of ``skbase.base`` and ``skbase.lookup`` modules and
``skbase`` exceptions (:pr:`62`, :pr:`80`, :pr:`91`) :user:`rnkuhns`
- Add equality dunder to ``BaseObject`` to allow ``BaseObejct``-s to be compared based
- Add equality dunder to ``BaseObject`` to allow ``BaseObject``-s to be compared based
on parameter equality (:pr:`86`) :user:`fkiraly`
- Add ``sktime``-like interface for retrieving fitted parameters to ``BaseEstimator``
(:pr:`87`) :user:`fkiraly`
Expand Down
10 changes: 5 additions & 5 deletions enhancement_proposals/sbep_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Specifically,`skbase` will provide:
illustrating how developers can use `skbase` in their own projects and
providing test cases
- A [template repository](#Template-Repository) that developers can clone to
easiliy set up a a new project using `skbase`'s principles
easily set up a a new project using `skbase`'s principles

Although the package will initially inherit some of this functinality from
Although the package will initially inherit some of this functionality from
`scikit-learn` the goal is to make it easy to use the design patterns in a
variety of contexts, not just those that depend on `scikit-learn`. Accordingly,
`skbase` has a goal of providing the proposed functionality with minimal
Expand Down Expand Up @@ -61,7 +61,7 @@ contexts. This includes:
- [BaseMetaObject](#BaseMetaObjectMixin): A mixin that provides a high-level interface
for working with classes composed of collections of `BaseObject`s.
- [Base pipeline classes](#Base-Pipeline-Classes): `BaseObject`s that also
inherit from `BaseMetaObject` mixin and provide additional generic functionalty
inherit from `BaseMetaObject` mixin and provide additional generic functionality
for common pipeline use cases.

#### BaseObject
Expand Down Expand Up @@ -195,15 +195,15 @@ collecting and testing classes that descend from BaseObject.
This benefits users by:

- Making it easy to incorporate these tests in their own projects, reducing the need
to spend time testing that their classes comply with the interface inheritted
to spend time testing that their classes comply with the interface inherited
from `BaseObject`.
- Providing an extensible framework they can use to collect and test their own
object interfaces and functionality.

#### `skbase.validate`: Validating and Comparing BaseObjects

When developing packages that include parametric objects, verifying and comparing
objects is a common worfklow.
objects is a common workflow.

To aid this `skbase` will provide functions to:
- Check if a `BaseObject` complies with the expected interface
Expand Down
2 changes: 1 addition & 1 deletion skbase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
""":mod:`skbase` contains tools for creating and working with parametric objects.
The included functionality makes it easy to re-use scikit-learn and
The included functionality makes it easy to reuse scikit-learn and
sktime design principles in your project.
"""
__version__: str = "0.6.1"
2 changes: 1 addition & 1 deletion skbase/_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
# NotFittedError re-use code developed in scikit-learn. These elements
# NotFittedError reuse code developed in scikit-learn. These elements
# are copyrighted by the scikit-learn developers, BSD-3-Clause License. For
# conditions see https://github.com/scikit-learn/scikit-learn/blob/main/COPYING
"""Custom exceptions used in ``skbase``."""
Expand Down
2 changes: 1 addition & 1 deletion skbase/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
""":mod:`skbase.base` contains base classes for creating parametric objects.
The included functionality makes it easy to re-use scikit-learn and
The included functionality makes it easy to reuse scikit-learn and
sktime design principles in your project.
"""
from typing import List
Expand Down
8 changes: 4 additions & 4 deletions skbase/base/_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
# Elements of BaseObject re-use code developed in scikit-learn. These elements
# Elements of BaseObject reuse code developed in scikit-learn. These elements
# are copyrighted by the scikit-learn developers, BSD-3-Clause License. For
# conditions see https://github.com/scikit-learn/scikit-learn/blob/main/COPYING
"""Base class template for objects and fittable objects.
Expand Down Expand Up @@ -258,7 +258,7 @@ def _clone(self, estimator, *, safe=True):

@classmethod
def _get_init_signature(cls):
"""Get class init sigature.
"""Get class init signature.
Useful in parameter inspection.
Expand Down Expand Up @@ -597,7 +597,7 @@ def set_tags(self, **tag_dict):
Notes
-----
Changes object state by settting tag values in tag_dict as dynamic tags in self.
Changes object state by setting tag values in tag_dict as dynamic tags in self.
"""
self._set_flags(flag_attr_name="_tags", **tag_dict)

Expand Down Expand Up @@ -1097,7 +1097,7 @@ def set_tags(self, **tag_dict):
Notes
-----
Changes object state by settting tag values in tag_dict as dynamic tags
Changes object state by setting tag values in tag_dict as dynamic tags
in self.
"""
self._deprecate_tag_warn(tag_dict.keys())
Expand Down
6 changes: 3 additions & 3 deletions skbase/base/_meta.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3 -u
# -*- coding: utf-8 -*-
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
# BaseMetaObject and BaseMetaEstimator re-use code developed in scikit-learn and sktime.
# BaseMetaObject and BaseMetaEstimator reuse code developed in scikit-learn and sktime.
# These elements are copyrighted by the respective
# scikit-learn developers (BSD-3-Clause License) and sktime (BSD-3-Clause) developers.
# For conditions see licensing:
Expand Down Expand Up @@ -335,7 +335,7 @@ def _coerce_object_tuple(
Named object tuple.
- If `obj` was an object then returns (obj.__class__.__name__, obj).
- If `obj` was aleady a (name, object) tuple it is returned (a copy
- If `obj` was already a (name, object) tuple it is returned (a copy
is returned if ``clone=True``).
"""
if isinstance(obj, tuple) and len(obj) >= 2:
Expand Down Expand Up @@ -567,7 +567,7 @@ def _dunder_concat(
Parameters
----------
other : BaseObject subclass
An object inheritting from `composite_class` or `base_class`, otherwise
An object inheriting from `composite_class` or `base_class`, otherwise
`NotImplemented` is returned.
base_class : BaseObject subclass
Class assumed as base class for self and `other`. ,
Expand Down
2 changes: 1 addition & 1 deletion skbase/base/_pretty_printing/_object_html_repr.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def _object_html_repr(base_object):
Parameters
----------
base_object : base object
The BaseObject or inheritting class to visualize.
The BaseObject or inheriting class to visualize.
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion skbase/base/_tagmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _set_flags(self, flag_attr_name="_flags", **flag_dict):
Notes
-----
Changes object state by settting flag values in flag_dict as dynamic flags
Changes object state by setting flag values in flag_dict as dynamic flags
in self.
"""
flag_update = deepcopy(flag_dict)
Expand Down
10 changes: 5 additions & 5 deletions skbase/lookup/_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def _is_ignored_module(
returned for `module_name`-s `"bar.foo"`, `"foo"`, `"foo.bar"`,
`"bar.foo.bar"`, etc.
Paramters
---------
Parameters
----------
module_name : str
Name of the module.
modules_to_ignore : str, list[str] or tuple[str]
Expand Down Expand Up @@ -304,7 +304,7 @@ def _import_module(
loader.exec_module(imported_mod)
exc = None
except Exception as e:
# we store the exception so we can restore the stdout fisrt
# we store the exception so we can restore the stdout first
exc = e

# if we set up a text trap, restore it to the initial value
Expand Down Expand Up @@ -590,7 +590,7 @@ def get_package_metadata(
following key:value pairs:
- "path": str path to the submodule.
- "name": str name of hte submodule.
- "name": str name of the submodule.
- "classes": dictionary with submodule's class names (keys) mapped to
dictionaries with metadata about the class.
- "functions": dictionary with function names (keys) mapped to
Expand Down Expand Up @@ -700,7 +700,7 @@ def all_objects(
):
"""Get a list of all objects in a package with name `package_name`.
This function crawls the package/module to retreive all classes
This function crawls the package/module to retrieve all classes
that are descendents of BaseObject. By default it does this for the `skbase`
package, but users can specify `package_name` or `path` to another project
and `all_objects` will crawl and retrieve BaseObjects found in that project.
Expand Down
16 changes: 8 additions & 8 deletions skbase/lookup/tests/test_lookup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
"""Tests for skbase lookup functionality."""
# Elements of the lookup tests re-use code developed in sktime. These elements
# Elements of the lookup tests reuse code developed in sktime. These elements
# are copyrighted by the sktime developers, BSD-3-Clause License. For
# conditions see https://github.com/sktime/sktime/blob/main/LICENSE
import importlib
Expand Down Expand Up @@ -158,7 +158,7 @@ def _check_package_metadata_result(results):
isinstance(mod_metadata[k], str) for k in ("path", "name", "authors")
):
return False
# Verify keys with bool values have bool valeus
# Verify keys with bool values have bool values
if not all(
isinstance(mod_metadata[k], bool)
for k in (
Expand Down Expand Up @@ -309,7 +309,7 @@ def _update_mod_metadata(metadata, dict_update):


def test_is_non_public_module(mod_names):
"""Test _is_non_public_module correctly indentifies non-public modules."""
"""Test _is_non_public_module correctly identifies non-public modules."""
for mod in mod_names["public"]:
assert _is_non_public_module(mod) is False
for mod in mod_names["non_public"]:
Expand All @@ -328,7 +328,7 @@ def test_is_ignored_module(mod_names):
for mod in mod_names["public"]:
assert _is_ignored_module(mod) is False

# No modules should be flagged as ignored if the ignored moduels aren't encountered
# No modules should be flagged as ignored if the ignored modules aren't encountered
modules_to_ignore = ("a_module_not_encountered",)
for mod in mod_names["public"]:
assert _is_ignored_module(mod, modules_to_ignore=modules_to_ignore) is False
Expand All @@ -355,7 +355,7 @@ def test_filter_by_class():
# Test case when no class filter is applied (should always return True)
assert _filter_by_class(CompositionDummy) is True

# Test case where a signle filter is applied
# Test case where a single filter is applied
assert _filter_by_class(Parent, BaseObject) is True
assert _filter_by_class(NotABaseObject, BaseObject) is False
assert _filter_by_class(NotABaseObject, CompositionDummy) is False
Expand Down Expand Up @@ -391,7 +391,7 @@ def test_filter_by_tags():
assert _filter_by_tags(Parent, {"A": "1", "B": 2}) is True
# All keys in dict are in tag_filter, but at least 1 value doesn't match
assert _filter_by_tags(Parent, {"A": 1, "B": 2}) is False
# Atleast 1 key in dict is not in tag_filter
# At least 1 key in dict is not in tag_filter
assert _filter_by_tags(Parent, {"E": 1, "B": 2}) is False

# Iterable tags should be all strings
Expand All @@ -413,7 +413,7 @@ def test_walk_returns_expected_format(fixture_skbase_root_path):
def _test_walk_return(p):
assert (
isinstance(p, tuple) and len(p) == 3
), "_walk shoul return tuple of length 3"
), "_walk should return tuple of length 3"
assert (
isinstance(p[0], str)
and isinstance(p[1], bool)
Expand Down Expand Up @@ -834,7 +834,7 @@ def _test_get_return_tags_output(results, num_requested_tags):

@pytest.mark.parametrize("as_dataframe", [True, False])
@pytest.mark.parametrize("return_names", [True, False])
@pytest.mark.parametrize("return_tags", [None, "A", ["A", "a_non_existant_tag"]])
@pytest.mark.parametrize("return_tags", [None, "A", ["A", "a_non_existent_tag"]])
@pytest.mark.parametrize("modules_to_ignore", ["tests", ("testing", "lookup"), None])
@pytest.mark.parametrize("exclude_objects", [None, "Child", ["CompositionDummy"]])
@pytest.mark.parametrize("suppress_import_stdout", [True, False])
Expand Down
4 changes: 2 additions & 2 deletions skbase/tests/mock_package/test_mock_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class InheritsFromBaseObject(BaseObject):


class AnotherClass(BaseObject):
"""Another class inheritting from BaseObject."""
"""Another class inheriting from BaseObject."""


class NotABaseObject:
Expand All @@ -63,7 +63,7 @@ def __init__(self, a=7):


class _NonPublicClass(BaseObject):
"""A nonpublic class inheritting from BaseObject."""
"""A nonpublic class inheriting from BaseObject."""


MOCK_PACKAGE_OBJECTS = [
Expand Down
Loading

0 comments on commit 2f91a7b

Please sign in to comment.