center-randomize
center-randomize copied to clipboard
[Fix] output directory generation not working as expected. #39
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
-
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
This issue has already been addressed in #45
@sebakthapa Is this merge to the main branch because i found the same issue there.
PR has been issued, hope it will soon be merged.
@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
Sure, my current code covers these requirements however there seemed a simple typo I will correct.
@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 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