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

Update docstrings in get_filepath_df #28

Closed
JohannesWiesner opened this issue Apr 19, 2024 · 0 comments
Closed

Update docstrings in get_filepath_df #28

JohannesWiesner opened this issue Apr 19, 2024 · 0 comments

Comments

@JohannesWiesner
Copy link
Owner

Forgot to put docs of must_not_containy_any and must_not_contain_all also in get_filepath_df:

nisupply/nisupply/io.py

Lines 156 to 203 in 141697e

def get_filepath_df(src_dir,regex_dict=None,**kwargs):
'''Find files in one ore multiple directories.
Parameters
----------
src_dir: list-like of str, str
One or multiple source directories that should be searched for files
regex_dict: dict
A dicionary where the keys denote names of new columns that should be
added to the dataframe and the values denote regex-patterns. If
a regex-pattern contains a capture group, the group will be returned,
otherwise the whole match. If no match could be found np.nan will be
returned.
Default: None
file_suffix: str, tuple of strs
One or multiple strings on which the end of the filepath should match.
Default: None
file_prefix: str, tuple of strs
One or multiple strings on which the beginning of the filepath should match.
Default: None
exclude_dirs : str, list of str, None
Name of single directory or list of directory names that should be ignored when searching for files.
All of the specified directories and their child directories will be ignored.
Default: None
must_contain_all: str, list of str
Single string or list of strings that must all appear in the filepath
Default: None
must_contain_any: str, list of str
Single string or list of strings where any of those must appear in the filepath
Default: None
case_sensitive: Boolean
If False, all files will be converted to lower-case letters first before
applying search conditions.
Default: True
Returns
-------
filepath_df: pd.DataFrame
A data frame with a 'filepath' column and optionally other columns
defined using regular expressions.

This might even not be necessary because modern IDEs can simply get the docs from find_files so we don't have to rewrite them one more time in get_filepath_df?

JohannesWiesner added a commit that referenced this issue Nov 8, 2024
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

No branches or pull requests

1 participant