Skip to content

completing docstring for parameters of get_next_sub #482

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions datashuttle/datashuttle_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,19 +1079,21 @@ def get_next_sub(
local_only: bool = False,
) -> str:
"""
Convenience function for get_next_sub_or_ses
Convenience function for `get_next_sub_or_ses`
to find the next subject number.

Parameters
----------
top_level_folder : TopLevelFolder
The top-level folder structure where subject data is organized.
Copy link
Member

Choose a reason for hiding this comment

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

This could be The top-level folder, "rawdata" or "derivatives"


return_with_prefix : bool
If `True`, return with the "sub-" prefix.
return_with_prefix : bool, optional
If `True`, return the subject with the "sub-" prefix. Defaults to `True`.
Copy link
Member

Choose a reason for hiding this comment

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

Here further to this comment and (just added) #483, we will remove type hints and defaults from the doctrings. So I think we can revert the changes that the default (but feel free to keep optional and these can all be removed together). thanks!


local_only : bool
If `True, only get names from `local_path`, otherwise from
`local_path` and `central_path`. If in local-project mode,
this flag is ignored.
local_only : bool, optional
If `True`, only get names from `local_path`; otherwise,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe instead of ; otherwise, it can be a new sentence, starting If False`, ...

retrieve names from both `local_path` and `central_path`.
If in local-project mode, this flag is ignored. Defaults to `False`.
Copy link
Member

Choose a reason for hiding this comment

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

Remove default argument from here, its a nice idea but just because we dont use them elsewhere in the codebase and we will remove type information soon.

"""
name_template = self.get_name_templates()
name_template_regexp = (
Expand Down