Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement stdin stdout procedures addressing Issue #47. #62
Conversation
greebie
added some commits
Sep 5, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ruebot
Sep 19, 2018
Member
Graphpass will create an
output/
directory in the call
Why this? Can you explain the rationale here? It's my understanding that stdout
should just be stdout
. I don't understand the use case of forcing the creation of an output
dir.
You also have commits in here from the previous PR.
Why this? Can you explain the rationale here? It's my understanding that You also have commits in here from the previous PR. |
greebie
added some commits
Sep 19, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
greebie
Sep 19, 2018
Collaborator
Graphpass will create an
output/
directory in the callWhy this? Can you explain the rationale here? It's my understanding that
stdout
should just bestdout
. I don't understand the use case of forcing the creation of anoutput
dir.
It will only try to create the output directory if stdout does not exist. Otherwise it will just use stdout.
The way the program is written now, if no stdout exists, and there is no -g
flag (to switch to .gexf) the user's original file will be over-written with the graphpassed update. That's why I included code to set the output directory to ./OUT/
if stdout does not exist.
It's possible to fail on no stdout instead, but I think it should be part of a different issue, given that the unit tests work based on the current approach.
You also have commits in here from the previous PR.
I do not understand github properly. Will fix.
It will only try to create the output directory if stdout does not exist. Otherwise it will just use stdout. The way the program is written now, if no stdout exists, and there is no It's possible to fail on no stdout instead, but I think it should be part of a different issue, given that the unit tests work based on the current approach.
I do not understand github properly. Will fix. |
greebie
added some commits
Sep 19, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
greebie
Sep 19, 2018
Collaborator
Getting a seg fault in Travis. Not sure why because it builds fine on my system.
Getting a seg fault in Travis. Not sure why because it builds fine on my system. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ianmilligan1
Sep 19, 2018
Member
I see that it builds fine on my Mac but fails on rho
i.e.
Makefile:27: recipe for target 'install' failed
make: [install] Segmentation fault (core dumped) (ignored)
I see that it builds fine on my Mac but fails on i.e.
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
greebie
Sep 19, 2018
Collaborator
I see that it builds fine on my Mac but fails on
rho
i.e.
Makefile:27: recipe for target 'install' failed make: [install] Segmentation fault (core dumped) (ignored)
sigh That's what I thought. Going to try and force stdin stdout to see if that fixes things.
sigh That's what I thought. Going to try and force stdin stdout to see if that fixes things. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ruebot
Sep 19, 2018
Member
It will only try to create the output directory if stdout does not exist. Otherwise it will just use stdout.
That's not how stdout
works. We shouldn't be clobbering an existing file if an option isn't given, nor creating a new directory.
I'm going to move on to other stuff for the rest of the day, and will be at York on Thursday and Friday. So, I won't get back to reviewing this until Monday at the earliest.
I do not understand github properly. Will fix.
It's not GitHub issue. It's the process I outlined last week in Slack. Please revisit that.
That's not how I'm going to move on to other stuff for the rest of the day, and will be at York on Thursday and Friday. So, I won't get back to reviewing this until Monday at the earliest.
It's not GitHub issue. It's the process I outlined last week in Slack. Please revisit that. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
greebie
Sep 19, 2018
Collaborator
Okay - the issue is that Mac has libgen.h compiled as part of gcc and Ubuntu does not. I will either add instructions to travis re: libgen.h or ignore create a function to get the directory name myself.
Okay - the issue is that Mac has libgen.h compiled as part of gcc and Ubuntu does not. I will either add instructions to travis re: libgen.h or ignore create a function to get the directory name myself. |
greebie
added some commits
Sep 19, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
greebie
Sep 20, 2018
Collaborator
That that Travis is hooked up, I am going to close this PR and re-open without the confusing commit problems.
That that Travis is hooked up, I am going to close this PR and re-open without the confusing commit problems. |
greebie commentedSep 19, 2018
GitHub issue(s):
#47
What does this Pull Request do?
Creates a more straightforward stdin stdout procedure call.
e.g.
./graphpass /path/to/input/file /path/to/output/outfile -{flags}
will run graphpass on file and store it in outfile.The stdin and stdout paths can appear anywhere in the expression (you can put {flags} or other options before, between or after the path calls. However, the order of stdin must come before stdout.
The
-i
or--input
will override an stdin call.The
-i
or--output
will override a stdout call.Both will have the same behavior as the above mentioned calls.
Graphpass will create an
output/
directory in the call./graphpass /path/to/input/file /path/to/output/outfile -{flags}
but only if/path/to/
exists. Otherwise it will throw an errorwith a message to create
/path/to/
.Any non-flag arguments beyond stdin and stdout will be ignored for now (although graphpass will store them for future use).
How should this be tested?
A description of what steps someone could take to:
Additional Notes:
As of writing, I realize that i need to update the documentation in README. I will also check the case where there is no stdout declared.
Interested parties
@ianmilligan1 and @ruebot
Thanks in advance for your help with the Archives Unleashed Project!