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

Global variables in DSC #81

Closed
gaow opened this issue May 5, 2017 · 8 comments
Closed

Global variables in DSC #81

gaow opened this issue May 5, 2017 · 8 comments

Comments

@gaow
Copy link
Member

gaow commented May 5, 2017

In this ticket #70 (comment) I showed the use of DSC global variable:

DSC:
  variable:
     some_var:  '...'

I've agreed with @stephens999 that we still would use $ symbol instead of $() to access it, because it is similar to pipeline variable in scope. However the difference here is that these variables are constants.

There are two points to discuss:

  1. Do we need these global variables? I vote for Yes because I'm sure there will be shared parameters among all modules, for things such as path and computational environment configurations (we've not talked about execution on remote computers eg RCC).
  2. How should they be distinguished? We are not forcing any conventions on these variables (eg all capital letters) and we'll check and raise error if there is a name conflict with pipeline variables. Is it good enough?
@gaow gaow added the discussion label May 5, 2017
@stephens999
Copy link
Contributor

are these constant variables? so can't be output?

@gaow
Copy link
Member Author

gaow commented May 10, 2017

Yes these are constants. User cases I can think of are typically strings such as file names, paths, computational environment settings (walltime, mem, etc -- though we'll have global defaults in separate config file just like snakemake), or a particularly meaningful choice of sets of parameters that we want to treat as constants.

@stephens999
Copy link
Contributor

i'm good with these. How about global: instead of variable: as keyword?

@stephens999
Copy link
Contributor

and $some_var instead of some_var ?

@gaow
Copy link
Member Author

gaow commented May 10, 2017

Agreed!

But what is the behavior when there is a conflict (my question 2 above) with pipeline variables? Report an error or warning? I guess an error? If you think the same then we're good to close hte issue.

@stephens999
Copy link
Contributor

stephens999 commented May 10, 2017 via email

@stephens999
Copy link
Contributor

stephens999 commented May 10, 2017 via email

@gaow
Copy link
Member Author

gaow commented May 10, 2017

Yes any pipeline variable will result in a conflict. I'll ensure that's checked for. Closing this issue now.

@gaow gaow closed this as completed May 10, 2017
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

2 participants