Skip to content

Conversation

@ascibisz
Copy link
Contributor

Problem

It'd be nice to have simularium data objects that are designed for providing frame data for a trajectory, so that the octopus repo doesn't have to define it's own. Should match what is defined in this miro board under "New SimulariumIO Data Types (pseudo code)"

Ticket

There will be a forthcoming PR for using these new data objects in Octopus

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update
  • This change requires updated or new tests

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2023

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (983c99b) 92.56% compared to head (4eec799) 93.05%.
Report is 60 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   92.56%   93.05%   +0.49%     
==========================================
  Files         101      106       +5     
  Lines        4546     4941     +395     
==========================================
+ Hits         4208     4598     +390     
- Misses        338      343       +5     
Files Coverage Δ
simulariumio/data_objects/__init__.py 100.00% <100.00%> (ø)
simulariumio/data_objects/frame_data.py 100.00% <100.00%> (ø)
simulariumio/tests/test_simularium_file_data.py 100.00% <100.00%> (ø)
simulariumio/data_objects/trajectory_data.py 97.05% <75.00%> (+0.18%) ⬆️
simulariumio/data_objects/binary_data.py 97.22% <97.22%> (ø)
simulariumio/data_objects/json_data.py 93.87% <93.87%> (ø)
simulariumio/data_objects/simularium_file_data.py 71.42% <71.42%> (ø)

... and 24 files with indirect coverage changes

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

@ascibisz ascibisz linked an issue Aug 31, 2023 that may be closed by this pull request
@ascibisz ascibisz marked this pull request as ready for review August 31, 2023 20:59
@ascibisz ascibisz requested a review from a team as a code owner August 31, 2023 20:59
@ascibisz ascibisz requested review from blairlyons, frasercl, interim17, meganrm and toloudis and removed request for a team August 31, 2023 20:59
"""
Return frame data for frame at index. If there is no frame at the index,
return None.
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why I didn't notice this before but are you supposed to put pass in each of these functions? Also it looks like this is supposed/intended tobe an abstract base class

from abc import ABC

class MyABC(ABC):
...
@abstractmethod...

Is that sort of the intention here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

autoflake doesn't like it when you have pass after a docstring, so maybe I'll move the docstrings to the subclasses? I hadn't even noticed that pass had been removed, it just disappeared when I ran autoflake locally. Good eye



class SimulariumFileData:
def __init__(self, file_contents: Union[str, bytes]):
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe the base class doesn't need to have the file_contents even as a constructor argument?

Copy link
Contributor

@toloudis toloudis left a comment

Choose a reason for hiding this comment

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

Overall lgtm, I added a couple of minor comments on the details of the base class but nothing serious.

@ascibisz ascibisz merged commit 5d482f1 into main Oct 30, 2023
@ascibisz ascibisz deleted the feature/simularium-file-data branch October 30, 2023 19:19
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.

Add New Data Types for Simularium Frame Data

5 participants