Shared utilities and tooling for the HomericIntelligence ecosystem
Project description
ProjectHephaestus
Shared utilities and tooling for the HomericIntelligence ecosystem, powered by Pixi for environment management.
Overview
ProjectHephaestus provides standardized utility functions and tools that can be shared across all HomericIntelligence repositories. Following the principles in CLAUDE.md, this project emphasizes:
- Modularity: Well-defined, reusable components
- Simplicity: KISS (Keep It Simple, Stupid) principle
- Consistency: Standardized interfaces and patterns
- Reliability: Comprehensive testing and error handling
Directory Structure
ProjectHephaestus/
├── pixi.toml # Pixi configuration
├── pyproject.toml # Python package configuration
├── hephaestus/ # Main package
│ ├── __init__.py
│ ├── utils/ # General utility functions (slugify, retry, subprocess)
│ ├── config/ # Configuration utilities (YAML, JSON, env vars)
│ ├── io/ # I/O utilities (read, write, safe_write, load/save data)
│ ├── cli/ # CLI helpers (argument parsing, output formatting)
│ ├── logging/ # Logging utilities (ContextLogger, setup_logging)
│ ├── system/ # System information collection
│ ├── git/ # Git utilities (changelog generation)
│ ├── github/ # GitHub automation (PR merging)
│ ├── datasets/ # Dataset downloading utilities
│ ├── markdown/ # Markdown linting and link fixing
│ ├── benchmarks/ # Benchmark comparison utilities
│ ├── version/ # Version management
│ └── validation/ # README and config validation
├── tests/ # Unit tests
├── docs/ # Documentation
├── scripts/ # Utility scripts
└── README.md # This file
Getting Started with Pixi
This project uses Pixi for environment management, which automatically handles dependencies and creates isolated environments.
Prerequisites
Install Pixi by following the official installation guide.
Setup Development Environment
# Install dependencies and create environment
pixi install
# Activate the environment (optional, as pixi runs commands in the environment automatically)
pixi shell
Running Tests
# Run tests using the test feature
pixi run test
# Or run tests directly with pytest
pixi run pytest
Development Commands
# Format code with ruff
pixi run format
# Lint code with ruff
pixi run lint
Usage
As a Package
After installing with Pixi:
from hephaestus import slugify, human_readable_size, retry_with_backoff
# Convert text to URL-friendly slug
project_slug = slugify("My Project Name")
print(project_slug) # Output: my-project-name
# Convert bytes to human readable size
size_str = human_readable_size(1048576)
print(size_str) # Output: 1.0 MB
Installing in Another Project
To use ProjectHephaestus in another project with Pixi:
-
Add it as a dependency in your
pixi.toml:[pypi-dependencies] hephaestus = { path = "../ProjectHephaestus", editable = true }
-
Run
pixi installto install the dependency
Or install directly with pip:
pip install -e /path/to/ProjectHephaestus
Key Features
General Utilities (hephaestus.utils)
slugify(text): Convert text to URL-friendly slugretry_with_backoff(func): Decorator for exponential backoff retrieshuman_readable_size(bytes): Convert bytes to human readable formatflatten_dict(dict): Flatten nested dictionariesrun_subprocess(cmd): Execute shell commands with error handlingget_setting(config, key_path): Get nested dict values with dot notation
Configuration (hephaestus.config)
load_config(path): Load YAML or JSON configuration filesget_setting(config, key_path): Dot-notation config accessmerge_configs(*configs): Deep-merge multiple configuration dictsmerge_with_env(config, prefix): Overlay environment variables onto config
I/O Utilities (hephaestus.io)
read_file(path)/write_file(path, content): Simple file I/Oload_data(path)/save_data(path, data): Structured data (JSON/YAML)
CLI Commands
Four command-line tools are installed as console scripts when you install the package:
| Command | Description |
|---|---|
hephaestus-changelog |
Generate a changelog from Git history |
hephaestus-merge-prs |
Automate merging of GitHub pull requests |
hephaestus-system-info |
Collect and display system/environment information |
hephaestus-download-dataset |
Download datasets with retry and progress reporting |
Examples
# Generate changelog
hephaestus-changelog --help
# Collect system info (JSON output)
hephaestus-system-info --json
# Collect system info without tool version checks
hephaestus-system-info --no-tools
# Download a dataset
hephaestus-download-dataset --help
# Merge open PRs
hephaestus-merge-prs --help
Development Guidelines
- Follow the principles in CLAUDE.md
- Write comprehensive unit tests for all new functionality
- Document all public functions with Google-style docstrings
- Use type hints for all function parameters and return values
- Keep functions small and focused (single responsibility principle)
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Pixi Environments
This project defines multiple environments in pixi.toml:
- default: Basic runtime environment
- dev: Development environment with linting and formatting tools
- lint: Linting-only environment
Switch environments with:
pixi shell -e dev
pixi shell -e lint
Adding New Dependencies
Add new dependencies to pixi.toml:
For conda packages:
[dependencies]
numpy = "*"
For PyPI packages:
[pypi-dependencies]
requests = "*"
Then run:
pixi install
License
BSD 3-Clause License - see LICENSE file for details.
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 homericintelligence_hephaestus-0.4.0.tar.gz.
File metadata
- Download URL: homericintelligence_hephaestus-0.4.0.tar.gz
- Upload date:
- Size: 157.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 |
9e7d8e0ff8201d2e32aa40d69e827fd3f86b206189bb32c11f59fa3d980e6997
|
|
| MD5 |
74ceed48d6c5015c95be39be8a166b44
|
|
| BLAKE2b-256 |
b1f473e16f8767bb68a3a10ad6e65c4f65261afe9ad44a250979acaf3e6517c6
|
Provenance
The following attestation bundles were made for homericintelligence_hephaestus-0.4.0.tar.gz:
Publisher:
release.yml on HomericIntelligence/ProjectHephaestus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
homericintelligence_hephaestus-0.4.0.tar.gz -
Subject digest:
9e7d8e0ff8201d2e32aa40d69e827fd3f86b206189bb32c11f59fa3d980e6997 - Sigstore transparency entry: 1155508544
- Sigstore integration time:
-
Permalink:
HomericIntelligence/ProjectHephaestus@2fd03c5b4f605cdeaa9ca1a55560e7e8fff20406 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/HomericIntelligence
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2fd03c5b4f605cdeaa9ca1a55560e7e8fff20406 -
Trigger Event:
push
-
Statement type:
File details
Details for the file homericintelligence_hephaestus-0.4.0-py3-none-any.whl.
File metadata
- Download URL: homericintelligence_hephaestus-0.4.0-py3-none-any.whl
- Upload date:
- Size: 59.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 |
85eb021f783b998275ca5c913ab9597cae767071676e16dc9d6fc74340cf5747
|
|
| MD5 |
856f979f8339be8a35a6a7ae00d728db
|
|
| BLAKE2b-256 |
3262e3a819dce447a762d580f38cfad8aa917a321695c3c49afc2c15e474298a
|
Provenance
The following attestation bundles were made for homericintelligence_hephaestus-0.4.0-py3-none-any.whl:
Publisher:
release.yml on HomericIntelligence/ProjectHephaestus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
homericintelligence_hephaestus-0.4.0-py3-none-any.whl -
Subject digest:
85eb021f783b998275ca5c913ab9597cae767071676e16dc9d6fc74340cf5747 - Sigstore transparency entry: 1155508546
- Sigstore integration time:
-
Permalink:
HomericIntelligence/ProjectHephaestus@2fd03c5b4f605cdeaa9ca1a55560e7e8fff20406 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/HomericIntelligence
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2fd03c5b4f605cdeaa9ca1a55560e7e8fff20406 -
Trigger Event:
push
-
Statement type: