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

Main #358

Merged
merged 11 commits into from
May 3, 2024
Merged

Main #358

merged 11 commits into from
May 3, 2024

Conversation

entelecheia
Copy link
Owner

No description provided.

@zube zube bot added the [zube]: Inbox label May 3, 2024
@entelecheia entelecheia merged commit 101f0d4 into release May 3, 2024
1 check was pending
@zube zube bot added [zube]: Done and removed [zube]: Inbox labels May 3, 2024
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @entelecheia - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +27 to +36
def save_dataframe(
data: pd.DataFrame,
data_file: str,
data_dir: Optional[str] = None,
columns: Optional[Sequence[str]] = None,
index: bool = False,
filetype: Optional[str] = "parquet",
suffix: Optional[str] = None,
verbose: bool = False,
**kwargs,
Copy link

Choose a reason for hiding this comment

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

suggestion (code_clarification): Consider documenting the **kwargs parameter in the method docstring.

Explicit documentation of **kwargs can help developers understand what additional parameters are expected or how they are used.

dataframe = DSLoad.load_dataframe(data_file, data_dir=data_dir)
self.assertIsNotNone(dataframe)
self.assertIsInstance(dataframe, pd.DataFrame)
self.assertListEqual(list(dataframe.columns), list(data.columns))
Copy link

Choose a reason for hiding this comment

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

suggestion (testing): Missing test cases for different file types and error conditions.

The test for save_dataframe only covers a basic scenario. Consider adding tests for different file types (e.g., 'parquet', 'csv') as specified by the filetype parameter. Additionally, include tests for error conditions such as invalid file paths or unsupported file types.

entelecheia added a commit that referenced this pull request May 3, 2024
Merge pull request #358 from entelecheia/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant