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

Docstring cleanup and improvement of style guide compliance #119

Merged
merged 40 commits into from
Dec 6, 2021

Conversation

bwohlberg
Copy link
Collaborator

Docstring cleanup and improvement of style guide compliance.

@bwohlberg bwohlberg added documentation Improvements or additions to documentation developer Developer environment: issues related to CI, git, etc. labels Dec 3, 2021
@codecov
Copy link

codecov bot commented Dec 3, 2021

Codecov Report

Merging #119 (75eacd1) into main (3bdec67) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #119      +/-   ##
==========================================
+ Coverage   90.84%   90.89%   +0.04%     
==========================================
  Files          42       42              
  Lines        2983     2997      +14     
==========================================
+ Hits         2710     2724      +14     
  Misses        273      273              
Flag Coverage Δ
unittests 90.89% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
scico/_generic_operators.py 91.89% <ø> (ø)
scico/admm.py 95.23% <ø> (ø)
scico/data/__init__.py 100.00% <ø> (ø)
scico/diagnostics.py 85.45% <ø> (ø)
scico/flax.py 100.00% <ø> (ø)
scico/functional/_denoiser.py 91.04% <ø> (ø)
scico/functional/_flax.py 92.30% <ø> (ø)
scico/functional/_indicator.py 100.00% <ø> (ø)
scico/functional/_norm.py 100.00% <ø> (ø)
scico/linop/_circconv.py 83.33% <ø> (ø)
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bdec67...75eacd1. Read the comment docs.

Copy link
Contributor

@Michael-T-McCann Michael-T-McCann left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -69,43 +56,21 @@ def conjugated_grad(*args, **kwargs):
return conjugated_grad_aux if has_aux else conjugated_grad


# Append docstring from original jax function
grad.__doc__ = _append_jax_docs(grad)
Copy link
Contributor

Choose a reason for hiding this comment

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

These docs aren't rendering correctly (e.g. see the text after Args: in https://scico--119.org.readthedocs.build/en/119/_autosummary/scico.html#scico.grad). I believe I got something similar working in scico.random after a lot of fighting, see

lines = fun.__doc__.split("\n\n")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Strange, I thought it rendered correctly when I tried to build docs locally. But I guess I missed that. Thanks for the suggestion; I'll give it a try.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not so simple, unfortunately.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 376c06a.


Returns:
tuple: A tuple (x, key) containing:

- **x** : (DeviceArray): Generated random array
- **x** : (DeviceArray): Generated random array.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the "**" formatting here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To make the variables names bold, for compatibility with the parameters section.

@bwohlberg bwohlberg merged commit 9438cf5 into main Dec 6, 2021
@bwohlberg bwohlberg deleted the brendt/cleanup branch December 6, 2021 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer Developer environment: issues related to CI, git, etc. documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants