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

repo.ancestry returns PyAsyncGenerator now #764

Open
dcherian opened this issue Feb 20, 2025 · 3 comments
Open

repo.ancestry returns PyAsyncGenerator now #764

dcherian opened this issue Feb 20, 2025 · 3 comments

Comments

@dcherian
Copy link
Contributor

We should have a more user-friendly sync API, maybe the latest 10 commits.

@paraseba
Copy link
Collaborator

It returns a weird object that can be used both as a sync or async iterator.

@dcherian
Copy link
Contributor Author

Yes list(repo.ancestry()) works, but since we already have a complex object, having the repr return the latest 10 snapshots may be a good option.

We could also make it a more complex object that represents the ancestry that allows operations like:

anc = repo.ancestry()
anc.show(from=..., to=...)
anc.latest(n=10)

So take inspiration from git log

@ianhi
Copy link
Contributor

ianhi commented Feb 24, 2025

This broke the final example in https://icechunk.io/en/latest/icechunk-python/quickstart/#explore-version-history which using indexing to access the history

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

No branches or pull requests

3 participants