-
Notifications
You must be signed in to change notification settings - Fork 409
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
improved filtering through tags #529
Comments
I have been thinking about labelling for some time and must say that the status quo is close to working. You could already do filtering for one tag. What needs to be done from my point of view:
|
I don't understand this comment. In my view, two observations are prominent:
|
You could put tags in the description of the test and use
|
Yes. It would be nice to keep the display string separate. |
Could you elaborate why? I am trying to strike a balance between adding functionality without increasing complexity/redundancy too much. The filtering mechanism as already close to what is being needed and would profit from the boolean operations even when not using tags. These are the dis-/advantages I see with putting tags into the description instead of an additional location: pro:
con:
|
The display strings would be seen by anyone running the tests or reviewing the results, whether or not familiar with the idea about embedding tags into these string. The framework is intended to display either pretty output, or informative, parse-able output, depending on the selected output mode. While it may have some utility given the currently-available features, embedding tags into display strings violates the basic principle of the string being natural and straightforward for a human to read, regardless of familiarity with any particular system. There are a variety of vulnerabilities to embedding tags into the display string. One is a partial matching (e.g. As I suggested, if the ultimate intention is to support compound boolean conditions through operators, the semantics required for such support are far easier if the simple conditions (i.e. not compounded by boolean operators) are just literal tag names. Once such features would become available, then pattern matching on the display string would be largely legacy, as it seems to have no particular necessary use case, compared to using tags. Ultimately, my cursory view (which of course follows from certain assumptions about the project structure overall), is that supporting tags would lead to a cleaner development path as well as a cleaner experience for users. |
Well, appending the tags to the string makes them hardly unreadable. At most they may become too long, but as I said: they could be filtered away. What I find harder is that the test name would depend on the labels, which is not ideal.
I think delimiting with
I did not discount operators at all. I just wanted to say
I find that less obvious. For one I don't know how many users rely on I'll have to think a bit about the use cases that are supported by |
If you know what they are, you may not mind them, but seeing them in a field intended as a human-readable string may be confusing, and also unwieldy if the tags are very numerous.
Is that easier than adding extra fields to the syntax (e.g.
The core of my suggestion was that designing and implementing syntax and semantics for boolean operations on filters is vastly easier if the simple tests (the primitive operands) are simply tag names, versus regular expressions. Compare the following two examples:
Augmenting the existing semantics for boolean operators will be very combersome, and even worse than the demonstration above when including grouping symbols. Meanwhile, parsing a basic string, the one shown as the argument to |
Currently, filtering is supported only by regular expressions on test descriptions, which are intended to be human-readable, and not necessarily designed for pattern filters. In fact, even changes to capitalization breaks a filter in current use.
A proposed tagging feature would support assignment of simple key words to each test, to support more robust and predictable filtering.
For example, keywords might follow the test description, designed by some leading character, such as
+
, as follows:A filter then might be defined to exclude tests with the tag
external-deps
in environments in which the external web resource is unlikely to be available, or tests which have both that tag as well asnon-critical
.The text was updated successfully, but these errors were encountered: