Closed natekspencer closed 1 year ago
The sounds like a useful change.
I might implement it by adding a new max_rows
argument (which could be None
for no maximum), but I'll also think about whether it's ever helpful to raise that row-related ValueError
instead of just passing that responsibility on to the caller (by returning as many rows as were needed).
Thanks! That would be most helpful indeed!
@natekspencer #115 implements the max_rows
approach and drops the ValueError
. How does that look to you?
That looks great to me @jparise!
@natekspencer Great! I just merged it to main
. If you're able to test it out, let me know if you have any feedback before I tag a new release.
@jparise it worked exactly like I expected it to for my use case! Thanks again!
Right now, when
encode_text
is called with data that results in a number of rows greater than 6, a ValueError is raised. It would be nice if, instead, this could log a warning, and then return only the first 6 rows. This would be useful for truncating long song names while also trying to append a header or footer without introducing more complex logic.