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

Fix type alias and generic in documentation #67

Merged
merged 6 commits into from
Dec 18, 2023
Merged

Fix type alias and generic in documentation #67

merged 6 commits into from
Dec 18, 2023

Conversation

AVHopp
Copy link
Collaborator

@AVHopp AVHopp commented Dec 15, 2023

This PR fixes the following minor errors in the documentation.

  1. The Smiles type alias introduced in parameters.substance. This type alias is manually configured in conf.py. In order to avoid the documentation to load all of the attributes and functions of str, the templates were changed slightly to not include those, resulting in the output shown at the end.
  2. The generics in baybe.utils.basic. Sphinx behaves weird when using generics (see Use of TypeVar results in "reference target not found" error sphinx-doc/sphinx#10974). Thus, an exception was included in the nitpick_ignore dictionary, eliminating the error.
    image
    image
    image

@AVHopp AVHopp added the documentation Improvements or additions to documentation label Dec 15, 2023
@AVHopp AVHopp self-assigned this Dec 15, 2023
docs/conf.py Show resolved Hide resolved
docs/conf.py Show resolved Hide resolved
Copy link
Collaborator

@AdrianSosic AdrianSosic left a comment

Choose a reason for hiding this comment

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

Hey @AVHopp, thanks for the fix 👍🏼 I think the changes are fine, but my only concern is that I don't really know how sustainable this solution is. All I can say: "Smiles" and the two TypeVars is not all --> there will certainly be more of that stuff in the future and especially the upcoming typing PRs. But I completely leave this decision to you, since you have the overview of the docs. If you think this is the way to go, then go! But be prepared for more "exceptions" to come :D

CHANGELOG.md Outdated Show resolved Hide resolved
@AVHopp AVHopp merged commit 5b48a73 into main Dec 18, 2023
8 checks passed
@AVHopp AVHopp deleted the docs/fix_links branch December 18, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants