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

Uploaded Python 3

File details

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

File metadata

  • Download URL: datafun_toolkit-0.9.2.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.2.tar.gz
Algorithm Hash digest
SHA256 c857a2fdba5b4a0a4ccf8ae40a60d55feb207fd1ff45889852ef3750d82b8acd
MD5 c7e81afda2c8a5fbfd5cecb4eecb61e7
BLAKE2b-256 97d590dfd91a290918b57a6de8c2835c900f58cac0229d87c4de192b2aad81ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for datafun_toolkit-0.9.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for datafun_toolkit-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6f63df2892576ec625264ba2d582765fdeb43109c1bf55487bd6eeae3822f0ff
MD5 58198c642ada45e6f46fc81e1c764c67
BLAKE2b-256 0d0a7e998002f3768abd89caf9e91f68c0b055e05b8a150828bff53807d14de9

See more details on using hashes here.

Provenance

The following attestation bundles were made for datafun_toolkit-0.9.2-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