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

add docstrings to all functions #100

Merged
merged 17 commits into from
Feb 14, 2024

Conversation

McHaillet
Copy link
Collaborator

@McHaillet McHaillet commented Feb 12, 2024

This is a draft PR to expand and update the docstrings of the code.

This PR expands doscstrings, except for the file correlation.py where I updated some functions to first create an output return variable. In all other files its just docstrings updates.

Closes #8

PR#100 💯

@McHaillet McHaillet marked this pull request as ready for review February 13, 2024 14:12
@McHaillet McHaillet requested a review from sroet February 13, 2024 14:19
Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

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

quite some issues, most of them about how to describe defaults in the docstrings.
Feel free to ignore them, if you don't agree with this way of mentioning defaults

Comment on lines 137 to 138
shape: tuple[int, int, int]
shape tuple with x,y or x,y,z dimension
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't this then be:

Suggested change
shape: tuple[int, int, int]
shape tuple with x,y or x,y,z dimension
shape: Union[tuple[int, int, int], tuple[int, int]]
shape tuple with x,y or x,y,z dimension

and also be fixed in the type hint?

Comment on lines 163 to 164
shape: tuple[int, int, int]
shape tuple with x,y or x,y,z dimension
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

Suggested change
shape: tuple[int, int, int]
shape tuple with x,y or x,y,z dimension
shape: Union[tuple[int, int, int], tuple[int, int]]
shape tuple with x,y or x,y,z dimension

Comment on lines 196 to 197
shape: tuple[int, int, int]
shape tuple with x,y or x,y,z dimension
Copy link
Collaborator

Choose a reason for hiding this comment

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

as above

Suggested change
shape: tuple[int, int, int]
shape tuple with x,y or x,y,z dimension
shape: Union[tuple[int, int, int], tuple[int, int]]
shape tuple with x,y or x,y,z dimension

shape tuple with x,y or x,y,z dimension
spacing: float
voxel size in real space
low_pass: Optional[float]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
low_pass: Optional[float]
low_pass: Optional[float], default None

voxel size in real space
low_pass: Optional[float]
resolution of low-pass filter
high_pass: Optional[float]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
high_pass: Optional[float]
high_pass: Optional[float], default None

@McHaillet
Copy link
Collaborator Author

Thanks for the detailed review. I think its a good idea to add the defaults !

just FYI went through the first suggestions, will continue tonight or tomorrow.

@McHaillet McHaillet requested a review from sroet February 14, 2024 09:00
Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

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

2 leftover issues from the previous round, LGTM otherwise

@sroet
Copy link
Collaborator

sroet commented Feb 14, 2024

Hmm, this unfortunately did not grab the parent comments, but those lines are still missing defaults 😄 and where mentioned here and here

McHaillet and others added 2 commits February 14, 2024 10:55
@McHaillet
Copy link
Collaborator Author

thanks for the links, yep now they are resolved!

@McHaillet McHaillet requested a review from sroet February 14, 2024 09:56
Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to merge

@McHaillet McHaillet merged commit d250bcf into SBC-Utrecht:main Feb 14, 2024
@McHaillet McHaillet deleted the expand-doscstrings branch February 14, 2024 10:47
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.

expand the docstrings further
2 participants