Skip to content

Commit

Permalink
change src folder name to skbase
Browse files Browse the repository at this point in the history
This changes the src folder name from `baseobject` to `skbase`.

Also bumps the version number to 0.2.0.
  • Loading branch information
fkiraly authored Sep 10, 2022
2 parents ae9f5df + a8ac651 commit c1789e7
Show file tree
Hide file tree
Showing 27 changed files with 54 additions and 59 deletions.
2 changes: 1 addition & 1 deletion build_tools/fail_on_missing_init_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Script to search for missing init FILES.
set -euxo pipefail

FILES=$( find ./baseobject -type d '!' -exec test -e "{}/__init__.py" ";" -not -path "**/__pycache__" -not -path "**/datasets/data*" -not -path "**/contrib/*" -print )
FILES=$( find ./skbase -type d '!' -exec test -e "{}/__init__.py" ";" -not -path "**/__pycache__" -not -path "**/datasets/data*" -not -path "**/contrib/*" -print )

if [[ -n "$FILES" ]]
then
Expand Down
2 changes: 1 addition & 1 deletion docs/source/about/governance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ In the event a proposed change does not gather the necesssary votes, then:
Acknowledging contributions
===========================

The ``baseobject`` project values all kinds of contributions and the
The ``skbase`` project values all kinds of contributions and the
development team is committed to recognising each of them fairly.

The project follows the `all-contributors <https://allcontributors.org>`_
Expand Down
10 changes: 5 additions & 5 deletions docs/source/api_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The API reference provides a technical manual, describing the class and
function interface provided by the package. See the :ref:`user_guide` for
additional details.

.. automodule:: baseobject
.. automodule:: skbase
:no-members:
:no-inherited-members:

Expand All @@ -19,7 +19,7 @@ additional details.
Base Classes
============

.. currentmodule:: baseobject
.. currentmodule:: skbase

.. autosummary::
:toctree: api_reference/auto_generated/
Expand All @@ -33,7 +33,7 @@ Base Classes
Object Retrieval
================

.. currentmodule:: baseobject
.. currentmodule:: skbase

.. autosummary::
:toctree: api_reference/auto_generated/
Expand All @@ -47,11 +47,11 @@ Object Retrieval
Testing
=======

.. automodule:: baseobject.testing
.. automodule:: skbase.testing
:no-members:
:no-inherited-members:

.. currentmodule:: baseobject.testing
.. currentmodule:: skbase.testing

.. autosummary::
:toctree: api_reference/auto_generated/
Expand Down
18 changes: 9 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
pass
# sys.path.insert(0, os.path.abspath("../.."))

# import baseobject
# import skbase

# -- Project information -----------------------------------------------------

project = "baseobject"
copyright = "2022 (BSD-3-Clause License"
author = "BaseObject Developers"
project = "skbase"
copyright = "2022 (BSD-3-Clause License)"
author = "skbase Developers"


# The full version, including alpha/beta/rc tags
# release = baseobject.__version__
# release = skbase.__version__

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -135,14 +135,14 @@ def find_source():
import os

fn = inspect.getsourcefile(obj)
fn = os.path.relpath(fn, start=os.path.dirname(baseobject.__file__))
fn = os.path.relpath(fn, start=os.path.dirname(skbase.__file__))
source, lineno = inspect.getsourcelines(obj)
return fn, lineno, lineno + len(source) - 1

if domain != "py" or not info["module"]:
return None
try:
filename = "baseobject/%s#L%d-L%d" % find_source()
filename = "skbase/%s#L%d-L%d" % find_source()
except Exception:
filename = info["module"].replace(".", "/") + ".py"
return "https://github.com/sktime/baseobject/blob/{version_match}/{filename}"
Expand All @@ -166,7 +166,7 @@ def find_source():
# If it is an integer, we're in a PR build and the version isn't correct.
if not version_match or version_match.isdigit():
# For local development, infer the version to match from the package.
release = "0.1.0" # baseobject.__version__
release = "0.2.0" # skbase.__version__
if "dev" in release:
version_match = "latest"
# We want to keep the relative reference if we are in dev mode
Expand Down Expand Up @@ -273,7 +273,7 @@ def find_source():
current_file = "{{ env.doc2path( env.docname, base=None) }}"

