Skip to content

separate public, advanced, and private APIs #1260

Description

@sammlapp

This greatly enhances our ability to maintain a stable public API while making implementation changes

Level 1 (stable):

usage:

import opensoundscape as opso
opso.SpectrogramClassifier

in __init__.py: from .ml.cnn import SpectrogramClassifier

The API is stable within major versions. Documentation and tutorials focus on the use of this API.

Level 2 (organized subpackages/modules):

Advanced users may use other functions whose API might change with minor versions
Users who need additional functionality can access it, but they must opt in by importing the submodule.

import opensoundscape.localization.localization_algorithms

Not exposed in __ini__.py. After just import opensoundscape as opso, there is no attribute opso.localization.localization_algorithms.

We maintain API stability within minor versions. Advanced documentation may describe the use of these additional functionalities.

Level 3 (internal implementation details, private modules)

from opensoundscape._localization_utils import get_clips

Not imported in init, and marked as private with leading _ in the module name

These modules are intentionally internal and can change without notice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions