Repository navigation
Small fixes to CSV df and Configuration token - #599
Merged
Merged
Conversation
bovlb
approved these changes
Jul 12, 2025
Contributor
There was a problem hiding this comment.
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
tokenvalue 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
tokenis correctly carried through and defaults toNonewhen absent.
token=config["token"] if "token" in config else None)
Co-authored-by: bovlb <[email protected]> Co-authored-by: Copilot <[email protected]>
gsaluja9
self-requested a review
October 30, 2025 13:59
gsaluja9
approved these changes
Oct 30, 2025
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.
CSVLoader actually wants an RangeIndex, since everything wants to use
startand 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 )