# make sure Binder points to latest stable release, not main
binder_base = "https://mybinder.org/v2/gh//baseobject/"
binder_base = "https://mybinder.org/v2/gh//skbase/"
binder_url = binder_base + f"{version_match}?filepath={current_file}"
nbsphinx_prolog = f"""
.. |binder| image:: https://mybinder.org/badge_logo.svg
Expand Down
4 changes: 2 additions & 2 deletions docs/source/contribute/development/developer_guide/ci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ and run:

.. code:: bash
pytest ./baseobject
pytest ./skbase
or if you have `make <https://www.gnu.org/software/make/>`_ installed:

Expand All @@ -65,7 +65,7 @@ Infrastructure
==============

This section gives an overview of the infrastructure and continuous
integration services ``baseobject`` uses.
integration services ``skbase`` uses.

+---------------+-----------------------+-------------------------------------+
| Platform | Operation | Project Configuration |
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_documentation/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_. The source
code for all `releases <https://github.com/sktime/baseobject/releases>`_
is available on GitHub.

You can also subscribe to ``baseobject's``
You can also subscribe to ``skbase``'s
`PyPi release <https://libraries.io/pypi/baseobject>`_.

For planned changes and upcoming releases, see our :ref:`roadmap`.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_documentation/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ that ``skbase`` provides, see the :ref:`api_ref`.
Overview
^^^^^^^^

Get an overview of ``baseobject``'s interfaces and design patterns.
Get an overview of ``skbase``'s interfaces and design patterns.

+++

Expand Down
6 changes: 3 additions & 3 deletions docs/source/users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Documentation
Installation
^^^^^^^^^^^^

Install ``baseobject``.
Install ``skbase``.

+++

Expand Down Expand Up @@ -52,7 +52,7 @@ Documentation
User Guide
^^^^^^^^^^

Learn about using ``baseobject``.
Learn about using ``skbase``.

+++

Expand Down Expand Up @@ -94,7 +94,7 @@ Documentation
Related Software
^^^^^^^^^^^^^^^^

Explore software related to ``baseobject``.
Explore software related to ``skbase``.

+++

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "skbase"
version = "0.1.0"
version = "0.2.0"
description = "Base classes for sklearn-like parametric objects"
authors = [
{name = "Franz Kiraly", email = "f.kiraly@ucl.ac.uk"},
Expand Down
8 changes: 4 additions & 4 deletions baseobject/__init__.py → skbase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
sktime design principles in your project.
"""

__version__ = "0.1.0"
__version__ = "0.2.0"

__author__ = ["mloning", "RNKuhns", "fkiraly"]
__all__ = [
Expand All @@ -18,6 +18,6 @@
"get_package_metadata",
]

from baseobject._base import BaseEstimator, BaseObject
from baseobject._lookup import all_objects, get_package_metadata
from baseobject._meta import _HeterogenousMetaEstimator
from skbase._base import BaseEstimator, BaseObject
from skbase._lookup import all_objects, get_package_metadata
from skbase._meta import _HeterogenousMetaEstimator
3 changes: 1 addition & 2 deletions baseobject/_base.py → skbase/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ class name: BaseEstimator
from collections import defaultdict
from copy import deepcopy

from skbase._exceptions import NotFittedError
from sklearn import clone
from sklearn.base import BaseEstimator as _BaseEstimator

from baseobject._exceptions import NotFittedError


