Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate private and public API in the package structure #645

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

TheMrSheldon
Copy link
Member

This PR aims to better distinguish between the private and public API and properly hide implementation details.

Previously, the TiraClient abstract base class was only used for type hinting. With this change, the user only sees the methods RestClient(...) -> TiraClient and LocalClient(...) -> TiraClient instead of the concrete implementations to reduce cognitive load. This is a breaking API change since the imports must be updated to:

from tira.tira_client import RestClient, LocalClient

instead of

from tira.rest_api_client import Client as RestClient
from tira.local_client import Client as LocalClient

The new "private" submodule tira._internal can also be used for further implementation-details that should not be part of the public API (e.g., some of the utilities @mam10eks?).

@TheMrSheldon TheMrSheldon added enhancement New feature or request python Pull requests that update Python code labels May 27, 2024
@TheMrSheldon TheMrSheldon changed the title Moved the tira RestClient and LocalClient into an _internal package Separate private and public API in the package structure May 27, 2024
@TheMrSheldon TheMrSheldon self-assigned this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant