Buckets:
AnonymousSpottedToad/human_verified_bucket / codebase /python /AmberLee2427_nancy-brain /hatch_hooks.py
| # hatch_hooks.py | |
| import os | |
| from pathlib import Path | |
| from hatchling.metadata.plugin.interface import MetadataHookInterface | |
| class CustomHook(MetadataHookInterface): | |
| def update(self, metadata): | |
| # Recreate authors dynamically (since we removed them from pyproject) | |
| metadata["authors"] = [{"name": "Amber Malpas", "email": "malpas.1@osu.edu"}] | |
| # Your build info side-effect | |
| build_sha = os.environ.get("BUILD_SHA", "unknown") | |
| build_at = os.environ.get("BUILD_AT", "unknown") | |
| out = Path.cwd() / "nancy_brain" / "_build_info.py" | |
| out.parent.mkdir(parents=True, exist_ok=True) | |
| out.write_text(f'__build_sha__ = "{build_sha}"\n__built_at__ = "{build_at}"\n') | |
| def get_metadata_hook(): | |
| return CustomHook | |
Xet Storage Details
- Size:
- 767 Bytes
- Xet hash:
- c5af4e3581984bb335127e733ed7524cd3bc0c9374081d0d551f8b96cfd57b00
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.