Package Publishing¶
This project is publish-ready as a Python package with distribution name:
- sourcerers
Install/import example:
pip install sourcerers
from app import OllamaClient, parse_model_response, build_selection_prompt
Local Build And Validation¶
uv sync
uv run python -m build
uv run twine check dist/*
GitHub Release Publishing¶
Publishing workflow:
- .github/workflows/publish-pypi.yml
Trigger options:
- Publish a GitHub Release (recommended)
- Manual workflow_dispatch
The workflow:
- Builds source and wheel distributions.
- Validates metadata with twine.
- Publishes to PyPI via trusted publishing (OIDC).
One-Time PyPI Setup¶
- Create the project on PyPI (or first publish if name is available).
- In PyPI project settings, add a Trusted Publisher:
- Owner: amirhossein-razlighi
- Repository: LLM-News-Bias-Analysis
- Workflow: publish-pypi.yml
- Environment: pypi
- In GitHub repository settings, create environment pypi.
- Ensure Actions workflow permissions allow id-token usage.
TestPyPI (Optional)¶
If you want a dry run, duplicate the workflow for TestPyPI with:
repository_url: https://test.pypi.org/legacy/- environment: testpypi
Public API Surface¶
The package exports stable entry points from app:
- Core schemas and enums
- Experiment builders
- Parsing helpers
- Ollama client
- Analytics helpers
Prefer importing from app for long-term stability.