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

Add atomlist to store and read complexes #275

Merged
merged 3 commits into from
Feb 9, 2024
Merged

Add atomlist to store and read complexes #275

merged 3 commits into from
Feb 9, 2024

Conversation

ffl096
Copy link
Member

@ffl096 ffl096 commented Oct 10, 2023

Introduce functions for "atom lists", which work similar to edge lists and allow to store and load complexes.

Background: Right now, we ship some datasets in form of pickled data structures. While this was a fast way to implement this problem, it is a really bad idea for various reasons. It is highly unstable as it relies on internal state of data structures and any change to them breaks the datasets. In fact, this is what blocks #220, which completely overhauls the internals of SimplicialComplex.

@ffl096 ffl096 added the enhancement New feature or request label Oct 10, 2023
@ffl096 ffl096 self-assigned this Oct 10, 2023
@ffl096 ffl096 force-pushed the frantzen-readwrite branch from 95932ef to ea89cb0 Compare October 10, 2023 12:51
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2dbc4db) 96.87% compared to head (7e5363f) 96.81%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
- Coverage   96.87%   96.81%   -0.06%     
==========================================
  Files          32       35       +3     
  Lines        3518     3610      +92     
==========================================
+ Hits         3408     3495      +87     
- Misses        110      115       +5     

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

@ffl096 ffl096 force-pushed the frantzen-readwrite branch 4 times, most recently from efb334f to 84fdb9d Compare November 28, 2023 08:04
@ffl096 ffl096 marked this pull request as ready for review November 28, 2023 08:07
@ffl096
Copy link
Member Author

ffl096 commented Nov 28, 2023

This is ready for review now.

In a following step, we should migrate datasets relying on pickle to other formats.

@ffl096 ffl096 force-pushed the frantzen-readwrite branch from 84fdb9d to 4e85c58 Compare November 28, 2023 08:19
@ffl096 ffl096 force-pushed the frantzen-readwrite branch from 4e85c58 to d009ab8 Compare November 28, 2023 08:22
@ffl096
Copy link
Member Author

ffl096 commented Nov 28, 2023

I am not exactly sure how to deal with the documentation issues raised my numpydoc. It complains about a lack of documentation for @overload functions. These are only there for mypy (and other static type checkers / IDE support) and do not appear in our documentation and are never called.

Thus I would think that they should not have a docstring, the function is documented in the "actual" implementation (the last without @overload). Can we skip overloaded functions for numpydoc somehow?

CC @devendragovil

@devendragovil
Copy link
Contributor

HI @ffl096

Yes we can do that, see karate_club at: https://github.com/pyt-team/TopoNetX/blob/main/toponetx/datasets/graph.py

Essentially just leave an inline comment # numpydoc ignore=GL08

I also raised an issue #326 where majority of the docstrings issues are due to overloaded methods, maybe we can tick them off as well if we are planning to skip them.

@ffl096
Copy link
Member Author

ffl096 commented Nov 28, 2023

Yes we should ignore them. I was just wondering if we can automatically do that for all overloaded functions (as done for code coverage), but didn't found a way to do that. Adding the ignore every time is also fine though.

@ffl096 ffl096 force-pushed the frantzen-readwrite branch 2 times, most recently from 3268a2a to e06b6e6 Compare November 28, 2023 13:26
@ffl096 ffl096 force-pushed the frantzen-readwrite branch from e06b6e6 to 7e5363f Compare November 28, 2023 13:30
@ffl096 ffl096 merged commit 7b8fa8b into main Feb 9, 2024
6 of 7 checks passed
@ffl096 ffl096 deleted the frantzen-readwrite branch February 9, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants