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

Public vs Private API is unclear #10

Open
glennmoy opened this issue Feb 22, 2024 · 3 comments
Open

Public vs Private API is unclear #10

glennmoy opened this issue Feb 22, 2024 · 3 comments

Comments

@glennmoy
Copy link
Contributor

Besides TableGenerator it's not clear which functions are public vs private API.
Empirically, one would think generate is the only public-facing function but it's not documented one way or the other.

@ararslan
Copy link
Member

One of the unusual things about this package's API is that the functions one extends to generate rows aren't really intended to be called by the user. For example, you're expected to define a new method for visit!, but realistically there's no situation in which you'd actually call visit!, you only take advantage of the fact that the method you defined allows you to call generate.

@glennmoy
Copy link
Contributor Author

One of the unusual things about this package's API is that the functions one extends to generate rows aren't really intended to be called by the user. For example, you're expected to define a new method for visit!, but realistically there's no situation in which you'd actually call visit!, you only take advantage of the fact that the method you defined allows you to call generate.

yeah totally understand, and I think for that reason generate should be exported and documented as part of the public API which users call vs the private methods they should extend if they want to support new generator types.

@ararslan
Copy link
Member

We may want to consider exporting generate under the name generate_rows in order to differentiate it from generate_tables, which we should also export, and also because generate_rows is strictly more descriptive of what the function actually generates.

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

2 participants