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

Support bracket syntax for cudf::strings::replace_with_backrefs group index values #8841

Merged

Conversation

davidwendt
Copy link
Contributor

Closes #8816

The current \d syntax for the replacement template parameter will fail if a number immediately follows the index pattern as described in #8816. This PR adds support for the ${d} pattern but only if the \d pattern is not found in the replacement string. This should minimize breaking any current templates already being used with this API.

@davidwendt davidwendt added feature request New feature or request 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. strings strings issues (C++ and Python) non-breaking Non-breaking change labels Jul 23, 2021
@davidwendt davidwendt self-assigned this Jul 23, 2021
@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #8841 (a1fff0f) into branch-21.10 (18f7c01) will decrease coverage by 0.08%.
The diff coverage is n/a.

❗ Current head a1fff0f differs from pull request most recent head 883c1af. Consider uploading reports for the commit 883c1af to get more accurate results
Impacted file tree graph

@@               Coverage Diff                @@
##           branch-21.10    #8841      +/-   ##
================================================
- Coverage         10.67%   10.59%   -0.09%     
================================================
  Files               110      116       +6     
  Lines             18271    19034     +763     
================================================
+ Hits               1951     2017      +66     
- Misses            16320    17017     +697     
Impacted Files Coverage Δ
python/cudf/cudf/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/core/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/categorical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/column.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/lists.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/numerical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/string.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/struct.py 0.00% <ø> (ø)
python/cudf/cudf/core/dataframe.py 0.00% <ø> (ø)
python/cudf/cudf/core/frame.py 0.00% <ø> (ø)
... and 75 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 904222b...883c1af. Read the comment docs.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jul 27, 2021
@davidwendt davidwendt marked this pull request as ready for review July 27, 2021 15:42
@davidwendt davidwendt requested a review from a team as a code owner July 27, 2021 15:42
@davidwendt davidwendt requested review from jrhemstad and vuule July 27, 2021 15:42
Copy link
Contributor

@vuule vuule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@vuule
Copy link
Contributor

vuule commented Aug 6, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit f207f98 into rapidsai:branch-21.10 Aug 6, 2021
@davidwendt davidwendt deleted the fea-backref-bracket-syntax branch August 7, 2021 16:18
shwina pushed a commit to shwina/cudf that referenced this pull request Aug 9, 2021
… index values (rapidsai#8841)

Closes rapidsai#8816 

The current `\d` syntax for the replacement template parameter will fail if a number immediately follows the index pattern as described in rapidsai#8816. This PR adds support for the `${d}` pattern but only if the `\d` pattern is not found in the replacement string. This should minimize breaking any current templates already being used with this API.

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Vukasin Milovanovic (https://github.com/vuule)
  - Christopher Harris (https://github.com/cwharris)

URL: rapidsai#8841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change strings strings issues (C++ and Python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Ability to regex replace a capture group followed by a digit
3 participants