class BaseObject(_BaseEstimator):
"""Base class for parametric objects with sktime style tag interface.
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions baseobject/_lookup.py → skbase/_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
Union,
)

from baseobject import BaseObject
from skbase import BaseObject

# Conditionally import TypedDict based on Python version
if sys.version_info >= (3, 8):
Expand Down Expand Up @@ -616,7 +616,7 @@ def all_objects(
as_dataframe=False,
return_tags=None,
suppress_import_stdout=True,
package_name="baseobject",
package_name="skbase",
path: Optional[str] = None,
ignore_modules=None,
class_lookup=None,
Expand Down Expand Up @@ -663,7 +663,7 @@ def all_objects(
If str or list of str, the tag values named in return_tags will be
fetched for each object and will be appended as either columns or
tuple entries.
package_name : str, default="baseobject".
package_name : str, default="skbase".
should be set to default to package or module name if used for search.
objects will be searched inside the package/module called package_name,
this can include sub-module dots, e.g., "package.module1.module2".
Expand Down
6 changes: 3 additions & 3 deletions baseobject/_meta.py → skbase/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from inspect import isclass

from baseobject import BaseEstimator
from skbase import BaseEstimator


class _HeterogenousMetaEstimator(BaseEstimator):
Expand Down Expand Up @@ -355,8 +355,8 @@ def _dunder_concat(
Parameters
----------
self : `baseobject` estimator, instance of composite_class (when invoked)
other : `baseobject` estimator, should inherit from composite_class \
self : `skbase` estimator, instance of composite_class (when invoked)
other : `skbase` estimator, should inherit from composite_class \
or base_class otherwise, `NotImplemented` is returned
base_class : estimator base class assumed as base class for self, other,
and estimator components of composite_class, in case of concatenation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""Mock package to test the test framework."""

from baseobject.mock_package.mock_package import CompositionDummy
from skbase.mock_package.mock_package import CompositionDummy

__all__ = ["CompositionDummy"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from copy import deepcopy

from baseobject import BaseObject
from skbase import BaseObject


class CompositionDummy(BaseObject):
Expand Down
4 changes: 2 additions & 2 deletions baseobject/testing/__init__.py → skbase/testing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
""":mod:`baseobject.testing` provides a framework to test ``BaseObjects``."""
""":mod:`skbase.testing` provides a framework to test ``BaseObjects``."""
from typing import List

from baseobject.testing.test_all_objects import (
from skbase.testing.test_all_objects import (
BaseFixtureGenerator,
QuickTester,
TestAllObjects,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@
import joblib
import numpy as np
import pytest
from skbase import BaseObject
from skbase._lookup import all_objects
from skbase.testing.utils._conditional_fixtures import (
create_conditional_fixtures_and_names,
)
from skbase.testing.utils.deep_equals import deep_equals
from skbase.testing.utils.inspect import _get_args
from sklearn.utils.estimator_checks import (
check_get_params_invariance as _check_get_params_invariance,
)

from baseobject import BaseObject
from baseobject._lookup import all_objects
from baseobject.testing.utils._conditional_fixtures import (
create_conditional_fixtures_and_names,
)
from baseobject.testing.utils.deep_equals import deep_equals
from baseobject.testing.utils.inspect import _get_args


class BaseFixtureGenerator:
"""Fixture generator for baseobject testing functionality.
"""Fixture generator for skbase testing functionality.
Test classes inheriting from this and not overriding pytest_generate_tests
will have object and scenario fixtures parametrized out of the box.
Expand Down Expand Up @@ -74,7 +73,7 @@ class BaseFixtureGenerator:
# ------------------------------------------------------

# package to search for objects
package_name = "baseobject.mock_package"
package_name = "skbase.mock_package"

# which object types are generated; None=all, or scitype string like "forecaster"
object_type_filter = None
Expand Down Expand Up @@ -285,8 +284,8 @@ def run_tests(
Examples
--------
>>> from baseobject.mock_package import CompositionDummy
>>> from baseobject.testing.test_all_objects import TestAllObjects
>>> from skbase.mock_package import CompositionDummy
>>> from skbase.testing.test_all_objects import TestAllObjects
>>> TestAllObjects().run_tests(
... CompositionDummy,
... tests_to_run="test_constructor"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@


import numpy as np

from baseobject.testing.utils._dependencies import _check_soft_dependencies
from skbase.testing.utils._dependencies import _check_soft_dependencies


def deep_equals(x, y, return_msg=False):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

import numpy as np
import pytest

from baseobject.testing.utils._dependencies import _check_soft_dependencies
from baseobject.testing.utils.deep_equals import deep_equals
from skbase.testing.utils._dependencies import _check_soft_dependencies
from skbase.testing.utils.deep_equals import deep_equals

# examples used for comparison below
EXAMPLES = [
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions baseobject/tests/test_base.py → skbase/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
from copy import deepcopy

import pytest

from baseobject import BaseObject
from skbase import BaseObject


# Fixture class for testing tag system
Expand Down

0 comments on commit c1789e7

Please sign in to comment.