Repository navigation
Project Configuration
kurokyuu edited this page Nov 22, 2026
·
3 revisions
Scripts/project.toml: everything a project differs by, block by block.
Everything a project differs by, and nothing else. A script that needs a value with no entry refuses and names the key rather than guessing.
name = "MediaLibrary"
env_prefix = "MLIB" # MLIB_DB_HOST, MLIB_CONNECTION, MLIB_LOG_DIR
[dotnet] # dotnet.py
solution = "MediaLibrary.sln"
test_project = "..." # `dotnet.py test`
ef_project = "..." # `dotnet.py ef`
startup_project = "..."
logging_baseline = 0
fatal_warnings = ["CS9057"] # turned into errors by `verify`'s own build
[verify] # optional: the project's own checks, run by `dotnet.py verify` after the shared ones
checks = ["areas.py"] # scripts under Scripts/, run from the repository root; a non-zero exit fails verify
[dotnet.build_properties] # optional: -p:Key=Value on every build, `~` expanded - what a
AndroidSdkDirectory = "~/Android/Sdk" # build needs from this machine (a MAUI project's SDK and JDK)
[rust] # rust.py
binary = "av1-convert"
install_root = "~/.local"
[rust.service_menu] # optional: menus `install` generates (format: servicemenu.py)
definitions = ["dolphin/av1-convert.menu.toml"] # each becomes <name>.desktop
directory = "~/.local/share/kio/servicemenus"
[cpp] # cpp.py
binary = "mydialog"
build_dir = "build" # relative to the repository
build_type = "RelWithDebInfo"
install_root = "~/.local" # becomes CMAKE_INSTALL_PREFIX
# generator = "Ninja" # only used on a fresh cache; Ninja when it is installed
# configure_args = ["-DWITH_X=ON"]
# binary_path = "bin/mydialog" # when `run` cannot find it under build/
# sanitize = true # a reader of files from outside: `verify` also runs the tests under ASan + UBSan
# sanitize_suppressions = "Scripts/lsan.supp" # leaks that are not the project's (a Qt or KDE library's own)
[cpp.service_menu] # same shape as rust's
[cpp.fuzz] # `cpp.py fuzz`: libFuzzer over CMake targets the project defines
# targets = ["fuzz_reader"] # CMake target names
# option = "BUILD_FUZZING" # the CMake option that adds them (default BUILD_FUZZING)
# seeds_dir = "fuzz/seeds" # read-only seeds, one folder per target; what the fuzzer finds stays in build/fuzz
[rpm] # rpm.py: a package for an ssh-reachable RPM repository, any language (docstring has every key)
name = "gputaskman"
summary = "..."
license = "MIT"
version_file = "Cargo.toml" # Cargo.toml, CMakeLists.txt or a .csproj/.props
build = ["cargo build --release"] # shell commands; {stage} is the tree laid out as on the target system
files = { "target/release/gputaskman" = "/usr/bin/gputaskman" }
requires = ["kf6-kirigami"] # what rpmbuild cannot see itself: QML modules, a .NET runtime
[nuget] # a library that publishes itself: `dotnet.py publish` packs every project with a <PackageId>, one version for all
feed = "https://api.nuget.org/v3/index.json" # the official feed; versions come from its flat container
api_key_file = "~/.config/nuget-org-api-key" # default ~/.config/nuget-api-key
[nuget.private] # optional: `dotnet.py publish --private`, same keys
feed = "https://nuget.example.invalid/v3/index.json"
[database] # db.py, and the db-init pair
host = "..."
enum_columns = [["schema", "Table", "Column"]]
[db_init] # gen_db_init_delta.py, verify_db_init.py
schema_file = "deploy/db-init/schema.sql"
model_script = "model_create_script" # optional: repo.py push compares schema.sql with the model's CREATE script
watched_paths = ["Project.Database."] # ... when the branch touches one of these (CI would fail otherwise)
app_role_script = "deploy/app-role.sql" # optional: `dotnet.py verify` says when schema.sql gains a schema and this must run again
[logs] # logs.py
app_project = "MediaLibrary"
[browser_extension] # browser_extension.py; both keys optional
directory = "BrowserExtension" # holds manifest.json
artifacts = "web-ext-artifacts" # under it; the signed .xpi lands here
[android] # MAUI: `dotnet.py android`, `logs.py --android` (see android.py)
project = "MediaLibrary.App"
device = "192.168.1.50:37123" # adb over WLAN, connected on demand; MLIB_ANDROID_DEVICE overrides
[android.signing] # --release only; passwords stay in files, not here
keystore = "~/.config/mlib-signing/mlib.keystore"
alias = "mlib"
store_password_file = "~/.config/mlib-signing/password"
key_password_file = "~/.config/mlib-signing/key-password"
# C++/Qt instead of MAUI: `cpp.py android` reads the same block, with no `project` (there is no .csproj)
# qt = "~/Qt/6.11.2/android_arm64_v8a" # required: the Qt for Android prefix; must match the host Qt
# application_id = "net.example.app" # required: what `install` and `run` address
# abi = "arm64-v8a" # optional, as are the rest (api = 28 is the minimum API level):
# qt_host_path = "/usr" # the host Qt for the cross build; qt_host_cmake_dir is found under lib64
# prefix = "~/CraftRoot" # where KF6 etc. built for Android live (CMAKE_PREFIX_PATH, ECM roots)
# sdk, ndk, build_type, configure_args # sdk/ndk default to the environment, then ~/Android/Sdk and its newest NDK
[localization] # .NET: gen_resx.py, translations.py
resources_project = "..."
satellite_languages = ["de", "fr"]
[i18n] # Qt/KDE or Rust: i18n.py
domain = "mydialog" # the .pot/.po basename, and setApplicationDomain()
languages = ["de"] # without the source language: the i18n() argument is English
flavour = "kde" # optional: "rust" reads .rs with xgettext's Rust parser
sources = ["src"] # optional
bugs_address = "..." # optional, into the .pot header
[spdx] # spdx.py
holder = "The MediaLibrary Contributors"
licence = "AGPL-3.0-or-later"
[deploy] # deploy.py
registry = "registry.example.invalid"
ssh_host = "deploy-host"
unit = "medialibrary"
# A second server: `deploy.py deploy --target production`. Every key but the registry may be overridden;
# `tunnel = "5000:localhost:5000"` opens an SSH tunnel (ssh -L) for the push and the tag listing, and
# makes the push and the pull on the server skip TLS verification, as the registry is plain HTTP on loopback.
# [deploy.targets.production]
# registry = "localhost:5000"
# ssh_host = "production"
# tunnel = "5000:localhost:5000"
#
# A copy of the application next to production, as a podman-compose stack instead of a unit:
# `tag` is the floating tag the server tracks (default `latest`), so a build for it never moves what production
# restarts from. `compose` is the directory on the server, relative to the ssh home, that holds `deploy/compose.yaml`
# (the stack's project name is that directory's name); `service` is the one service this target's image is.
# `deploy` pushes, copies deploy/compose.yaml, deploy/db-init and the routine dump there and recreates the service;
# `deploy.py reset --target dev` removes the stack and every volume and starts it empty; `recreate` builds the stack
# again and keeps the volumes, which is what a new published port needs (the containers share one pod, and a port
# belongs to the pod). The `.env` with the passwords belongs to the server and is never written, and neither is a
# `compose.override.yaml` there, which every compose call names with `-f` when it exists.
# [deploy.targets.dev]
# tag = "dev"
# compose = "services/medialibrary-dev"
# service = "app"
# container = "medialibrary-dev_app_1"
[repo]
main_branch = "master"
ci = true # false: no workflows; `repo.py ci` says so at once instead of polling for a run
merge_strategy = "merge" # what `repo.py pr-merge` uses without --strategy: merge | squash | rebase
# The project's own labels, created by `repo.py init` and `repo.py labels` next to the shared ones
# (dependencies, epic, parked, ci) - one block per label, the areas of this project.
# [[repo.labels]]
# name = "area:ui"
# color = "d4c5f9"
# description = "QML pages and the controller"project.py resolves it: the shim names the repository through DEVSCRIPTS_PROJECT, and a script
run straight out of this checkout searches upwards from the working directory instead.