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

Logbook stream should print header if no records #694

Open
bje- opened this issue Apr 4, 2023 · 0 comments
Open

Logbook stream should print header if no records #694

bje- opened this issue Apr 4, 2023 · 0 comments

Comments

@bje-
Copy link
Contributor

bje- commented Apr 4, 2023

Even if there are no records yet, calling stream() on the logbook should print just the header. I've described it by updating the doctest to show what I mean:

            >>> log = Logbook()
            >>> print log.stream  # doctest: +NORMALIZE_WHITESPACE
            gen
            >>> log.append({'gen' : 0})
            >>> print log.stream  # doctest: +NORMALIZE_WHITESPACE
            0
            >>> log.append({'gen' : 1})
            >>> print log.stream  # doctest: +NORMALIZE_WHITESPACE
            1

This is important when it takes a while for the results of generation 0 to appear.

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

1 participant