-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
docs: update load_connector()
docstring
#604
docs: update load_connector()
docstring
#604
Conversation
* (docs): fix inconsistency in `load_connector()` docstring
WalkthroughThe introduced change enhances the Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Load a connector into the smart dataframe | ||
|
||
Args: | ||
connector (BaseConnector): Connector to be loaded | ||
temporary (bool): Whether the connector is for one time usage. | ||
If `True` passed, the connector will be unbound during | ||
the next call of `dataframe` providing that dataframe has | ||
been loaded. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new parameter temporary
is mentioned in the docstring but it's not included in the function signature. This could lead to confusion and potential errors when using this method. Please ensure that the function signature matches the documentation.
- def load_connector(self):
+ def load_connector(self, temporary=False):
self.dataframe = self.connector.execute() | ||
self._df_loaded = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic of unbinding the connector if temporary
is set to True
is missing. If the intention is to unbind the connector after its execution when temporary
is True
, you should add a condition to check the value of temporary
and act accordingly.
self.dataframe = self.connector.execute()
self._df_loaded = True
+ if temporary:
+ self.connector = None
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #604 +/- ##
=======================================
Coverage 83.48% 83.48%
=======================================
Files 55 55
Lines 2689 2689
=======================================
Hits 2245 2245
Misses 444 444
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks a lot @nautics889, merging! |
Minor inconsistency in docstrings of
load_connector()
methodload_connector()
docstringSummary by CodeRabbit
temporary
parameter to theload_connector
method in theSmartDataFrame
class. This allows users to specify whether a connector is for one-time usage. If set toTrue
, the connector will be automatically unbound after the dataframe has been loaded, enhancing memory management and performance for temporary data operations.