Skip to content

Fixed: output directory generation not working as expected when --output is passed a directory name instead of filename - #45

Merged
sumanashrestha merged 8 commits into
moest-np:mainfrom
sebakthapa:fix/output_location
Apr 25, 2024
Merged

Fixed: output directory generation not working as expected when --output is passed a directory name instead of filename#45
sumanashrestha merged 8 commits into
moest-np:mainfrom
sebakthapa:fix/output_location

Conversation

@sebakthapa

@sebakthapa sebakthapa commented Apr 22, 2024

Copy link
Copy Markdown
Contributor

Fixes #39

The solved problem:

  • when -o or --output was not passed or when filename was passed from CLI, it was working well
  • But when passed directory name, it was throwing error

It is solved now

Changes done

The fixed code now uses os.path module to extract dirname and filename from the provided args and uses them accordingly.

hariacharya80

This comment was marked as resolved.

Comment thread school_center.py Outdated
@sebakthapa
sebakthapa requested a review from sapradhan April 25, 2024 01:48
@sebakthapa

Copy link
Copy Markdown
Contributor Author

@sumanashrestha , changes are done to meet all the requirements you mentioned in the PR discussion.

For writing test, I think, it would be better to write modular tests but right now main logic is executed outside of any function.
This PR #65 addresses in making main code modular.

However, for now it is properly tested manually and is ready to merge.

Comment thread school_center.py
if(basename):
return basename
else:
return DEFAULT_OUTOUT_FILENAME

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

typo DEFAULT_OUTPUT_FILENAME

Comment thread school_center.py Outdated
@sumanashrestha
sumanashrestha merged commit d2ec4d7 into moest-np:main Apr 25, 2024
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.

[BugReport] output directory generation not working as expected.

4 participants