Skip to content

Commit

Permalink
uv + uv.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
fabi1cazenave committed Nov 26, 2024
1 parent 404164a commit eaefe40
Show file tree
Hide file tree
Showing 3 changed files with 1,005 additions and 19 deletions.
33 changes: 18 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,32 @@ PYTHON3?=python3
all: format lint test

dev: ## Install a development environment
$(PYTHON3) -m pip install --user --upgrade -e .[dev]
# $(PYTHON3) -m pip install --user --upgrade build
# $(PYTHON3) -m pip install --user --upgrade twine wheel
# $(PYTHON3) -m pip install --user --upgrade -e .[dev]
uv pip install --upgrade -e .[dev]

format: ## Format sources
ruff format kalamine
ruff check --fix kalamine
uv run ruff format kalamine
uv run ruff check --fix kalamine

lint: ## Lint sources
ruff format --check kalamine
ruff check kalamine
mypy kalamine
uv run ruff format --check kalamine
uv run ruff check kalamine
uv run mypy kalamine

test: ## Run tests
$(PYTHON3) -m kalamine.cli guide > docs/README.md
$(PYTHON3) -m kalamine.cli build layouts/*.toml
$(PYTHON3) -m pytest
# $(PYTHON3) -m kalamine.cli guide > docs/README.md
# $(PYTHON3) -m kalamine.cli build layouts/*.toml
# $(PYTHON3) -m pytest
uv run kalamine guide > docs/README.md
uv run kalamine build layouts/*.toml
uv run pytest

publish: test ## Publish package
rm -rf dist/*
$(PYTHON3) -m build
twine check dist/*
twine upload dist/*
rm -rf dist
# $(PYTHON3) -m build
uv build
uv run twine check dist/*
uv run twine upload dist/*

clean: ## Clean sources
rm -rf build
Expand Down
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ name = "kalamine"
version = "0.38"
description = "a cross-platform Keyboard Layout Maker"
readme = "README.rst"

authors = [{ name = "Fabien Cazenave", email = "[email protected]" }]
license = { text = "MIT License" }

Expand All @@ -26,7 +25,7 @@ classifiers = [

requires-python = ">= 3.8"
dependencies = [
"click",
"click>=8.0",
"livereload",
"pyyaml",
"tomli",
Expand All @@ -35,11 +34,14 @@ dependencies = [

[project.optional-dependencies]
dev = [
"ruff",
"uv",
"pytest",
"lxml",
"mypy",
"mypy>=1.13.0",
"ruff>=0.8.0",
"types-click>=7.1.8",
"types-PyYAML",
"twine>=5.1.1",
]

[project.urls]
Expand Down
Loading

0 comments on commit eaefe40

Please sign in to comment.