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

Implements loading variable length packets from CSV #117

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

jmbhughes
Copy link
Contributor

@jmbhughes jmbhughes commented Mar 4, 2024

Purpose

Add support for loading variable length packets from CSV, resolving #115

Packet array shaped can be defined in the data type as uint(expand) for expanding fields or uint(OPMODE) for a reference type, where OPMODE is another field.

Changes to codebase

  • added some new example CSVs to load as variable length packets
  • renamed the existing CSVs to reflect the new "basic" versus "extended" nomenclature
  • added and used _parse_csv_array_shape to handle the more complicated array shape logic
  • added test for when _parse_csv_array_shape should fail
  • added test to confirm proper parsing of array_shape
  • added test to confirm variable length packets load from CSV
  • updated the documentation to reflect these changes
  • required pytest no be less than version 8.1.0

Todos

  • resolve failing CI
  • add test for failure cases to make codecov happy
  • unpin pytest version since it appears plugin issue is resolved with new release

Notes

I think I've implemented all the expected features. I haven't tested extensively, so I can add some more tests if you think it's appropriate. As always, I'm open to suggestions.

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.10%. Comparing base (1522816) to head (c6e4fbf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #117      +/-   ##
==========================================
+ Coverage   96.05%   96.10%   +0.04%     
==========================================
  Files           7        7              
  Lines         710      719       +9     
==========================================
+ Hits          682      691       +9     
  Misses         28       28              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmbhughes
Copy link
Contributor Author

@ddasilva the CI failing seems to be because of the release of pytest 8.1.0 a few hours ago and plugins not having updated releases to match necessary changes, namely pytest-filter-subpackages(pytest-dev/pytest#11779). You can see the last release of pytest-filter-subpackages was in 2022. It looks like a release is under consideration. The simplest solution for now is to not allow pytest 8.1.0 in the CI, but there may be better options.

@ddasilva
Copy link
Collaborator

ddasilva commented Mar 4, 2024

@ddasilva the CI failing seems to be because of the release of pytest 8.1.0 a few hours ago and plugins not having updated releases to match necessary changes, namely pytest-filter-subpackages(pytest-dev/pytest#11779). You can see the last release of pytest-filter-subpackages was in 2022. It looks like a release is under consideration. The simplest solution for now is to not allow pytest 8.1.0 in the CI, but there may be better options.

Totally reasonable. Feel free to edit your branch to pin a version of pytest and repush. It would be on this line:
https://github.com/CCSDSPy/ccsdspy/blob/main/pyproject.toml#L36

@ddasilva
Copy link
Collaborator

ddasilva commented Mar 4, 2024

@ehsteve Feel free to comment

@jmbhughes jmbhughes changed the title Implements loading variable length from CSV Implements loading variable length packets from CSV Mar 4, 2024
@ddasilva
Copy link
Collaborator

ddasilva commented Mar 5, 2024

I pinged a few of our collaborators over email from Europa Clipper / MMS / Canadian Space Agency to get their thoughts on this new feature. Even if they don't have much to say, it will be good to raise their awareness!
Daniel

@ddasilva ddasilva merged commit 036a66f into CCSDSPy:main Mar 8, 2024
8 checks passed
@ddasilva
Copy link
Collaborator

ddasilva commented Mar 8, 2024

Thanks @jmbhughes !

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.

2 participants