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.

image

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

  1. Use BasicClient class as an abstract class or as a real base class.
  2. Remove configuration initialization from BasicClass.__init__ method.
  3. For each client class specify the client specific attributes for __init__ method.

Package version

The update is not backward compatible

Related MRs:

!67 (merged)

osdu/platform/data-flow/ingestion/osdu-airflow-lib!24 (merged)

osdu/platform/data-flow/ingestion/osdu-ingestion-lib!21 (merged)

Edited by Yan Sushchynski [EPAM/GC]