Skip to main content

Utility functions to write LivingPark notebooks.

Project description

\n# LivingPark utils

A collection of utility functions to write LivingPark notebooks.

Usage examples:

import livingpark_utils
from livingpark_utils.dataset import ppmi
from livingpark_utils.clinical import moca2mmse

utils = livingpark_utils.LivingParkUtils()
utils.notebook_init()
utils.get_study_files(["Demographics.csv"])
utils.get_T1_nifti_files(cohort)  # `cohort` is of type: pd.DataFrame

ppmi.find_nifti_file_in_cache(x["PATNO"], x["EVENT_ID"], x["Description"])
ppmi.disease_duration()

moca2mmse(2)

Usage to execute utility notebooks:

from livingpark_utils.scripts import run

run.mri_metadata()
run.pd_status()

Note: Optionally use the %%capture cell magic to further hide notebook outputs.

Troubleshooting

Permission issues on Windows

We use symbolic links when creating the folder for cached data. Unfortunately, by default, Windows does not authorize users to create symbolic links. To fix this issue on your machine, please follow the guide from this blog post.

Contributing guidelines

We welcome contributions of any kind in the form of Pull-Request to this repository. See also LivingPark contributing guidelines.

Make sure to:

  • Use Python type annotations
  • Include Python docstrings using numpydoc format for all functions
  • Format docstrings
  • Run psf/black on the files you modify
  • Run pre-commit run --all before committing, this will be checked in your PR

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livingpark_utils-0.7.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

livingpark_utils-0.7-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

Details for the file livingpark_utils-0.7.tar.gz.

File metadata

  • Download URL: livingpark_utils-0.7.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for livingpark_utils-0.7.tar.gz
Algorithm Hash digest
SHA256 6efb600a6c9908bbdc58be53da0e4a0c15e667d0f100ea1067f2ff6f229b15dd
MD5 b97e4dc5d39f1a8205763c8d4c74b05a
BLAKE2b-256 fae8d58ce9fe4bb42a7bb92d0d201e1e9235278dad70a3edbc0e2f1ce5a162bd

See more details on using hashes here.

Provenance

File details

Details for the file livingpark_utils-0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for livingpark_utils-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 42043609f340effc536dbac17746353c4fc40c9119c0da72d792d79adb204bb2
MD5 f752ba1a64dd07da6d5065b221e1f36d
BLAKE2b-256 b8a005dba187c3afa016244a2083c1bd5557c8f9ac8f85267b9a21e8fc9f7e6b

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page