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: Show typehints in description #1192

Merged
merged 8 commits into from
Nov 20, 2023

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Nov 19, 2023

Instead of in the signature. Much more readable.

E.g., before: https://pypesto.readthedocs.io/en/latest/api/pypesto.visualize.html#pypesto.visualize.waterfall
after: https://pypesto--1192.org.readthedocs.build/en/1192/api/pypesto.visualize.html#pypesto.visualize.waterfall

Also fixes some function documentation missing from sphinx docs due to lack of wraps.

Also removes some circular dependencies.

Instead of in the signature. Much more readable.
@dweindl dweindl requested a review from a team as a code owner November 19, 2023 08:57
@codecov-commenter
Copy link

codecov-commenter commented Nov 19, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (c1ddbfc) 84.24% compared to head (9eeb389) 84.25%.

Files Patch % Lines
pypesto/visualize/ordinal_categories.py 66.66% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1192      +/-   ##
===========================================
+ Coverage    84.24%   84.25%   +0.01%     
===========================================
  Files          148      148              
  Lines        11724    11727       +3     
===========================================
+ Hits          9877     9881       +4     
+ Misses        1847     1846       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dweindl dweindl marked this pull request as draft November 19, 2023 09:19
###############################################################################
# SELECT

TYPE_POSTPROCESSOR = Callable[["ModelProblem"], None] # noqa: F821
Copy link
Member Author

Choose a reason for hiding this comment

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

@dilpath : Had to shuffle some things around to break circular dependencies. Is that okay?

Copy link
Member

Choose a reason for hiding this comment

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

Looks fine to me, thanks 👍

@dweindl dweindl marked this pull request as ready for review November 19, 2023 19:53
###############################################################################
# SELECT

TYPE_POSTPROCESSOR = Callable[["ModelProblem"], None] # noqa: F821
Copy link
Member

Choose a reason for hiding this comment

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

Looks fine to me, thanks 👍

@@ -28,7 +28,7 @@ class PredictorTask(Task):

def __init__(
self,
predictor: 'pypesto.predict.Predictor', # noqa: F821
predictor, #: 'pypesto.predict.Predictor', # noqa: F821
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this also commented due to circular imports?

Copy link
Member Author

@dweindl dweindl Nov 20, 2023

Choose a reason for hiding this comment

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

No, because it doesn't exist 😑 . This whole module is not used anywhere. I think it could/should be removed, but I went for the more conservative approach.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, it should be pypesto.predict.AmiciPredictor I guess -- there is no parent Predictor class.

Copy link
Member Author

Choose a reason for hiding this comment

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

Possible, but not sure what was intended there, as it's really not used anywhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

Was introduced in this monster, without usage #490

@dweindl dweindl merged commit c3baaf5 into ICB-DCM:develop Nov 20, 2023
17 of 18 checks passed
@dweindl dweindl deleted the doc_typehints_to_description branch November 20, 2023 11:03
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.

4 participants