Skip to content

Conversation

nirmala-sharma
Copy link
Contributor

@nirmala-sharma nirmala-sharma commented Apr 23, 2024

Issues that I Fixed #39 :

  • When We pass Directory/FileName as our fourth argument that is responsible for creating Directory and files where Output
    data are saved was not working So this is issue is fixed here.

Below is the error that the program throws when we try to pass the directory/filename as argument
center-randomize_writingOutputTothFileNotWorking

  • When we didnot pass directory and file as argument it is creating a default directory i.e. results as specified at the top of
    the school_centre.py file which now also works fine.

  • If we just mention the name of the file e.g. schoolcentre.tsv or anything like that then instead of school-center.tsv file which is mentioned default the one we specify i.e. schoolcentre.tsv will be created and the intermediate file is the same school- center-distance.tsv but since we didnot mention the directory these files will be created inside the main directory i.e. center- randomize

@sebakthapa
Copy link
Contributor

This issue has already been addressed in #45

@nirmala-sharma
Copy link
Contributor Author

@sebakthapa Is this merge to the main branch because i found the same issue there.

@nirmala-sharma nirmala-sharma changed the title #39 [Fix] Output Directory Generation not working as expected. [Fix] output directory generation not working as expected. #39 Apr 23, 2024
@sebakthapa
Copy link
Contributor

PR has been issued, hope it will soon be merged.

@sumanashrestha
Copy link
Collaborator

@sebakthapa @nirmala-sharma - review

intended result-

  • -o argument not present - results/{school-center.tsv, school-center-distance.tsv}
  • -o filename.tsv - results/{filename.tsv, school-center-distance.tsv}
  • -o path/filename.tsv- path/{filename.tsv, school-center-distance.tsv}
  • -o path/ - path/{school-center.tsv, school-center-distance.tsv}

TODO write tests to cover these cases

@sebakthapa
Copy link
Contributor

Sure, my current code covers these requirements however there seemed a simple typo I will correct.

@nirmala-sharma
Copy link
Contributor Author

@sumanashrestha I have a query if we give argument like this -o fileName but doesnot mention the tsv format should i return exception or simply create that filename and add .tsv extension by myself and store data in that.

@sumanashrestha
Copy link
Collaborator

@sumanashrestha I have a query if we give argument like this -o fileName but doesnot mention the tsv format should i return exception or simply create that filename and add .tsv extension by myself and store data in that.

we only support TSV so adding tsv extension would be preferable. If somebody passes in a different extension like output.csv or output.html, its okay to let it be or may be append tsv. extensions are mostly indicative only anyway

#45 has been merged so closing this one. please open a new pr if you want to push that change. thank you for your time on this one

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.
3 participants