Privacy-safe diagnostics, paths, and logging helpers for analytics projects.
Project description
Data Analytics Fundamentals: Toolkit
Privacy-safe diagnostics, paths, and logging helpers for analytics projects.
What This Provides
get_logger()for consistent console and file logginglog_header()for a standardized run headerlog_path()for privacy-safe path logging- environment helpers:
detect_shell(),detect_os(),detect_python()
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
import logging
from pathlib import Path
from datafun_toolkit.logger import get_logger, log_header, log_path
LOG: logging.Logger = get_logger("P01", level="DEBUG")
ROOT_PATH: Path = Path.cwd()
DATA_PATH: Path = ROOT_PATH / "data"
def main() -> None:
"""Start the main logic."""
log_header(LOG, "P01 Pipeline")
LOG.info("START main()")
log_path(LOG, "ROOT_PATH", ROOT_PATH)
log_path(LOG, "DATA_PATH", DATA_PATH)
LOG.info("Working....")
LOG.info("END main()")
if __name__ == "__main__":
main()
Developer Setup
Install tools:
- git
- uv
- VS Code
One-time setup:
uv self update
uv python pin 3.14
uv sync --extra dev --extra docs --upgrade
uvx pre-commit install
git add -A
uvx pre-commit run --all-files
Before starting work:
git pull
After working, run checks:
uv run ruff format .
uv run ruff check . --fix
uv run pytest --cov=src --cov-report=term-missing
uv run deptry .
uv run bandit -c pyproject.toml -r src
uv run validate-pyproject pyproject.toml
Build and serve docs:
uv run zensical build
uv run zensical serve
Hit CTRL+c in the VS Code terminal to quit serving.
Save progress frequently (some tools may make changes; you may need to re-run git add and commit to ensure everything gets committed before pushing):
git add -A
git commit -m "update"
git push -u origin main
Annotations
Citation
License
SE Manifest
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datafun_toolkit-1.0.0.tar.gz.
File metadata
- Download URL: datafun_toolkit-1.0.0.tar.gz
- Upload date:
- Size: 57.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34eec90e183628e5c39e4b53de859be21f470f77607aff1557690d23e6755ad2
|
|
| MD5 |
efeb98ac1bac5dc83b52e621756297f2
|
|
| BLAKE2b-256 |
349b8129c47656e183d1a24687d83d69b25dd5248a2f847fa594350c7ae8b520
|
Provenance
The following attestation bundles were made for datafun_toolkit-1.0.0.tar.gz:
Publisher:
release.yml on denisecase/datafun-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datafun_toolkit-1.0.0.tar.gz -
Subject digest:
34eec90e183628e5c39e4b53de859be21f470f77607aff1557690d23e6755ad2 - Sigstore transparency entry: 1053080292
- Sigstore integration time:
-
Permalink:
denisecase/datafun-toolkit@468471678d17134298bd3dc0fcfde0533efab134 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/denisecase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@468471678d17134298bd3dc0fcfde0533efab134 -
Trigger Event:
push
-
Statement type:
File details
Details for the file datafun_toolkit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: datafun_toolkit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a14c0d63f8457e020dfd93192b418a56ae333e0bf9d73e9780b3d45c78cdef2e
|
|
| MD5 |
b551a28558d43c2223534c9a5e21a7f8
|
|
| BLAKE2b-256 |
3ec035b0b55c4bb1a4a8445550715d376b1e9dc9011dfa263a307ecf9ab77dab
|
Provenance
The following attestation bundles were made for datafun_toolkit-1.0.0-py3-none-any.whl:
Publisher:
release.yml on denisecase/datafun-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datafun_toolkit-1.0.0-py3-none-any.whl -
Subject digest:
a14c0d63f8457e020dfd93192b418a56ae333e0bf9d73e9780b3d45c78cdef2e - Sigstore transparency entry: 1053080380
- Sigstore integration time:
-
Permalink:
denisecase/datafun-toolkit@468471678d17134298bd3dc0fcfde0533efab134 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/denisecase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@468471678d17134298bd3dc0fcfde0533efab134 -
Trigger Event:
push
-
Statement type: