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

Set project-wide defaults for savename #314

Open
goerz opened this issue Jan 10, 2022 · 2 comments
Open

Set project-wide defaults for savename #314

goerz opened this issue Jan 10, 2022 · 2 comments
Labels
enhancement New feature or request savename Regarding creating "shorthand" names

Comments

@goerz
Copy link
Contributor

goerz commented Jan 10, 2022

Is there a way to set project-wide defaults for savename, e.g. for connector and equals?

I'm trying to get rid of equal signs in the output filenames because it trips up Makefiles.

However, doing something like

@produce_or_load(datadir("oct"), args, prefix=prefix, connector="__", equals="_") do args
   # ...
end

in every script gets cumbersome (and error-prone). The @produce_or_load macro doesn't allow me to pass in a dict of keyword args like settings... I think this is a fundamental restriction of having a macro there, but maybe there's a way to get around that?

Is there an easy solution for setting the default connector and equals throughout the entire project, or would it be feasible to add a way to customize these globally?

@Datseris Datseris added enhancement New feature or request savename Regarding creating "shorthand" names labels Jan 11, 2022
@Datseris
Copy link
Member

One way is to do what I did already for the tag and storepatch arguments of the saving functions. See PR: #290

You would have to do the same kind of PR for savename :)

@goerz
Copy link
Contributor Author

goerz commented Jan 11, 2022

Environment variables seem like a good way to handle this, yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request savename Regarding creating "shorthand" names
Projects
None yet
Development

No branches or pull requests

2 participants