Skip to content

Commit

Permalink
work to upgrade to latest pydantic
Browse files Browse the repository at this point in the history
  • Loading branch information
ademariag committed Mar 29, 2024
1 parent f515632 commit 979ce92
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 8 deletions.
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
all: clean package

.PHONY: test
test:
@echo ----- Running python tests -----
python3 -m unittest discover

.PHONY: test_coverage
test_coverage:
@echo ----- Testing code coverage -----
coverage run --source=kadet -m unittest discover
coverage report --fail-under=65 -m

.PHONY: test_formatting
test_formatting:
@echo ----- Testing code formatting -----
black --check .
@echo

.PHONY: format_codestyle
format_codestyle:
which black || echo "Install black with pip3 install --user black"
# ignores line length and reclass
black .
@echo
4 changes: 2 additions & 2 deletions kadet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import hashlib
import json
from typing import Any, Annotated
from typing import Any, Annotated
import yaml
from box import Box, BoxList
from pydantic import BaseModel as PydanticBaseModel, Field
Expand Down Expand Up @@ -255,4 +255,4 @@ class Config:
arbitrary_types_allowed = True # allow all types e.g. BaseObj
copy_on_model_validation = False # performance?
underscore_attrs_are_private = True
extra = 'allow'
extra = "allow"
148 changes: 147 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries :: Python Modules",
]

Expand All @@ -26,7 +24,11 @@ PyYAML = ">=5.3.1"
typeguard = ">=3.0.0"
python-box = "6.0.2"
pydantic = ">=2.0"
pytest = ">=8.0"

[tool.poetry.group.dev.dependencies]
flake8 = "^7.0.0"
pytest = "^8.1.1"
black = "^24.3.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit 979ce92

Please sign in to comment.