Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
berislavlopac committed Feb 6, 2023
1 parent 74f7206 commit c6a7efe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ Pipfile.lock
poetry.lock
pdm.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
# PEP 582; used by e.g. pyflow and PDM
__pypackages__/
.pdm.toml

# Celery stuff
celerybeat-schedule
Expand Down
1 change: 1 addition & 0 deletions .semaphore/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ blocks:
jobs:
- name: Collect package details and create GitHub release
commands:
- python -m pdm config python.use_venv false
- RELEASE_VERSION=$(python -m pdm show --version)
- 'RELEASE_NOTES_FILE="release-notes/${RELEASE_VERSION}.md"'
- 'if [ ! -f "$RELEASE_NOTES_FILE" ]; then echo "The release notes file \"${RELEASE_NOTES_FILE}\" does not exist."; exit 1; fi'
Expand Down
4 changes: 2 additions & 2 deletions momoa/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def serialize(self):
"""Validates data and serializes it into JSON-ready format."""
return _serialize_schema_value(self._instance)

@staticmethod
@staticmethod # pragma: no mutate
def make_model(schema_class: meta.ObjectMeta) -> Type[Model]:
"""
Constructs a Model subclass based on the class derived from JSONSchema.
Expand All @@ -93,7 +93,7 @@ def make_model(schema_class: meta.ObjectMeta) -> Type[Model]:
return cast(Type[Model], type(name, (Model,), {"_schema_class": schema_class}))


ModelFactory = Callable[[meta.ObjectMeta], Type[Model]]
ModelFactory = Callable[[meta.ObjectMeta], Type[Model]] # pragma: no mutate


def _serialize_schema_value(value: Any) -> Any:
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "momoa"
version = "0.1.2"
version = "0.2.0"
description = "A library for definition, validation and serialisation of Python objects based on JSONSchema specifications."
readme = "README.md"
license = {text = "MIT"}
Expand Down Expand Up @@ -32,7 +32,6 @@ test = [
"mutmut>=2.4.3",
"tox>=3.28.0",
"tox-pdm>=0.6.1",
"hypothesis-jsonschema>=0.22.0",
]
checks = [
"black>=22.12.0",
Expand Down
5 changes: 5 additions & 0 deletions release-notes/0.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* support custom model factory
* dev environment improvements:
* use `ruff` instead of `pylint`
* use `pdm` instead of `poetry`
* improve tests using `mutmut`

0 comments on commit c6a7efe

Please sign in to comment.