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)

```python
# 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.2.0

  • Adding development environment detection

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.2.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.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: applied_biostats_helper-0.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 ebedf3686cd4eea3b05ace96f00595d34662e252c8ef5762fbbf93e7fc112189
MD5 3b230146fa24b2f110d4fa3a84da07b6
BLAKE2b-256 8217a4e56cc6766125f43ea1d428c29b241c91918be805b4e3f7ac7ee826e04d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for applied_biostats_helper-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0af9c2e1156d539b6cd8e2fec1e0f697ad62511b972a749fd4aa84537be5c2b9
MD5 01c0552979eead07413bc0d28759ac7e
BLAKE2b-256 a4f60df436e39ba692c0e0bbba6be47b49a4f23263129ef83ea677bf64d23736

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