Skip to content

Small fixes to CSV df and Configuration token - #599

Merged
drewaogle merged 8 commits into
developfrom
feature/csv_and_adbkey_fix
Oct 30, 2025
Merged

drewaogle merged 8 commits into
developfrom
feature/csv_and_adbkey_fix

Conversation

@drewaogle

@drewaogle drewaogle commented Jul 10, 2025 •

Copy link
Copy Markdown
Contributor

CSVLoader actually wants an RangeIndex, since everything wants to use start and only RangeIndex has it. It's better to catch it earlier.

I missed passing token to Configuration when loading from the config file, so if you save a aperturedb key, it will lose the token when it loads. ( This was included elsewhere in-between )

@drewaogle
drewaogle requested review from bovlb and gsaluja9 July 10, 2025 23:52
@drewaogle drewaogle self-assigned this Jul 10, 2025
gsaluja9
gsaluja9 previously approved these changes Jul 11, 2025

@gsaluja9 gsaluja9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@bovlb bovlb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread aperturedb/CSVParser.py Resolved
Comment thread aperturedb/CSVParser.py Resolved
Comment thread aperturedb/cli/configure.py Resolved
@luisremis
luisremis requested a review from Copilot July 12, 2025 01:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a sanity check for DataFrame indexes in the CSV parser and ensures the token field is preserved when loading configurations from file.

  • Enforce that CSVParser only accepts pandas DataFrames with a RangeIndex.
  • Pass the token value into the Configuration constructor when reading from the CLI config file.
  • Improve error handling around Dask input for CSVParser.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
aperturedb/cli/configure.py Include token argument when constructing Configuration from config.
aperturedb/CSVParser.py Validate DataFrame index is a RangeIndex; raise exceptions for invalid CSV/Dask inputs.
Comments suppressed due to low confidence (2)

aperturedb/CSVParser.py:69

  • Add unit tests to verify that providing a non-RangeIndex DataFrame raises the expected exception in CSVParser.
            if not isinstance(self.df.index, pd.RangeIndex):

aperturedb/cli/configure.py:79

  • Add tests for loading and saving configurations to confirm the token is correctly carried through and defaults to None when absent.
                token=config["token"] if "token" in config else None)

Comment thread aperturedb/cli/configure.py Resolved
Comment thread aperturedb/CSVParser.py Resolved
Comment thread aperturedb/CSVParser.py Resolved
@gsaluja9
gsaluja9 self-requested a review October 30, 2025 13:59
@drewaogle
drewaogle merged commit d21e3ea into develop Oct 30, 2025
@drewaogle
drewaogle deleted the feature/csv_and_adbkey_fix branch October 30, 2025 14:30
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.

4 participants