Linux Foundation Release Engineering Tools
Project description
LF Tools UV
This project's documentation is available on ReadTheDocs (RTD) and GitHub Pages:
- Official Documentation: https://lftools-uv.readthedocs.io
- GitHub Pages: https://modeseven-lfit.github.io/lftools-uv/
LF Tools UV is a collection of scripts and utilities that are useful to Linux Foundation projects' CI and Releng related activities. We try to create these tools to be as generic as possible such that they are reusable in other CI environments.
CLI Interface
lftools-uv uses Typer as the CLI library. For CI/CD environments that
require the previous Click-based output format, use LEGACY_CLI=1.
Installation
Using uv (Recommended)
This project uses uv for fast Python package management.
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
-
Install lftools-uv:
uv pip install lftools-uv
-
Or install with all extras for development:
uv pip install "lftools-uv[all]"
Using pip
pip install lftools-uv
Using uvx (Recommended for CI/CD)
uvx is ideal for CI/CD environments and one-off executions where you want to run lftools-uv without affecting the existing Python environment. It creates an isolated virtual environment for each execution, preventing dependency conflicts with other tools in your pipeline.
Basic Usage
Run lftools-uv commands directly without installation:
# Basic command execution
uvx lftools-uv version
# Run with help
uvx lftools-uv --help
Using Optional Dependencies
When using features that require optional dependencies (like LDAP or OpenStack), you need to specify the extras:
# For LDAP functionality - note the quotes to prevent shell expansion
uvx "lftools-uv[ldap]" ldap --help
# For OpenStack functionality
uvx "lftools-uv[openstack]" openstack --help
# Combined extras
uvx "lftools-uv[ldap,openstack]" --help
# All extras for full functionality
uvx "lftools-uv[all]" --help
Alternative uvx Syntax
You can also use the --from flag for clarity:
# Same as the above
uvx --from "lftools-uv[ldap]" lftools-uv ldap csv mygroup
uvx --from "lftools-uv[openstack]" lftools-uv openstack --help
CI/CD Pipeline Examples
GitHub Actions:
- name: Deploy artifacts with lftools-uv
run: |
uvx lftools-uv deploy nexus-zip \
--nexus-url ${{ secrets.NEXUS_URL }} \
--nexus-repo releases \
./artifacts/*.zip
GitLab CI:
deploy:
script:
- uvx "lftools-uv[all]" deploy logs --help
- uvx lftools-uv sign sigul ./artifacts/
Jenkins Pipeline:
pipeline {
agent any
stages {
stage('Deploy') {
steps {
sh 'uvx lftools-uv version'
sh 'uvx "lftools-uv[ldap]" ldap csv project-committers'
}
}
}
}
Benefits of uvx in CI/CD
- Isolation: No interference with existing Python packages in the CI environment
- Speed: Automatic caching of environments between runs
- Consistency: Same tool version across different pipeline stages
- No Setup: No need to manage virtual environments or installations
- Clean: Environments are automatically cleaned up after execution
Development Setup
Prerequisites
- Python 3.8+
- uv (recommended) or pip
Quick Start with uv
-
Clone the repository:
git clone https://github.com/lfit/lftools-uv.git cd lftools-uv
-
Install development dependencies:
make install-dev # or manually: uv sync --extra dev --extra test --extra docs --extra ldap --extra openstack
-
Run tests:
make test # or manually: uv run pytest
-
Format and lint code:
make format make lint
Available Make Targets
make help- Show all available targetsmake install- Install project dependenciesmake install-dev- Install with all development dependenciesmake test- Run testsmake lint- Run lintingmake format- Format codemake build- Build packagemake docs- Build documentationmake clean- Clean build artifactsmake all- Run full development pipeline
Ubuntu Dependencies
For development on Ubuntu, you may need:
- build-essential
- python3-dev
- libldap2-dev
- libsasl2-dev
- libssl-dev
Repository Information
Development Repository
For development and testing, we maintain this project at:
- Development:
https://github.com/modeseven-lfit/lftools-uv.git
Production Repository
Once tested and approved, we publish releases from:
- Production:
https://github.com/lfit/lftools-uv.git
Local Git Setup
Configure your local git remote for the development repository:
git remote -v
# origin https://github.com/modeseven-lfit/lftools-uv.git (fetch)
# origin https://github.com/modeseven-lfit/lftools-uv.git (push)
Project details
Release history Release notifications | RSS feed
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 lftools_uv-0.1.2.tar.gz.
File metadata
- Download URL: lftools_uv-0.1.2.tar.gz
- Upload date:
- Size: 181.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8b439c3324a220470dbf88d805e50584f6b0ac04e9b125973f05e5768bd974a
|
|
| MD5 |
5faf3b3bcafd2e09723926fd5867bc84
|
|
| BLAKE2b-256 |
2453e4b63d578d409d7aa0e7305ebc6da0e075f0c06560e3d48d04feff0831bd
|
Provenance
The following attestation bundles were made for lftools_uv-0.1.2.tar.gz:
Publisher:
build-test-release.yaml on modeseven-lfit/lftools-uv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lftools_uv-0.1.2.tar.gz -
Subject digest:
a8b439c3324a220470dbf88d805e50584f6b0ac04e9b125973f05e5768bd974a - Sigstore transparency entry: 511550815
- Sigstore integration time:
-
Permalink:
modeseven-lfit/lftools-uv@86a556637f9510e3e805f61b58f49820e26cbfa2 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/modeseven-lfit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-test-release.yaml@86a556637f9510e3e805f61b58f49820e26cbfa2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lftools_uv-0.1.2-py3-none-any.whl.
File metadata
- Download URL: lftools_uv-0.1.2-py3-none-any.whl
- Upload date:
- Size: 195.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82c9ecdc8a87231f08cf29fc28f62fad29919e42c05a93cd95f11afb057cb934
|
|
| MD5 |
40ff23255597a7e911d940d4db69af16
|
|
| BLAKE2b-256 |
bb4c6c3ebcaf3093a6f310d0f9970abdc27f89292bae386ac2cfacb465cb5316
|
Provenance
The following attestation bundles were made for lftools_uv-0.1.2-py3-none-any.whl:
Publisher:
build-test-release.yaml on modeseven-lfit/lftools-uv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lftools_uv-0.1.2-py3-none-any.whl -
Subject digest:
82c9ecdc8a87231f08cf29fc28f62fad29919e42c05a93cd95f11afb057cb934 - Sigstore transparency entry: 511550818
- Sigstore integration time:
-
Permalink:
modeseven-lfit/lftools-uv@86a556637f9510e3e805f61b58f49820e26cbfa2 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/modeseven-lfit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-test-release.yaml@86a556637f9510e3e805f61b58f49820e26cbfa2 -
Trigger Event:
push
-
Statement type: