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

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

Merged
merged 8 commits into from
Apr 25, 2024

Conversation

sebakthapa
Copy link
Contributor

@sebakthapa sebakthapa commented Apr 22, 2024

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.

school_center.py Outdated Show resolved Hide resolved
@sebakthapa
Copy link
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.

if(basename):
return basename
else:
return DEFAULT_OUTOUT_FILENAME
Copy link
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

school_center.py Outdated Show resolved Hide resolved
@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