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

Make p2rank behave more like a standard unix program by default (wrt output location and working directory) #45

Open
rdk opened this issue Oct 18, 2020 · 3 comments
Assignees

Comments

@rdk
Copy link
Owner

rdk commented Oct 18, 2020

@rdk rdk self-assigned this Oct 18, 2020
@davidjakubec
Copy link

Hi,

could you please specify what you mean by Program behaves weirdly...? I am currently using prank as, e.g., ./p2rank_2.2/prank predict datasets/coach420.ds -c default.groovy -o out/, i.e., not from the "distro root" directory, and nothing seems off as far as I can tell.

Also, Output location cannot be overridden... is probably resolved with the option -o, or does this refer to something else?

If I can make a suggestion related to the topic from a new user's perspective here, I think it would be useful if:

  1. all file and path definitions were either absolute or relative to the current working directory (as is customary in UNIX programs). For example, the configuration file is currently taken to be relative to config/, conservation directories relative to the dataset file, etc., which I think is a bit confusing and can lead easily to errors.
  2. I think that it would be useful if p2rank did not write to the "distro root" directory as it is being used. Currently, even when the option -o is used (as above), the file log/prank.log, and possibly others, are created. This prohibits putting the program into /opt/ or other system directories, as is common on servers. The output directory would then have to be a required argument.

David

@rdk
Copy link
Owner Author

rdk commented Jun 16, 2021

Also, Output location cannot be overridden... is probably resolved with the option -o, or does this refer to something else?

Yes this is what I meant, -o wasn't working properly. Problem is described in #50, which is now fixed.

could you please specify what you mean by Program behaves weirdly...? I am currently using prank as, e.g., ./p2rank_2.2/prank predict datasets/coach420.ds -c default.groovy -o out/, i.e., not from the "distro root" directory, and nothing seems off as far as I can tell.

I have also experienced some issues when running the program via symlink.

By Program behaves weirdly I meant some surprising behaviour that happens when program is being used as standard unix utility ... which I didn't have time to investigate.

I agree with the suggestions.

@htaldo
Copy link

htaldo commented Mar 17, 2024

This might be a bit of a stretch, but it would also be nice to be able to read a file from standard input and print the .csv with scores to the standard output. Thanks for this amazing program anyways!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants