sync version between manifests

add pyproject-fmt to pre-commit config
This commit is contained in:
2026-09-15 08:24:26 +01:00
parent 8a3647fcb6
commit 0ff628a902
5 changed files with 39 additions and 24 deletions
+5
View File
@@ -6,3 +6,8 @@ repos:
entry: pixi run sync
language: system
stages: [pre-commit]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 'v2.29.4'
hooks:
- id: pyproject-fmt
Generated
+1 -1
View File
@@ -261,7 +261,7 @@ packages:
timestamp: 1780853175566
- conda: .
name: bible
version: 0.1.0
version: 0.2.0
build: pyh4616a5c_0
subdir: noarch
variants:
+2 -4
View File
@@ -2,6 +2,8 @@
channels = ["https://prefix.dev/conda-forge"]
platforms = ["win-64", "linux-64", "osx-arm64", "osx-64"]
preview = ["pixi-build"]
name = "bible"
version = "0.2.0"
[tasks]
cli = "bible-cli"
@@ -16,10 +18,6 @@ ruff = ">=0.16.7,<0.17"
[dependencies.bible]
path = "."
[package]
name = "bible"
version = "0.1.0"
[package.build.backend]
name = "pixi-build-python"
version = "0.4.*"
+22 -17
View File
@@ -1,21 +1,26 @@
[build-system]
build-backend = "hatchling.build"
requires = [ "hatchling" ]
[project]
name = "bible"
version = "0.1.0"
version = "0.2.0"
requires-python = ">=3.11"
dependencies = [
"textual>=8.0.0",
"niquests>=3.21.1,<4",
"clypi>=1.9.1,<2",
"pydantic-settings>=2.15.0,<3",
"rich>=15.0.0,<16",
"loguru>=0.7.3,<0.8",
"beautifulsoup4>=4.15.0,<5",
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
[project.scripts]
bible-tui = "bible.tui.tui:main"
bible-cli = "bible.cli.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
dependencies = [
"beautifulsoup4>=4.15,<5",
"clypi>=1.9.1,<2",
"loguru>=0.7.3,<0.8",
"niquests>=3.21.1,<4",
"pydantic-settings>=2.15,<3",
"rich>=15,<16",
"textual>=8",
]
scripts.bible-cli = "bible.cli.cli:main"
scripts.bible-tui = "bible.tui.tui:main"
+9 -2
View File
@@ -12,7 +12,13 @@ pixi = tomllib.loads(pixi_path.read_text())
pyproject = tomllib.loads(pyproject_path.read_text())
# --- Sync version ---
pixi_version = pixi['package']['version']
if 'workspace' in pixi and 'version' in pixi['workspace']:
pixi_version = pixi['workspace']['version']
elif 'package' in pixi and 'version' in pixi['package']:
pixi_version = pixi['package']['version']
else:
raise KeyError('No version found in pixi.toml under [workspace] or [package].')
pyproject['project']['version'] = pixi_version
# --- Sync only [package.run-dependencies] ---
@@ -26,5 +32,6 @@ pixi_path.write_text(tomlkit.dumps(pixi))
pyproject_path.write_text(tomlkit.dumps(pyproject))
print(
f'Synced version {pixi_version} and {len(runtime_deps)} runtime dependencies from [package.run-dependencies].'
f'Synced version {pixi_version} and {len(runtime_deps)} runtime dependencies '
'from [package.run-dependencies].'
)