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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebedf3686cd4eea3b05ace96f00595d34662e252c8ef5762fbbf93e7fc112189
|
|
| MD5 |
3b230146fa24b2f110d4fa3a84da07b6
|
|
| BLAKE2b-256 |
8217a4e56cc6766125f43ea1d428c29b241c91918be805b4e3f7ac7ee826e04d
|
File details
Details for the file applied_biostats_helper-0.2.0-py3-none-any.whl.
File metadata
- Download URL: applied_biostats_helper-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0af9c2e1156d539b6cd8e2fec1e0f697ad62511b972a749fd4aa84537be5c2b9
|
|
| MD5 |
01c0552979eead07413bc0d28759ac7e
|
|
| BLAKE2b-256 |
a4f60df436e39ba692c0e0bbba6be47b49a4f23263129ef83ea677bf64d23736
|