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

Properties of entities not properly displayed in docs #52

Closed
Zethson opened this issue Apr 17, 2023 · 4 comments
Closed

Properties of entities not properly displayed in docs #52

Zethson opened this issue Apr 17, 2023 · 4 comments
Assignees

Comments

@Zethson
Copy link
Member

Zethson commented Apr 17, 2023

image

https://lamin.ai/docs/lnschema-bionty/lnschema_bionty.celltype

should look like

image

Code: https://github.com/laminlabs/lnschema-bionty/blob/main/lnschema_bionty/dev/_bionty.py

A few ideas:

  1. Access the docstring of the class attribute directly and return it
  2. Use intersphinx
@Zethson Zethson self-assigned this Apr 17, 2023
@falexwolf
Copy link
Member

You're fast, @Zethson! Immediately spotted my hack :)

@Zethson
Copy link
Member Author

Zethson commented Apr 17, 2023

You're fast, @Zethson! Immediately spotted my hack :)

While I am fast from time to time I was made aware by @sunnyosun on this one :)

@falexwolf
Copy link
Member

Ohhhh, yes, we talked about if you could help us get the code here into canonical form.

We're quite happy about the API UX, now (please tell us if you think differently!!! ideally we can settle the basic design), the implementation is a bit all over the place.

@falexwolf
Copy link
Member

To your suggestions: I'd love it if this could be handled on the implementation level, and not on the documentation level, similar to how it works for bionty.Entity and the derived classes. This would also give us return types and link to bionty.Entity.

I'm not sure, however, whether we can subclass here. My immediate reaction is that we likely need to stick with the decorator (maybe calling it add_bionty_entity rather than knowledge would be a clearer name).

We don't need intersphinx for lnschema-bionty as we're building the docs for all packages in lamin-docs (it allowed us to remove all intersphinx that we previously leveraged when we had all the disconnected docs sites).

Accessing the docstring directly is also a bit of a hack to me, but evidently better than the current hack.

All this said: I think thoroughly looking at this piece of code and thinking through it is probably the best starting point.

@Zethson Zethson transferred this issue from laminlabs/lnschema-bionty Aug 7, 2024
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

3 participants