-
Notifications
You must be signed in to change notification settings - Fork 25
seqcli index (list|suppress) and seqcli expressionindex (create|list|remove) commands
#337
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
Conversation
nblumhardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a few ideas/suggestions but LGTM 👍
| if (resource.Equals("expressionindex")) | ||
| { | ||
| return "expressionindexes"; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW checking for trailing x and adding es would work in most cases, matching the y case below?
| _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); | ||
|
|
||
| Options.Add( | ||
| "expression=", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e=|expression= ?
|
|
||
| _output.ListEntities(list); | ||
|
|
||
| await Task.Delay(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nooooo
|
|
||
| Options.Add( | ||
| "i=|id=", | ||
| "The id of an index of a signal to suppress", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could drop of a signal here? The server might change around this point
|
|
||
| var connection = _connectionFactory.Connect(_connection); | ||
| var toSuppress = await connection.Indexes.FindAsync(_id); | ||
| if (toSuppress.IndexedEntityType != IndexedEntityType.Signal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make the request and let the server give the reason for any 400 response?
| await ExportTemplates<ExpressionIndexEntity>( | ||
| id => _connection.ExpressionIndexes.FindAsync(id), | ||
| () => _connection.ExpressionIndexes.ListAsync(), | ||
| expressionIndex => expressionIndex.Id.Replace("expressionindex-", ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> expressionIndex.Expression.All(char.IsLetterOrDigit) ? expressionIndex.Expression : expressionIndex.Id.Replace("expressionindex-", "") might improve file naming for trivial indexes?
seqcli index (list|suppress) and seqcli expressionindex (create|list|remove) commands
No description provided.