Change from pandas to polars in GeneralInput - #965
Merged
Conversation
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
9 times, most recently
from
August 31, 2026 10:50
2c73761 to
1bae6a3
Compare
larsevj
reviewed
Aug 31, 2026
larsevj
reviewed
Aug 31, 2026
larsevj
reviewed
Aug 31, 2026
larsevj
reviewed
Aug 31, 2026
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
4 times, most recently
from
August 31, 2026 13:29
5444b9b to
6ee992c
Compare
SAKavli
commented
Aug 31, 2026
larsevj
reviewed
Aug 31, 2026
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
3 times, most recently
from
September 1, 2026 07:08
f92d4e0 to
1b53191
Compare
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
from
September 1, 2026 07:24
1b53191 to
bcf8f39
Compare
SAKavli
commented
Sep 1, 2026
larsevj
reviewed
Sep 1, 2026
larsevj
reviewed
Sep 1, 2026
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
from
September 1, 2026 07:54
bcf8f39 to
ab8563a
Compare
larsevj
reviewed
Sep 1, 2026
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
from
September 1, 2026 10:13
f969fdd to
b95ee8e
Compare
Contributor
Author
|
One unhandled edge case is given empty general_input sheet, but this raises a nasty traceback on main as well. |
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
from
September 1, 2026 11:41
e2c7bb6 to
aa0faae
Compare
These tests are documenting the behavior of the pandas functionality applied to the excel input.
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
from
September 1, 2026 11:41
aa0faae to
8ac0848
Compare
This is only used to read input values for GeneralInput and therefore it makes sense to move it closer to that part of the code.
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
from
September 1, 2026 11:42
8ac0848 to
9acf9e9
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Migrates FMU Design’s general_input Excel parsing from pandas to Polars and delegates type conversion to Pydantic.
Changes:
- Adds Polars/Fastexcel dependencies.
- Moves Excel parsing into
GeneralInput. - Updates and expands parser tests.
File summaries
| File | Description |
|---|---|
src/semeio/fmudesign/general_input.py |
Implements Polars parsing and validation flow. |
src/semeio/fmudesign/_excel_to_dict.py |
Delegates parsing to GeneralInput. |
tests/fmudesign/test_general_input.py |
Tests string-based Excel ingestion. |
tests/fmudesign/test_excel_to_dict.py |
Reformats helper imports. |
pyproject.toml |
Adds runtime and test dependencies. |
uv.lock |
Locks the added dependencies. |
Review details
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
SAKavli
force-pushed
the
change-from-pandas-to-polars
branch
from
September 1, 2026 12:22
c4711d9 to
479755e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As polars have stricter typing of columns, the behavior is now changed to reading the excel file into all strings in the dataframe.
This new assumption eases some of the logic in
GeneralInput, while we leave the casting to the correct datatypes to Pydantic.At the same time,
_read_general_inputis moved into theGeneralInputclass as a static method, as it is only used there.