Skip to content

Commit

Permalink
Add documentation links for platformdirs package and update data load…
Browse files Browse the repository at this point in the history
…ing module
  • Loading branch information
PhilipMay committed Dec 21, 2023
1 parent 176fd20 commit 67cf901
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"git": ("https://gitpython.readthedocs.io/en/stable/", None),
"platformdirs": ("https://platformdirs.readthedocs.io/en/latest/", None),
}

# html_logo = "imgs/xxx.png"
Expand Down
12 changes: 11 additions & 1 deletion mltb2/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
# This software is distributed under the terms of the MIT license
# which is available at https://opensource.org/licenses/MIT

"""Data loading module.
"""This module offers tools for loading data.
The following tabular data sets are supported:
- colon: `<http://genomics-pubs.princeton.edu/oncology/affydata/index.html>`_
- prostate: `<https://web.stanford.edu/~hastie/CASI_files/DATA/prostate.html>`_
- leukemia_big: `<https://web.stanford.edu/~hastie/CASI_files/DATA/leukemia.html>`_
After loading the data from the internet it is parsed, converted and
cached in the mltb2 data directory.
This data directory is determined by :func:`mltb2.files.get_and_create_mltb2_data_dir`.
Hint:
Use pip to install the necessary dependencies for this module:
Expand Down
8 changes: 6 additions & 2 deletions mltb2/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@


def get_and_create_mltb2_data_dir(mltb2_base_data_dir: Optional[str] = None) -> str:
"""Return and create mltb data dir.
"""Return and create a data dir for mltb2.
The exact directory is given by the ``mltb2_base_data_dir`` as the base folder
and then the folder ``mltb2`` is appended.
Args:
mltb2_base_data_dir: The base data directory. If ``None`` the default
user data directory is used.
user data directory is used. The default user data directory is
determined by :func:`platformdirs.user_data_dir`.
Returns:
The directory path.
Expand Down

0 comments on commit 67cf901

Please sign in to comment.