Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main

jobs:
docs:
deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -38,4 +38,4 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
uv publish -t "$PYPI_TOKEN" --managed-python
uv publish -t "$PYPI_TOKEN" --managed-python --check-url https://pypi.org/simple
42 changes: 42 additions & 0 deletions bin/bump-version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env python3
import tomllib
import subprocess

import tomli_w


def bump_version(version: str) -> str:
splitted_version = version.split(".")
bumped_version = int(splitted_version[-1]) + 1
splitted_version[-1] = str(bumped_version)
return ".".join(splitted_version)


def main() -> None:
with open("uv.lock", "rb") as fd:
data = tomllib.load(fd)

package = next(p for p in data["package"] if p["name"] == "edit-python-pe")

version = bump_version(package["version"])

package["version"] = version

with open("uv.lock", "wb") as fd:
tomli_w.dump(data, fd)

with open("pyproject.toml", "rb") as fd:
data = tomllib.load(fd)

data["project"]["version"] = package["version"]

with open("pyproject.toml", "wb") as fd:
tomli_w.dump(data, fd)

subprocess.run(["git", "add", "uv.lock"])
subprocess.run(["git", "add", "pyproject.toml"])
subprocess.run(["git", "commit", "-m", f"bump version to {version}"])


if __name__ == "__main__":
main()
37 changes: 17 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
[project]
name = "edit-python-pe"
version = "0.2.1"
version = "0.2.2"
description = "Allows member and project profile editing onto python.pe git repository"
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Jean-Pierre Chauvel", email = "jean.p.chauvel@gmail.com" }
{ name = "Jean-Pierre Chauvel", email = "jean.p.chauvel@gmail.com" },
]
requires-python = ">=3.13"
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 4 - Beta",

# Indicate who your project is intended for
"Intended Audience :: Developers",
"Topic :: Documentation :: Sphinx",

# Specify the Python versions you support here.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Documentation :: Sphinx",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
]
module = "edit_python_pe"
dependencies = [
Expand All @@ -33,6 +24,9 @@ dependencies = [
"babel==2.17.0",
]

[project.license]
file = "LICENSE"

[project.urls]
Homepage = "http://github.com/pythonpe/edit-python.pe"
Documentation = "https://github.com/pythonpe/edit-python.pe/blob/main/README.md"
Expand All @@ -43,12 +37,17 @@ Issues = "https://github.com/pythonpe/edit-python.pe/issues"
edit-python-pe = "edit_python_pe.main:main"

[build-system]
requires = ["hatchling"]
requires = [
"hatchling",
]
build-backend = "hatchling.build"

[tool.hatch.version]
path = "src/edit_python_pe/__about__.py"

[tool.black]
line-length = 79

[dependency-groups]
dev = [
"black>=25.1.0",
Expand All @@ -58,7 +57,5 @@ dev = [
"pytest>=8.4.1",
"pytest-cov>=6.2.1",
"textual-dev==1.7.0",
"tomli-w>=1.2.0",
]

[tool.black]
line-length = 79
Loading