Skip to main content

Helper package for Applied Biostats course - simplifies Colab environment setup and grading

Project description

Applied Biostats Helper

A Python package that simplifies environment setup for the Applied Biostats course, particularly for Google Colab notebooks. This package replaces complex setup blocks with a single function call.

Features

  • One-line environment setup for Colab and local Jupyter notebooks
  • Automatic dependency management (installs otter-grader if needed)
  • Seamless test file downloading from GitHub repositories
  • Environment detection (automatically detects Colab vs local)
  • Clean error handling and user feedback

Installation

From GitHub (Recommended for testing)

pip install git+https://github.com/DamLabResources/applied-biostats-helper.git.

From PyPI (when published)

pip install applied-biostats-helper

Local Development

git clone https://github.com/DamLabResources/applied-biostats-helper.git
cd applied-biostats-helper
pip install -e .

Quick Start

Before (Complex setup block)

# Setting up the Colab environment. DO NOT EDIT!
import os
import warnings
warnings.filterwarnings("ignore")

try:
    import otter
except ImportError:
    ! pip install -q otter-grader==4.0.0
    import otter

if not os.path.exists('walkthrough-tests'):
    zip_files = [f for f in os.listdir() if f.endswith('.zip')]
    assert len(zip_files)>0, 'Could not find any zip files!'
    assert len(zip_files)==1, 'Found multiple zip files!'
    ! unzip {zip_files[0]}

grader = otter.Notebook(colab=True, tests_dir='walkthrough-tests')

After (Simple one-liner)

from applied_biostats import setup_environment

grader = setup_environment('Module02_walkthrough')

Usage

Main Function: setup_environment()

The primary function that handles all setup tasks:

from applied_biostats import setup_environment

# Basic usage
grader = setup_environment('Module02_walkthrough')

# With custom branch
grader = setup_environment('Module02_walkthrough',
                          branch='dev')

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

For issues and questions:

  • Open an issue on GitHub
  • Contact the course instructors

Changelog

v0.1.0

  • Initial release
  • Basic environment setup functionality
  • GitHub integration for test file downloads
  • Colab and local Jupyter support

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

applied_biostats_helper-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

applied_biostats_helper-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file applied_biostats_helper-0.1.0.tar.gz.

File metadata

  • Download URL: applied_biostats_helper-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.5

File hashes

Hashes for applied_biostats_helper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 23a51f938e6c49299c88610ded7be413b29676106d6c73eebf7aa381621c4358
MD5 b33ea3680372d6262a3a06ae95aaa83f
BLAKE2b-256 21e0223216df070142d89cf8f8abf9b6873e70ddcca18a53af87186acf73fd1a

See more details on using hashes here.

File details

Details for the file applied_biostats_helper-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for applied_biostats_helper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d10cf7cbc2552ee92fdfe78693db4c9b974b50643b5431f5f9116d0152b0143f
MD5 069e03e2c4235f7166b0dbc67bef8e20
BLAKE2b-256 aecda8866d5ffc2b8991d50824d44480ca5da35127b186886cdb50c3fef3d583

See more details on using hashes here.

Supported by

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