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

Bug #925 fix #932

Merged
merged 2 commits into from
Apr 5, 2024
Merged

Bug #925 fix #932

merged 2 commits into from
Apr 5, 2024

Conversation

Sepehr-A
Copy link
Collaborator

@Sepehr-A Sepehr-A commented Apr 4, 2024

Bug #925 Report Summary

A user reported a usability issue with Suzieq version 0.22.0 when using the Python API to retrieve path information. The API call was made with namespace provided as a string instead of a list, leading to an EmptyDataframeError. The error did not clearly indicate the cause, leading to confusion.

Changes Made

To address this issue, two significant changes were implemented:

Introduction of Argument Validation in basicobj.py:

  • A new method _validate_list_args was added to enforce that certain arguments, specifically namespace and hostname, are provided as lists. If these arguments are not lists, the method raises a TypeError with a clear and informative error message.

Modification in topology.py:

  • The initialization of self._namespaces was set to an empty list [].
  • In the get method, self._namespaces was changed to default to an empty list [] instead of using self.ctxt.namespace. This modification was implemented to address testing issues that arose following the introduction of _validate_list_args in basicobj.py.

@Sepehr-A Sepehr-A marked this pull request as draft April 4, 2024 14:25
@Sepehr-A Sepehr-A marked this pull request as ready for review April 4, 2024 14:26
@Sepehr-A Sepehr-A changed the title Bug#925 fix Bug #925 fix Apr 4, 2024
Copy link
Collaborator

@LucaNicosia LucaNicosia left a comment

Choose a reason for hiding this comment

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

After you have done with the fixes. Squash all the commits on basicobj file

suzieq/engines/pandas/topology.py Outdated Show resolved Hide resolved
@LucaNicosia LucaNicosia linked an issue Apr 4, 2024 that may be closed by this pull request
@Sepehr-A Sepehr-A force-pushed the Bug925-Fix branch 3 times, most recently from 9a62992 to 70f179d Compare April 4, 2024 17:52
Signed-off-by: Sepehr-A <sepehr@stardustsystems.net>
Signed-off-by: Sepehr-A <sepehr@stardustsystems.net>
@ddutt ddutt merged commit 07d7355 into netenglabs:develop Apr 5, 2024
13 checks passed
@Sepehr-A Sepehr-A deleted the Bug925-Fix branch April 5, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Python API with namespace parameter
3 participants