Skip to content

LizardByte/lizardbyte-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
LizardByte icon

lizardbyte-common

Common helper scripts and repository tooling for LizardByte projects

CI Codecov SonarCloud

Overview

This repository contains shared helper scripts and repository-level tooling used across LizardByte projects.

The current tooling includes Python-managed helpers and reusable GitHub workflows:

  • scripts/update_clang_format.py runs clang-format across supported source directories.
  • scripts/localize.py updates gettext and Babel locale files.
  • .github/workflows/localize.yml runs the locale helper from GitHub Actions and opens localization update pull requests.

Python Tooling

Install uv and sync the locked tool environment:

uv sync --locked

Run the clang-format helper:

uv run --locked --only-group c lb-update-clang-format

Run gettext extraction:

uv run --locked --only-group locale lb-localize --extract

Consuming Projects

Projects with a pyproject.toml can use this repository as a local path dependency. For a submodule at third-party/lizardbyte-common, add the dependency and source to the consuming project's pyproject.toml:

[project]
dependencies = [
    "lizardbyte-common[c]",
]

[tool.uv.sources]
lizardbyte-common = { path = "third-party/lizardbyte-common" }

Then sync and run the installed commands from the consuming project root:

uv sync --python 3.14
uv run lb-update-clang-format
uv run lb-localize --extract

Projects without a pyproject.toml can still create a .venv in the consuming project root and install the local checkout into it:

uv venv --python 3.14
uv pip install --editable "third-party/lizardbyte-common[c]"

Then run the commands from the consuming project root:

lb-update-clang-format
lb-localize --extract

Workflows

Reusable GitHub workflows live under .github/workflows/.

  • localize.yml extracts gettext strings with the shared locale helper and can open a localization update pull request.
name: localize
permissions: {}

on:
  push:
    branches:
      - master
    paths:
      - '.github/workflows/localize.yml'
      - 'src/**'
      - 'locale/sunshine.po'
  workflow_dispatch:

jobs:
  localize:
    name: Update Localization
    permissions:
      contents: read
    uses: LizardByte/lizardbyte-common/.github/workflows/localize.yml@master
    secrets:
      GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

Tests

Run the pytest suite:

uv run --locked --only-group test-python pytest

About

Common library and helpers for LizardByte projects.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

Generated from LizardByte/template-base