Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import and header adjustments #680

Merged
merged 3 commits into from
Dec 31, 2023
Merged

Import and header adjustments #680

merged 3 commits into from
Dec 31, 2023

Conversation

sstendahl
Copy link
Owner

Makes the following adjustments to importing and header handling:

  • Stops looking for headers when data is detected. This makes it such that comments and other data at the bottom are just ignored
  • Only add X and Y data if both data can be added, otherwise skip that row. This prevents errors when one of the data points was valid but the other one was not
  • Use the getters and setters for the labels, this was broken when we moved the item class to Vala, the relevant code was still trying to assign the attribute directly.
  • Do not add X and Y data if either of them returns None. This still parses as a float, but leads to errors when doing fitting or limit optimisations
  • Just use the delimiter to detect headers, stop detecting whitespaces as first choice by default. As I feel using two different heuretics to detect headers will lead to more issues than it solves, and you'd pretty much always use the same delimiter anyway
  • Remove headers from the axis if the associated item is removed. This is because otherwise adding a dataset with headers, and then deleting it, and then adding another dataset, will put that new dataset in the top/right axis, even though it's the only dataset there. That is not intuitive behaviour and not what anyone would want probably.

Solves issues #674, #675, #677

@cmkohnen cmkohnen merged commit 7a8389d into main Dec 31, 2023
6 checks passed
@sstendahl sstendahl deleted the Adjust-header-detection branch January 1, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants