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

Customize the directory name ".cyphr" #30

Open
cturbelin opened this issue Feb 13, 2020 · 3 comments
Open

Customize the directory name ".cyphr" #30

cturbelin opened this issue Feb 13, 2020 · 3 comments

Comments

@cturbelin
Copy link

We would like to use this package but it is not possible to use an hidden directory to store the credentials in our settings. Is it possible to make this configurable (with ".cyphr" as default value) via options() for example ?

@richfitz
Copy link
Member

richfitz commented Mar 6, 2020

Thanks for the request - I will have a look and see

@richfitz
Copy link
Member

richfitz commented Mar 9, 2020

Looks like this is unlikely to make it in before the next CRAN release (as CRAN have requested an update) but could you please elaborate on your use case here a bit. In particular, can you have any file called .cyphr?

I am reluctant to use options here because then different cyphr repositories on a machine that use different conventions would require tweaking of options or changing the script in order to work.

So I'd propose that we either store the cyphr files in .cyphr or we store a text file called .cyphr that contains the relative path to directory to look in - that directory could be stored anywhere in the project files that you wanted.

If that does not work then my second proposal is a fixed set of names to look in (.cyphr, cyphr, ropensci-cyphr perhaps) and look through them in that order (similar to how make searches through a fixed set).

If possible I would like to avoid an argument to the functions as the implementation is already complicated enough. Let me know what you think

@cturbelin
Copy link
Author

Hi,

Yes, the ".cyphr" file is possible (I can make my R script to create it in the local files when the package is used) or a fixed fixed set of options works for me (I can suggest the "_cyphr" form, as it's often used a an dot notation alternative).
The first one is maybe the more flexible option (as you don't have to manage configuration for each setting).

I cannot use any name starting by a dot in our context because the files are shared using a nextcloud instance and we cannot share the dotfiles (it's only configurable at the account level and it will cause a big mess if we do that. But it's possible to use them on each user's sync copy.

Yes, I perfectly understand the constraint to not change the function signature :)

Many thanks

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

No branches or pull requests

2 participants