Data acquisition tools for Wagnerds
Project description
WagsTAILS
Technology-Assisted Information Loading and Structure (TAILS) for Wagnerds.
This tool provides data acquisition and access utilities for several projects developed by the Wagner Lab.
Installation
Install from PyPI:
python3 -m pip install wags_tails
Usage
Data source classes provide a get_latest()
method that acquires the most recent available data file and returns a pathlib.Path object with its location:
>>> from wags_tails.mondo import MondoData
>>> m = MondoData()
>>> m.get_latest(force_refresh=True)
Downloading mondo.owl: 100%|█████████████████| 171M/171M [00:28<00:00, 6.23MB/s]
PosixPath('/Users/genomicmedlab/.local/share/wags_tails/mondo/mondo_v2023-09-12.owl'), 'v2023-09-12'
Initialize the source class with the silent
parameter set to True to suppress console output:
>>> from wags_tails.mondo import MondoData
>>> m = MondoData(silent=True)
>>> latest_file, version = m.get_latest(force_refresh=True)
Configuration
All data is stored within source-specific subdirectories of a designated WagsTails data directory. By default, this location is ~/.local/share/wags_tails/
, but it can be configured by passing a Path directly to a data class on initialization, via the $WAGS_TAILS_DIR
environment variable, or via XDG data environment variables.
Development
Check out the repository:
git clone https://github.com/GenomicMedLab/wags-tails
cd wags-tails
Create a developer environment, e.g. with virtualenv
:
python3 -m virtualenv venv
source venv/bin/activate
Install dev and test dependencies, including pre-commit
:
python3 -m pip install -e '.[dev,test]'
pre-commit install
Check style:
black . && ruff check --fix .
Run tests:
pytest
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
Built Distribution
Hashes for wags_tails-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9d747cc926e3c6ae7aa008f35f1df18969927747f7b24fe5bb0728ddd1f100a |
|
MD5 | 216a81fd825475b4936ef6eaa35a54f5 |
|
BLAKE2b-256 | 990eab3c6eaab5e99e3fefd2beeb8f6e8537c1a1d312702ff0d8f6eaf25eb5b2 |