Skip to content

Commit

Permalink
Upgraded pydantic to v2 to make it compatible with focus-converter.
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Mittal <varunmittal91@gmail.com>
  • Loading branch information
varunmittal91 committed Oct 19, 2023
1 parent e0157b2 commit 946b54b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: |
find -type l -exec bash -c 'ln -f "$(readlink -m "$0")" "$0"' {} \;
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion focus_validator/config_objects/common.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum
from typing import List, Literal

from pydantic import BaseModel
from pydantic.v1 import BaseModel


class AllowNullsCheck(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion focus_validator/config_objects/override.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import List

import yaml
from pydantic import BaseModel
from pydantic.v1 import BaseModel


class Override(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion focus_validator/config_objects/rule.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional, Union

import yaml
from pydantic import BaseModel, root_validator
from pydantic.v1 import BaseModel, root_validator

from focus_validator.config_objects.common import (
SIMPLE_CHECKS,
Expand Down
17 changes: 11 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@ version = "0.5.0"
description = "FOCUS spec validator."
authors = []
readme = "README.md"
packages = [{include = "focus_validator"}]
packages = [{ include = "focus_validator" }]
include = [
{ path = "focus_validator/rules/version_sets/0.5/*", format = ["sdist", "wheel"] }
]

[tool.poetry.dependencies]
python = "^3.8.1"
pandas = "^1"
pandas = "^2"
tabulate = "*"
pyarrow = "*"
pydantic = "^1"
pydantic = "^2"
python-magic = "*"
pyyaml = "*"
requests = "*"
pandera = "^0.16"
# pandera next release supports pydantic, need to revert back to once available
pandera = { git = "https://github.com/unionai-oss/pandera", branch = "main" }

[tool.poetry.group.dev.dependencies]
black = {extras = ["d"], version = "^23.7.0"}
black = { extras = ["d"], version = "^23.7.0" }
polyfactory = "^2.7.0"
pytest = "^7.4.0"
pytest-cov = "^4.1.0"
Expand All @@ -28,7 +32,8 @@ types-tabulate = "^0.9.0.3"
pandas-stubs = "^2.0.2.230605"
types-pyyaml = "^6.0.12.11"
types-requests = "^2.31.0.2"
pandera = {extras = ["mypy"], version = "^0.16.1"}
# pandera next release supports pydantic, need to revert back to once available
pandera = { extras = ["mypy"], git = "https://github.com/unionai-oss/pandera", branch = "main" }
isort = "^5.12.0"
flake8 = "^6.1.0"
pre-commit = "^3.3.3"
Expand Down

0 comments on commit 946b54b

Please sign in to comment.