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

Use new data model differentiating single line loop blocks from simple blocks #36

Merged
merged 5 commits into from
Sep 21, 2023

Conversation

alisterburt
Copy link
Collaborator

@alisterburt alisterburt commented Sep 20, 2023

This library uses a dict of dataframes as the in memory data model for a STAR file. There is an ambiguity when dealing with single row dataframes, are they simple blocks or loop blocks?

This PR starts work on changing the underlying data model to:

  • simple blocks: dict[str, str | int | float]
  • loop blocks: pd.DataFrame (as before)

Thus removing the ambiguity. This will break the API and be released as 0.5.0 when ready

Parser has been heavily reworked and simplified, all parsing tests are passing - haven't touched the writer or the high level functions yet but the bulk of the work is done

@alisterburt
Copy link
Collaborator Author

alisterburt commented Sep 20, 2023

functional interface now at feature parity for both reading and writing

todo:

  • add explicit tests for writing from dict data blocks
  • make sure typing backports work as expected

@alisterburt alisterburt marked this pull request as ready for review September 21, 2023 10:34
@alisterburt alisterburt changed the title [WIP] use new data model differentiating single line loop blocks from simple blocks Use new data model differentiating single line loop blocks from simple blocks Sep 21, 2023
@alisterburt alisterburt merged commit 0dd3666 into main Sep 21, 2023
@alisterburt alisterburt deleted the simple-block-fix branch September 21, 2023 10:36
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