Skip to content

[Repo Assist] Add Frame.indexRowsApply; fix build.ps1 version extraction#650

Merged
dsyme merged 1 commit intomasterfrom
repo-assist/improve-index-rows-apply-756eae145a8e5b02
Mar 19, 2026
Merged

[Repo Assist] Add Frame.indexRowsApply; fix build.ps1 version extraction#650
dsyme merged 1 commit intomasterfrom
repo-assist/improve-index-rows-apply-756eae145a8e5b02

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Repo Assist — two improvements in this PR (Tasks 4 & 5 for this run).

Task 5: Add Frame.indexRowsApplycloses #206

A new Frame.indexRowsApply function that indexes a frame by a specified column and applies a transformation function to the resulting keys. This directly implements the feature requested in #206.

Before: users had to chain two calls:

frame
|> Frame.indexRows "Date"   // 'Frame(string,_)'
|> Frame.mapRowKeys DateTime.Parse

After:

frame |> Frame.indexRowsApply "Date" DateTime.Parse
// or
frame |> Frame.indexRowsApply "Id" int

Implementation

  • FrameModule.fs: adds let indexRowsApply column (f:'V -> 'R2) (frame:Frame<'R1,'C>) : Frame<'R2, _>
    Defined after mapRowKeys (which it calls), in the "Sorting and index manipulation" category.
  • FrameExtensions.fs: adds matching IndexRowsApply(frame, column, f:Func<'V,'R2>) extension for C# users.
  • tests/Deedle.Tests/Frame.fs: adds 1 test covering the core behaviour (string-column parsed to int keys).

Task 4: Fix build.ps1 version extraction bug

Directory.Build.props uses an MSBuild property expression for (Version):

(Version)$([System.Text.RegularExpressions.Regex]::Match(...).Groups[1].Value)(/Version)

The previous PowerShell code tried to read this as a static XML attribute:

$version = ([xml](Get-Content Directory.Build.props)).Project.PropertyGroup.Version

This returned the literal MSBuild expression string rather than the resolved version number, causing fsdocs to be invoked with a garbled version. The fix reads from RELEASE_NOTES.md directly — consistent with build.sh:

$version = (Select-String -Path RELEASE_NOTES.md -Pattern '^## (\S+)' | Select-Object -First 1).Matches.Groups[1].Value
```

---

## Test Status

All **670 tests** pass on Ubuntu:

```
Passed!  - Failed: 0, Passed: 670, Skipped: 0, Total: 670

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@30f2254f2a7a944da1224df45d181a3f8faefd0d

Task 5 (Coding Improvement): Add Frame.indexRowsApply column f
  - Indexes by a column key and transforms the resulting row keys
    through a user-supplied function f
  - Closes #206 (requested by @tpetricek)
  - Added to F# module (FrameModule.fs) and C# extensions (FrameExtensions.fs)
  - Added 1 test; all 670 tests pass

Task 4 (Engineering Investment): Fix build.ps1 version extraction
  - Directory.Build.props uses an MSBuild-evaluated <Version> expression
  - The previous PowerShell code read the raw XML attribute (returning the
    literal MSBuild expression string) instead of the resolved version
  - Fixed to read the version from RELEASE_NOTES.md directly, matching
    the approach already used in build.sh

Co-authored-by: Copilot <[email protected]>
@dsyme dsyme marked this pull request as ready for review March 19, 2026 01:11
@dsyme dsyme closed this Mar 19, 2026
@dsyme dsyme reopened this Mar 19, 2026
@dsyme dsyme merged commit ba0a42e into master Mar 19, 2026
8 checks passed
@dsyme dsyme deleted the repo-assist/improve-index-rows-apply-756eae145a8e5b02 branch March 19, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overloaded IndexWith taking a function

1 participant