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

Added docstrings to is_1d and is_2d #110

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

knutfrode
Copy link
Contributor

No description provided.

@knutfrode knutfrode merged commit a303c9e into OpenDrift:main Oct 1, 2024
3 of 4 checks passed
@gauteh
Copy link
Member

gauteh commented Oct 1, 2024

I think you need to have them on the same line for them to show up:

        """Returns True if dataset is 1D, i.e. time is a 1D coordinate variable."""

@knutfrode
Copy link
Contributor Author

Hm, but for e.g. this method, the docstring shows although it is on separate lines, in the exact same way:
https://github.com/OpenDrift/trajan/blob/main/trajan/traj.py#L289
https://opendrift.github.io/trajan/generated/xarray.Dataset.traj.assign_cf_attrs.html

So it is perhaps since is_1/2d are @abstractmethods ?
But these are defined in both traj1d.py and traj2d.py, although just the common abstractmethods seems to be (not) documented.

@knutfrode
Copy link
Contributor Author

I put the docstrings on a single line, and I also added "show-inheritance": True, in autodoc_default_options according to
https://stackoverflow.com/questions/17841323/how-to-annotate-a-member-as-abstract-in-sphinx-documentation

But none of this seem to make any difference.

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