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
find_project_root()andsafe_relpath_str()for robust, repo-relative pathsget_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
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 (hit CTRL+c in the VS Code terminal to quit serving):
uv run mkdocs build --strict
uv run mkdocs serve
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-0.9.5.tar.gz.
File metadata
- Download URL: datafun_toolkit-0.9.5.tar.gz
- Upload date:
- Size: 71.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c1001abda89ed509d9c0d36664ffc1b8a4e5a861d5db168ba14dce7c4c5d65e
|
|
| MD5 |
d9b40adb33a52e74daa2312f5c49c2b2
|
|
| BLAKE2b-256 |
a383c0f878fc9bb53e12b6c8a1ab8483f7ec0aeeaa2f3cdec46b367f0f85215b
|
Provenance
The following attestation bundles were made for datafun_toolkit-0.9.5.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-0.9.5.tar.gz -
Subject digest:
7c1001abda89ed509d9c0d36664ffc1b8a4e5a861d5db168ba14dce7c4c5d65e - Sigstore transparency entry: 814198120
- Sigstore integration time:
-
Permalink:
denisecase/datafun-toolkit@33d6111a43cd5ab1c00fed78ef5160a4364bef6f -
Branch / Tag:
refs/tags/v0.9.5 - Owner: https://github.com/denisecase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@33d6111a43cd5ab1c00fed78ef5160a4364bef6f -
Trigger Event:
push
-
Statement type:
File details
Details for the file datafun_toolkit-0.9.5-py3-none-any.whl.
File metadata
- Download URL: datafun_toolkit-0.9.5-py3-none-any.whl
- Upload date:
- Size: 9.8 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 |
91c06a0a78aff7c002a66c10d095f9e2306ac992e88da39c5a41d54305cb4d10
|
|
| MD5 |
a08530b64a3d3a0152818d13ac094812
|
|
| BLAKE2b-256 |
92dc4faf4e2be9760fb1f24482bc7db40650fd888414224f4cf87ed5763f852e
|
Provenance
The following attestation bundles were made for datafun_toolkit-0.9.5-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-0.9.5-py3-none-any.whl -
Subject digest:
91c06a0a78aff7c002a66c10d095f9e2306ac992e88da39c5a41d54305cb4d10 - Sigstore transparency entry: 814198123
- Sigstore integration time:
-
Permalink:
denisecase/datafun-toolkit@33d6111a43cd5ab1c00fed78ef5160a4364bef6f -
Branch / Tag:
refs/tags/v0.9.5 - Owner: https://github.com/denisecase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@33d6111a43cd5ab1c00fed78ef5160a4364bef6f -
Trigger Event:
push
-
Statement type: