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

Feature/add support for other file formats #993

Merged

Conversation

chakravarthik27
Copy link
Collaborator

@chakravarthik27 chakravarthik27 commented Mar 12, 2024

Description

This pull request significantly improves the data source handling capabilities in our BaseDataset and DataFactory classes.

Key updates:

Dynamic Data Source Support in BaseDataset: The __init_subclass__ method of the BaseDataset class has been improved to dynamically accommodate different data sources based on the class name. When a class name matches a pandas read method (such as read_excel or read_json), the class is immediately registered as a data source for the appropriate file extensions. This simplifies the process of adding support for additional data sources by simply defining new subclasses of BaseDataset.

Enhanced Data Source Mapping in DataFactory: The DataFactory class now uses the BaseDataset's data_sources dictionary to instantiate the correct Dataset type based on the file extension. As a result, each data source's class consumption is precisely controlled.

These changes improve the flexibility and maintainability of our data processing code. Adding support for new data sources is now easier, requiring simply the creation of new subclasses of BaseDataset, eliminating the need for manual modifications to the DataFactory class.

@chakravarthik27 chakravarthik27 self-assigned this Mar 12, 2024
@chakravarthik27 chakravarthik27 linked an issue Mar 12, 2024 that may be closed by this pull request
Copy link
Collaborator

@ArshaanNazir ArshaanNazir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix build. @chakravarthik27

@chakravarthik27 chakravarthik27 merged commit b2dce2d into release/2.0.1 Mar 29, 2024
3 checks passed
@chakravarthik27 chakravarthik27 added the v2.1.0 Issue or request to be done in v2.1.0 release label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.1.0 Issue or request to be done in v2.1.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for other file formats
2 participants