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

feat: testutil generator enhancements #53

Merged
merged 3 commits into from
Sep 27, 2023
Merged

feat: testutil generator enhancements #53

merged 3 commits into from
Sep 27, 2023

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Jun 28, 2023

Also correct Tsize for sharded file storage (done elsewhere already)


Parking this here for now; need to finish this up properly but I'm busy with byte range stuff in here in the meantime. I'll likely pull the tsize fix out to a separate PR with some tests.

@rvagg
Copy link
Member Author

rvagg commented Sep 23, 2023

Pushed a big change here in feat: new UnixFS{File,Directory} with options pattern and in there I've flagged future deprecation of the Generate* functions. I finally outgrew these and want to do so much more with them for generating test data. The options pattern gives them room to grow.

WithChildGenerator is the weirdest option, but I can explain that when I push the project I've been working on. Will leave this open till then but this is all working nicely as it is for now.

@rvagg rvagg deleted the branch main September 23, 2023 12:04
@rvagg rvagg closed this Sep 23, 2023
@rvagg rvagg reopened this Sep 23, 2023
@rvagg rvagg changed the base branch from rvagg/nopreload-byte-ranges to main September 23, 2023 12:06
@rvagg rvagg marked this pull request as ready for review September 23, 2023 12:06
flag future deprecation of Generate*
@rvagg
Copy link
Member Author

rvagg commented Sep 26, 2023

https://github.com/ipld/go-fixtureplate is what these changes are inspired by. The changes here expose a lot more optionality in being able to shape the output data.

One thing I'd like to add (not now) is being able to control sharding structure of large files, that's currently hidden and not very nicely configurable in the file builder in this library.

@rvagg rvagg merged commit 9f4c804 into main Sep 27, 2023
9 checks passed
@rvagg rvagg deleted the rvagg/generator branch September 27, 2023 00:54
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