Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commitizen #8

Merged
merged 5 commits into from
Nov 6, 2023
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
8 changes: 4 additions & 4 deletions CHANGES.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Changelog

## 0.1.0
## v0.2.0

### Features
- Initial
- Support `additionalProperties` (`dict[str, Model]`)

## 0.2.0
## v0.1.0

### Features
- Support `additionalProperties` (`dict[str, Model]`)
- Initial
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ all:
@echo "make test-docker-linux - Run tests with linux docker image"
@echo "make build - Build wheel"
@echo "make publish - Publish wheel to PyPI"
@echo "make release - Update version and changelog"
@exit 0

clean:
Expand Down Expand Up @@ -65,6 +66,13 @@ test-readme-tox:
test-docker-linux:
docker run --rm -v $(shell pwd):/mnt -w /mnt --name=$(PROJECT_NAME)_test $(PYTHON_IMAGE) tox

release:
@if [[ -z "$(version)" ]]; then \
echo "Must run the command with the version parameter: make release version=<version>"; \
else \
poetry run cz bump --changelog --files-only $(version); \
fi

build:
poetry build

Expand Down
21 changes: 12 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pysimdjson-schemaful"
version = "0.0.0"
version = "0.2.0"
description = "Schema-aware pysimdjson loader for efficient parsing of large excessive inputs."
authors = ["Tzoiker <[email protected]>"]
repository = "https://github.com/tzoiker/pysimdjson-schemaful"
Expand Down Expand Up @@ -31,6 +31,16 @@ packages = [
{include = "simdjson_schemaful"}
]

[tool.commitizen]
version_provider = "poetry"
version_scheme = "pep440"
tag_format = "v$version"
changelog_incremental = true
version_files = [
"simdjson_schemaful/__version__.py",
]


[[tool.poetry.source]]
name = "pypi"
priority = "primary"
Expand All @@ -51,6 +61,7 @@ pydantic = ["pydantic"]
[tool.poetry.group.dev.dependencies]
attrs = "^23.1.0"
black = "^23.10.0"
commitizen = "^3.12.0"
markdown-pytest = "^0.3.0"
mypy = "^1.0"
orjson = "^3.9.9"
Expand All @@ -61,14 +72,6 @@ pytest-cov = "^4.1"
ruff = "^0.0.291"
tox = "^4.0"

[tool.poem-plugins.version]
provider = "git"
update_pyproject = true

[tool.poem-plugins.version.git]
version_prefix = "v"
format = "short"

[tool.mypy]
plugins = "pydantic.mypy"
allow_subclassing_any = true
Expand Down
3 changes: 2 additions & 1 deletion simdjson_schemaful/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .__version__ import __version__
from .parser import loads

__all__ = ("loads",)
__all__ = ("loads", "__version__")
1 change: 1 addition & 0 deletions simdjson_schemaful/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.2.0"