This repository contains the automation-lib Python package, a collection of automation modules for document processing.
This section provides instructions on how to build and distribute this Python package.
To build the source distribution and wheel files for the package, follow these steps:
-
Navigate to the project root:
cd /path/to/your/automation-lib-repo(Note: If you are already in the root directory of this repository, you can skip this step.)
-
Install
build(if not already installed):uv pip install build
-
Create the Source Distribution and Wheel:
uv build
After running this command, the created files (e.g.,
automation_lib-0.1.0-py3-none-any.whlandautomation_lib-0.1.0.tar.gz) will be located in thedist/directory.
You can install this package locally in another Python project for development or testing purposes.
-
Navigate to your other project directory:
cd /path/to/your/other-project -
Create a virtual environment (if not already done) and activate it:
python -m venv venv source venv/bin/activate -
Install the package from the
dist/directory:uv pip install /path/to/your/new/automation-lib-repo/dist/automation_lib-0.1.0-py3-none-any.whl
Replace
/path/to/your/new/automation-lib-repowith the actual path to this repository on your system.
After installation, you can import modules from automation_lib as usual:
from automation_lib.llm_prompt import ...
from automation_lib.transcription import ...Der Release-Prozess für dieses Projekt ist automatisiert und erfolgt über das Makefile. Hier ist eine Übersicht über die notwendigen Schritte:
Wichtig: Vor dem Release müssen alle Änderungen eingecheckt und gepusht sein:
-
Alle Änderungen committen:
git add . git commit -m "feat: Beschreibung der Änderungen"
-
Änderungen pushen:
git push origin main
-
Status überprüfen:
git status # Sollte "working tree clean" anzeigen
Nach der Vorbereitung kann der Release über das Makefile angestoßen werden:
# Patch-Version erhöhen (0.1.0 → 0.1.1) - für Bugfixes
make publish-github
# Minor-Version erhöhen (0.1.0 → 0.2.0) - für neue Features
make publish-github-minor
# Major-Version erhöhen (0.1.0 → 1.0.0) - für Breaking Changes
make publish-github-major
# Test-Durchlauf ohne Änderungen (Dry-Run)
make publish-github-dryDer automatisierte Release-Prozess führt folgende Schritte aus:
- Versionsnummer aktualisieren in
pyproject.toml - Paket bauen mit
make build - Git-Commit erstellen mit der neuen Version
- Git-Tag erstellen (z.B.
v1.0.0) - Änderungen und Tags zu GitHub pushen
Für erweiterte Kontrolle können Sie auch das Publishing-Script direkt verwenden:
# Grundlegende Verwendung
python3 scripts/publish_to_github.py
# Spezifischen Versionstyp angeben
python3 scripts/publish_to_github.py --version-type minor
# Explizite Version setzen
python3 scripts/publish_to_github.py --version 1.2.3
# Dry-Run (Simulation ohne Änderungen)
python3 scripts/publish_to_github.py --dry-run
# Alle Prompts automatisch bestätigen
python3 scripts/publish_to_github.py --auto-confirmNach dem Release kann das Paket von GitHub installiert werden:
# Neueste Version
uv pip install git+https://github.com/jakobwowy/automation_lib.git#egg=automation-lib
# Spezifische Version
uv pip install git+https://github.com/jakobwowy/automation_lib.git@v1.0.0#egg=automation-libFor private distribution within an organization, consider the following options:
- Private PyPI Server: Solutions like DevPI or Artifactory can host your private Python packages.
- Direct Installation from Git Repository: You can install directly from a Git repository using
uv add git+https://github.com/jakobwowy/automation_lib.git#egg=automation-lib. - Local Wheel File: For internal use, direct installation of the
.whlfile (as described in "Local Installation") is often sufficient.