ADR: Refactor BaseClient
Description
SDK as development kit is used to provided utility functions in fast and convenient way. Each class in SDK has to be self-descriptive: each parameter is clear, everything be able to extend.
The major part of osdu_api
package are clients to OSDU services' API.
Event at the first glance BasicClient
has a god-mode
presentation.
What I mean, the class constructor encapsulates a ConfigManager
logic that was contributed before by GCP/EPAM team.
It means, for instance, that StorageServiceClient
knows (o should know) about FileServiceClient
and so forth.
Furthermore it brings with hard coded osdu_api.ini
file in the class constructor. And in accordance with the last updates it absolutely inconvenient to operate this wile within deployment etc.
Proposal
- Use
BasicClient
class as an abstract class or as a real base class. - Remove configuration initialization from
BasicClass.__init__
method. - For each client class specify the client specific attributes for
__init__
method.
Package version
The update is not backward compatible
Related MRs:
osdu/platform/data-flow/ingestion/osdu-airflow-lib!24 (merged)
osdu/platform/data-flow/ingestion/osdu-ingestion-lib!21 (merged)