Skip to main content

Personal utility toolkit

Project description

qqgjyx

Personal utility toolkit for ML/DL workflows. Lightweight, modular, and designed for personal projects. Ships a clean, sklearn-inspired structure and a unified QQ interface for ergonomics.

Installation

pip install qqgjyx
# or pin a version
pip install qqgjyx==0.1.2

Requires Python 3.9+.

Highlights

  • Concise, cohesive API with the QQ class
  • Environment and device utilities
  • Reproducibility helpers (seeding)
  • Matplotlib styling (scienceplots)
  • Dataset helpers (train/val split)
  • Sklearn-like structure for long-term maintainability

Quick start

from qqgjyx import QQ

QQ.help()      # Show available utilities and usage
QQ.env()       # Print environment info
QQ.dev()       # Print device info and return torch.device
QQ.seed(42)    # Set seeds across numpy/torch/lightning
QQ.style()     # Set matplotlib style (scienceplots)

# Example: split a Dataset into train/val
from torch.utils.data import Dataset

class MyDataset(Dataset):
    ...

train_set, val_set = QQ.split(MyDataset(...), val_ratio=0.2, seed=42)

Flat, concise functions (direct imports)

from qqgjyx.helper import env, dev, seed
from qqgjyx.visual import style
from qqgjyx.data import split

env()
device = dev()
seed(123)
style()

Backwards-compatible aliases are available:

  • print_environment_info()env()
  • get_device_info()dev()
  • set_all_seeds()seed()
  • set_plt_style()style()
  • train_val_split()split()

Module layout

qqgjyx/
  __init__.py      # version and QQ export
  qq.py            # QQ class (unified interface)
  helper.py        # env(), dev(), seed()
  data/
    __init__.py    # split()
    split.py
  visual/
    __init__.py    # style()
    plotting.py
  model/           # placeholder
  graph/           # placeholder
  validator.py     # ensure_between()
  exceptor.py      # QQGJYXError

Demo notebook

See demo.ipynb at the repository root for a walk-through of all features.

Development

Recommended: use a conda env (example: pkg-dev).

conda run -n pkg-dev python -m pip install -e .
conda run -n pkg-dev python -m pytest -q

Release pipeline (script)

Use the automated script to version, test, build, upload, and tag.

python deploy.py --version 0.1.3 --message "Add new feature"

# or auto-increment patch version
python deploy.py

# options
python deploy.py --skip-tests
python deploy.py --skip-upload
python deploy.py --dry-run

Under the hood, it:

  • updates versions in src/qqgjyx/__init__.py and pyproject.toml
  • runs tests, builds sdist/wheel, validates with twine
  • uploads to PyPI (using local credentials)
  • commits and tags the release

Testing

conda run -n pkg-dev python -m pytest test/ -v

The suite includes core tests that avoid heavy deps and optional comprehensive tests (with mocks).

License

MIT License. See LICENSE.

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

qqgjyx-0.1.5.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

qqgjyx-0.1.5-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file qqgjyx-0.1.5.tar.gz.

File metadata

  • Download URL: qqgjyx-0.1.5.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for qqgjyx-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7596505ce41af81780d54ae7314de57434c0acca7e6853b9f8a8e2b5e2bc649d
MD5 2a50f9f891bc1fe395d4aab852748fd9
BLAKE2b-256 71b70563de71fd2791d23aa9e894db024ca3050790a5e71103b84ec56480853a

See more details on using hashes here.

File details

Details for the file qqgjyx-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: qqgjyx-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for qqgjyx-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e2b4d1ce4ae669cf6251fe25fa36c41667054ef23e45b42e7176094249b63bc0
MD5 c511cfba0fc626c75d5f67ab87abca76
BLAKE2b-256 8de19c2fcec56a1c055c3982dd76032218f1da61f5a7dab79cfce95b5723f99e

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