Skip to main content

Student-friendly, privacy-safe diagnostics, paths, and logging helpers for analytics projects.

Project description

Data Analytics Fundamentals: Toolkit

Latest Release Docs License: MIT CI Deploy-Docs Check Links Dependabot

Privacy-safe diagnostics, paths, and logging helpers for analytics projects.

What This Provides

  • find_project_root() and safe_relpath_str() for robust, repo-relative paths
  • get_logger() for consistent console and file logging (using a standard logging API)
  • log_header() for a privacy-safe logging header (shows OS, shell, Python version, repo-relative cwd)

This toolkit is designed for reuse. It works the same locally and in GitHub Actions.

Install (Choose One)

uv add datafun-toolkit
pip install datafun-toolkit

Example

from datafun_toolkit import find_project_root, get_logger, log_header, safe_relpath_str
from pathlib import Path

def main() -> None:
    logger = get_logger("example")
    log_header(logger, "example")

    root = find_project_root()
    logger.info(f"project_root={root.name}")
    logger.info(f"cwd={safe_relpath_str(Path.cwd(), root)}")

if __name__ == "__main__":
    main()

Developer Setup

Tools:

  • git
  • uv
  • VS Code

One-time setup:

uv self update
uv python pin 3.12
uv sync --extra dev --extra docs --upgrade

Before starting work:

git pull

After working, run checks:

git add .
uv run ruff check .
uv run ruff format .
uv run deptry .
uv run pyright
uv run pytest
uv run bandit -c pyproject.toml -r src
uv run pre-commit run --all-files
git add .

Build and serve docs:

uv run mkdocs build --strict
uv run mkdocs serve

Annotations

ANNOTATIONS.md

Citation

CITATION.cff

License

MIT

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

datafun_toolkit-0.9.1.tar.gz (83.0 kB view details)

Uploaded Source

Built Distribution

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

datafun_toolkit-0.9.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file datafun_toolkit-0.9.1.tar.gz.

File metadata

  • Download URL: datafun_toolkit-0.9.1.tar.gz
  • Upload date:
  • Size: 83.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datafun_toolkit-0.9.1.tar.gz
Algorithm Hash digest
SHA256 82eb9e8de50aaf6580d0a543e086659d3ec3c24e81f9e6b38ba77f7d2ddbc4b6
MD5 fdadb61524375e684582aee90ec66633
BLAKE2b-256 03dcfe923fb3bea88be7ae45c649a738667cb014bbd5a5dc9c685f473d1d40a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for datafun_toolkit-0.9.1.tar.gz:

Publisher: release.yml on denisecase/datafun-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datafun_toolkit-0.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for datafun_toolkit-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99557745c6d989abe15a64fe3a539f96c4fbfcb3e3d945966ca670a046718160
MD5 927eebfc3c25d622696b8d60ad28047b
BLAKE2b-256 4b19c6191e5684b6987245a11808a806bb8653378c5f6a28454189fb7d8dfa8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for datafun_toolkit-0.9.1-py3-none-any.whl:

Publisher: release.yml on denisecase/datafun-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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