Skip to content

Conversation

Flamefire and others added 17 commits February 7, 2025 12:09
It might be required to replace patterns with more context, e.g. content
of the next or previous line to disambiguate otherwise too generic matches.

Add parameter `single_line` to enable the old behavior (default) of
matching per line and otherwise match the whole text.
Add parameter `match_all` to require all patterns to match for each file
not only at least one.
If we have other classes next to a software specific easyblock class
in an easyblock file they are likely supplemental.
So ignore them in `avail_easyblocks`.
- Reduce indentation
- Assign directly to dict
The class name regex is MULTILINE and hence might start a match at a
class name without a super-class and match until another class name with a super-class

Restrict by excluding colons in addition to parentheses

Also add test for this and the multi-class case to a generic easyblock
Unrelated class in an easyblock file have the same package name as the
easyblock and hence the filter doesn't remove them.
Instead of the package name check if the class derives from `EasyBlock`
which is a much more reliable check whether the class is an EasyBlock.
…ement

enhance `apply_regex_substitutions` to support use of multi-line patterns, requiring matching all patterns in each file, and use pre-compiled regular expressions
…locks

Ignore other classes if software specific easyblock class was found
@boegel boegel added update EasyBuild-5.0 EasyBuild 5.0 labels Mar 3, 2025
@boegel boegel added this to the 5.0 milestone Mar 3, 2025
@jfgrimm jfgrimm merged commit 8245989 into easybuilders:5.0.x Mar 7, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants