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

Read gzipped graphml files #1315

Merged
merged 17 commits into from
Nov 19, 2024
Merged

Read gzipped graphml files #1315

merged 17 commits into from
Nov 19, 2024

Conversation

fabmazz
Copy link
Contributor

@fabmazz fabmazz commented Nov 15, 2024

Create python function to load a graphml file that has been compressed with gzip without necessarily unzipping it before.
This makes reading large graphs in graphml much faster, and they can use less space

  • I ran rustfmt locally
  • I ran cargo clippy and it suggests no changes
  • I have added the tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@CLAassistant
Copy link

CLAassistant commented Nov 15, 2024

CLA assistant check
All committers have signed the CLA.

@IvanIsCoding
Copy link
Collaborator

Thanks for submitting this. I think this is a very welcoming addition.

However, I don’t think we should have a new mehod to support compressed files. I’d refactor the existing method to try to decompress the file based on the file extension. And perhaps an optional argument like “force_decompression” to decompress anyway even if the file extension is not what we expect

@fabmazz
Copy link
Contributor Author

fabmazz commented Nov 15, 2024

Ok I have now included everything in a single function, with the optional argument compression to force.

Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

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

Awesome this is looking good. I left a minor comment.

Lastly, check CONTRIBUTING.md for how to update the type stubs now that you added a new argument to an existing function. Our CI should fail you in the “Stubs” section until you update

src/graphml.rs Outdated Show resolved Hide resolved
@IvanIsCoding IvanIsCoding added this to the 0.16.0 milestone Nov 16, 2024
@coveralls
Copy link

coveralls commented Nov 19, 2024

Pull Request Test Coverage Report for Build 11922843964

Details

  • 25 of 25 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 95.857%

Totals Coverage Status
Change from base Build 11897504214: 0.004%
Covered Lines: 18233
Relevant Lines: 19021

💛 - Coveralls

Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

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

I am looking forward to releasing this in 0.16!

@IvanIsCoding IvanIsCoding added this pull request to the merge queue Nov 19, 2024
Merged via the queue into Qiskit:main with commit 0017d00 Nov 19, 2024
31 checks passed
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.

4 participants