Skip to content

Fix: Correct csv_file argument name and handle local dev environment#35

Open
isha822 wants to merge 1 commit into
fossology:mainfrom
isha822:main
Open

Fix: Correct csv_file argument name and handle local dev environment#35
isha822 wants to merge 1 commit into
fossology:mainfrom
isha822:main

Conversation

@isha822

@isha822 isha822 commented Nov 23, 2025

Copy link
Copy Markdown

Description

This PR fixes a bug in utility/false_positive_detection/test.py where the argument args.csv_file_path caused an AttributeError because the defined flag is --csv-file.

It also adds a check for the local development environment. Previously, the script would crash if the /home/fossy/pythondeps directory (specific to the FOSSology server) did not exist. It now catches the FileNotFoundError and skips the check for local users.

Changes

  • Renamed args.csv_file_path to args.csv_file.
  • Added try-except block for pythondeps directory check.
  • Added type casting .astype(str) to data['label'] to fix the ValueError during classification reporting.

Testing

  • Ran test.py with datasets/false_positive_detection_dataset.csv.
  • Verified that the Classification Report prints successfully without errors.

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.

1 participant