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

parameterization: excluded values #3229

Closed
oliver-sanders opened this issue Jul 22, 2019 · 2 comments
Closed

parameterization: excluded values #3229

oliver-sanders opened this issue Jul 22, 2019 · 2 comments

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Jul 22, 2019

Describe exactly what you would like to see in an upcoming release
A mechanism for excluding parametrised values e.g:

    foo => bar<pub!=prancing_pony> => baz

I think the use cases for this type of functionality are probably going to hit the limitation of parameters in other ways so #1962 may be the best way to solve this. Some examples:

  • Exclude a single value <pub!=prancing_pony>
  • Exclude a set of values <pub!=[prancing_pony, golden_dragon]>
  • Exclude items from another parametrization <pub!=<old_pub>>

Alternative workaround might be to create a new parameter defined based on another one:

[cylc]
    [[parameters]]
        foo = 1..10
        bar = [x for x in foo if x != 5]

Additional context

Somewhat related to:

Pull requests welcome!
This is an Open Source project - please consider contributing code yourself
(please read CONTRIBUTING.md before starting any work though).

@matthewrmshin matthewrmshin added this to the later milestone Jul 22, 2019
@matthewrmshin matthewrmshin modified the milestones: later, cylc-9 Aug 28, 2019
@oliver-sanders
Copy link
Member Author

Likely the best solution is to supersede this with #1962

@hjoliver
Copy link
Member

I'm happy to say if users need this sort of "advanced" parameterization they can a) roll their own with Jinja2 loops; or b) wait for #1962. It would be nice to have, but may be difficult to implement in the current graph string parser (?) and it's not a blocker because of a).

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