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

DOC: Dataset attributes and methods #69

Merged
merged 5 commits into from
Mar 27, 2024
Merged

DOC: Dataset attributes and methods #69

merged 5 commits into from
Mar 27, 2024

Conversation

hagenw
Copy link
Member

@hagenw hagenw commented Mar 22, 2024

Closes #66

This ensures that all attributes/methods of audbcards._Dataset are also included in audbcards.Dataset and are displayed in its API documentation.

At the moment this is done by assigning them all manually inside audbcards.Dataset, but I haven't found a better way yet.

image

@hagenw hagenw marked this pull request as draft March 22, 2024 10:01
@ChristianGeng
Copy link
Member

ChristianGeng commented Mar 27, 2024

I have implemented setting the cached properties programmatically in 2bf18fd.
This can be done via vars.
My understanding is that this will not leak to the global namespace. I have not tested it however.
Running existing tests does not yield any regressions.

There is one difference: properties has been a method of the _Dataset class. It currently is not documented in the API docs. Possibly one would implement by using the code that you had before.

Now things have crossed: I have boldly committed without having the review request on the radar.

@hagenw
Copy link
Member Author

hagenw commented Mar 27, 2024

Now things have crossed: I have boldly committed without having the review request on the radar.

Doesn't matter, I just assigned you so you get an alert that something is going on here.
Would be very nice, if we could solve it programmatically.

My understanding is that this will not leak to the global namespace. I have not tested it however.

Could you try to test this?

@ChristianGeng
Copy link
Member

Could you try to test this?

Yes, in dbc7cae

@hagenw hagenw marked this pull request as ready for review March 27, 2024 13:09
@hagenw
Copy link
Member Author

hagenw commented Mar 27, 2024

Great, I think we are ready to merge here, or any objections?

Copy link
Member

@ChristianGeng ChristianGeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures that the API docs will contain the cached properties that are defined for each dataset.

In addition the code that fetches these props from the private class is teted.

@ChristianGeng
Copy link
Member

Great, I think we are ready to merge here, or any objections?

I have written an approval review. Shall I merge or do you want to go for it?

@hagenw hagenw merged commit ed3e8f2 into main Mar 27, 2024
6 checks passed
@hagenw hagenw deleted the dataset-docstrings branch March 27, 2024 13:32
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.

Document Dataset properties
2 participants