Skip to content

Add ParseInt udf#190

Open
bealsbe wants to merge 10 commits intoroostorg:mainfrom
bealsbe:udf/parseint
Open

Add ParseInt udf#190
bealsbe wants to merge 10 commits intoroostorg:mainfrom
bealsbe:udf/parseint

Conversation

@bealsbe
Copy link
Copy Markdown
Contributor

@bealsbe bealsbe commented Mar 24, 2026

Description

The goal of this PR is to add a new ParseInt UDF to the sml rules language. The UDF converts a numeric string to an integer.

Example sml:

  Result: int = ParseInt(s="42")                                                                                                                                                                                   
  # 42                                                                                                                                                                                                             
                                                                                                                                                                                                                   
  Result: int = ParseInt(s="-7")
  # -7                                                                                                                                                                                                             
                  
  Result: int = ParseInt(s="ABC")
  # None     
  

note: I wasn't too sure on what category to put this udf into. I am open to feedback to change the name.

Checklist

  • Tests pass locally
  • uv run ruff check . passes (no unused imports or other lint errors)
  • uv tool run fawltydeps --check-unused --pyenv .venv passes (no unused dependencies)

@bealsbe bealsbe requested review from a team, EXBreder, ayubun, haileyok and vinaysrao1 as code owners March 24, 2026 00:21
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.

1 participant