Skip to main content

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.3.tar.gz (82.8 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.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: datafun_toolkit-0.9.3.tar.gz
  • Upload date:
  • Size: 82.8 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.3.tar.gz
Algorithm Hash digest
SHA256 d99086100787777eb6d2e212f6d9e320157e052345c654658495911d313e2118
MD5 88662f64b80d9ae0b796928b172c2278
BLAKE2b-256 0a3c6d38533f46afd14a4fd921664a246aac0fc21fa3b2d70e2173c22d20d8af

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for datafun_toolkit-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b59ed7a18fcfae5bf06bf92bf34d4f51f1662ae08ca4473f33791e79f0faee40
MD5 a1fb92ac78200bd3c28eb8d38a5bf417
BLAKE2b-256 b7138e320904ab0ee2ed7cc4929e0d0fe0644defac58c076f1e6f49f2894659c

See more details on using hashes here.

Provenance

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