Compare commits

...

3 Commits

Author SHA1 Message Date
estebanthi
8d6dc8815d Updated update validators 2025-10-20 12:19:39 +02:00
Andrew
781692796a chore(main): release 0.4.4 (#704) 2025-04-16 09:05:23 -05:00
Andrew
694c51731c Update pyproject.toml 2025-04-16 09:02:20 -05:00
4 changed files with 74 additions and 13 deletions

View File

@@ -1,5 +1,66 @@
# Changelog # Changelog
## [0.4.4](https://github.com/andrewthetechie/py-healthchecks.io/compare/v0.4.3...v0.4.4) (2025-04-16)
### Dependencies
* bump certifi from 2024.6.2 to 2024.7.4 in the pip group ([#707](https://github.com/andrewthetechie/py-healthchecks.io/issues/707)) ([92b31dc](https://github.com/andrewthetechie/py-healthchecks.io/commit/92b31dcb3d8b31521fc98187bc0e2f12d41e0f4a))
* bump coverage from 7.5.4 to 7.6.0 ([#711](https://github.com/andrewthetechie/py-healthchecks.io/issues/711)) ([90e150f](https://github.com/andrewthetechie/py-healthchecks.io/commit/90e150f049b7fe25a84c178d0939a0a78635d3a0))
* bump coverage from 7.6.0 to 7.6.1 ([#739](https://github.com/andrewthetechie/py-healthchecks.io/issues/739)) ([d9d67f2](https://github.com/andrewthetechie/py-healthchecks.io/commit/d9d67f2e0bbf9c6917ee95f3a36c9baaf26af5cf))
* bump croniter from 2.0.5 to 2.0.7 ([#714](https://github.com/andrewthetechie/py-healthchecks.io/issues/714)) ([e88be9e](https://github.com/andrewthetechie/py-healthchecks.io/commit/e88be9e88f2b53005c8f8bcf85c667f5fc10e9a7))
* bump croniter from 2.0.7 to 3.0.3 ([#734](https://github.com/andrewthetechie/py-healthchecks.io/issues/734)) ([e1a81aa](https://github.com/andrewthetechie/py-healthchecks.io/commit/e1a81aa145fc6b9c6105d6634bc8bd4111e48f01))
* bump furo from 2024.5.6 to 2024.7.18 ([#721](https://github.com/andrewthetechie/py-healthchecks.io/issues/721)) ([86fd192](https://github.com/andrewthetechie/py-healthchecks.io/commit/86fd192f95128aac66e0087e22a7fe93030a0bbe))
* bump furo from 2024.5.6 to 2024.7.18 ([#725](https://github.com/andrewthetechie/py-healthchecks.io/issues/725)) ([14fb13b](https://github.com/andrewthetechie/py-healthchecks.io/commit/14fb13b075a20cfaafd6f29b4d477b687369a62f))
* bump furo from 2024.7.18 to 2024.8.6 ([#742](https://github.com/andrewthetechie/py-healthchecks.io/issues/742)) ([c4fa6e7](https://github.com/andrewthetechie/py-healthchecks.io/commit/c4fa6e7ac37bda53ffe2f18fb1162c1d1bf48602))
* bump furo from 2024.7.18 to 2024.8.6 ([#743](https://github.com/andrewthetechie/py-healthchecks.io/issues/743)) ([c8aba10](https://github.com/andrewthetechie/py-healthchecks.io/commit/c8aba10262d2f75347d7841dfddfe7193978f991))
* bump httpx from 0.27.0 to 0.27.2 ([#753](https://github.com/andrewthetechie/py-healthchecks.io/issues/753)) ([1aaa054](https://github.com/andrewthetechie/py-healthchecks.io/commit/1aaa0549f2c7222c52d9c5ec4cd21dd845eb553d))
* bump mypy from 1.10.1 to 1.11.0 ([#724](https://github.com/andrewthetechie/py-healthchecks.io/issues/724)) ([b244802](https://github.com/andrewthetechie/py-healthchecks.io/commit/b2448021bea1024aeb55b029bb8a41670df64c4e))
* bump mypy from 1.11.0 to 1.11.1 ([#736](https://github.com/andrewthetechie/py-healthchecks.io/issues/736)) ([4f0cd0b](https://github.com/andrewthetechie/py-healthchecks.io/commit/4f0cd0b56e47352b39f174b047167bf50e59808d))
* bump mypy from 1.11.1 to 1.11.2 ([#752](https://github.com/andrewthetechie/py-healthchecks.io/issues/752)) ([9c2cde0](https://github.com/andrewthetechie/py-healthchecks.io/commit/9c2cde0159b566edc2c21cf3da297fe84f637031))
* bump pydantic from 2.8.0 to 2.8.1 ([#703](https://github.com/andrewthetechie/py-healthchecks.io/issues/703)) ([3d49ae3](https://github.com/andrewthetechie/py-healthchecks.io/commit/3d49ae3b997525ca62f0db68fe4d7af946759a52))
* bump pydantic from 2.8.1 to 2.8.2 ([#705](https://github.com/andrewthetechie/py-healthchecks.io/issues/705)) ([af20f3b](https://github.com/andrewthetechie/py-healthchecks.io/commit/af20f3bc11f9278b1f914e431c201cd88372f6a5))
* bump pydantic from 2.8.2 to 2.9.0 ([#761](https://github.com/andrewthetechie/py-healthchecks.io/issues/761)) ([eecca22](https://github.com/andrewthetechie/py-healthchecks.io/commit/eecca2265a7fce5615d0d954604e547d0fe7617b))
* bump pydantic from 2.9.0 to 2.9.1 ([#763](https://github.com/andrewthetechie/py-healthchecks.io/issues/763)) ([3a7c763](https://github.com/andrewthetechie/py-healthchecks.io/commit/3a7c763157a81f7b7d9841efa235e02f1cf0ef46))
* bump pydantic from 2.9.1 to 2.9.2 ([#769](https://github.com/andrewthetechie/py-healthchecks.io/issues/769)) ([5adb0e1](https://github.com/andrewthetechie/py-healthchecks.io/commit/5adb0e117361127c412063e15b90a98587d56772))
* bump pytest-asyncio from 0.23.7 to 0.23.8 ([#717](https://github.com/andrewthetechie/py-healthchecks.io/issues/717)) ([3ca1d33](https://github.com/andrewthetechie/py-healthchecks.io/commit/3ca1d33d7c60083d943d9d6c0e9277bc98d419c2))
* bump ruff from 0.5.0 to 0.5.1 ([#709](https://github.com/andrewthetechie/py-healthchecks.io/issues/709)) ([277f7b5](https://github.com/andrewthetechie/py-healthchecks.io/commit/277f7b539540e3ae52aea59fd4236ce33c624c49))
* bump ruff from 0.5.1 to 0.5.2 ([#712](https://github.com/andrewthetechie/py-healthchecks.io/issues/712)) ([483ad53](https://github.com/andrewthetechie/py-healthchecks.io/commit/483ad538bc8a45384a1446a700deb5df40b20eb7))
* bump ruff from 0.5.2 to 0.5.3 ([#718](https://github.com/andrewthetechie/py-healthchecks.io/issues/718)) ([02c3739](https://github.com/andrewthetechie/py-healthchecks.io/commit/02c3739c3892d55919e1e029b63cfe65e4a5bd12))
* bump ruff from 0.5.3 to 0.5.4 ([#723](https://github.com/andrewthetechie/py-healthchecks.io/issues/723)) ([97b62b6](https://github.com/andrewthetechie/py-healthchecks.io/commit/97b62b600508a418e3a376a48773999af72fbc03))
* bump ruff from 0.5.4 to 0.5.5 ([#730](https://github.com/andrewthetechie/py-healthchecks.io/issues/730)) ([bf61009](https://github.com/andrewthetechie/py-healthchecks.io/commit/bf610095cbebe96a37b383a854c1a782f1881ccb))
* bump ruff from 0.5.5 to 0.5.6 ([#740](https://github.com/andrewthetechie/py-healthchecks.io/issues/740)) ([5113322](https://github.com/andrewthetechie/py-healthchecks.io/commit/5113322177cf13522ab920cef9f021ebe629b172))
* bump ruff from 0.5.6 to 0.5.7 ([#744](https://github.com/andrewthetechie/py-healthchecks.io/issues/744)) ([dd305ed](https://github.com/andrewthetechie/py-healthchecks.io/commit/dd305ed93f6a15ba06891176b00103f3b3e4a8c3))
* bump ruff from 0.5.7 to 0.6.0 ([#747](https://github.com/andrewthetechie/py-healthchecks.io/issues/747)) ([aadeceb](https://github.com/andrewthetechie/py-healthchecks.io/commit/aadeceb3277970f00f8137ed8a4b7cfbabee011d))
* bump ruff from 0.6.0 to 0.6.1 ([#748](https://github.com/andrewthetechie/py-healthchecks.io/issues/748)) ([10af98d](https://github.com/andrewthetechie/py-healthchecks.io/commit/10af98dcddc2b5fb031153fad4e68a1085805e43))
* bump ruff from 0.6.1 to 0.6.2 ([#751](https://github.com/andrewthetechie/py-healthchecks.io/issues/751)) ([7091a2a](https://github.com/andrewthetechie/py-healthchecks.io/commit/7091a2a1384b6c01622b370a9626788bb4e761b1))
* bump ruff from 0.6.2 to 0.6.3 ([#756](https://github.com/andrewthetechie/py-healthchecks.io/issues/756)) ([876741f](https://github.com/andrewthetechie/py-healthchecks.io/commit/876741fe16f78d7f60de56e4b3e81ae426a79464))
* bump ruff from 0.6.3 to 0.6.4 ([#760](https://github.com/andrewthetechie/py-healthchecks.io/issues/760)) ([2cfa474](https://github.com/andrewthetechie/py-healthchecks.io/commit/2cfa47409352015e3dfb8d9c7e6c88f0de28b878))
* bump ruff from 0.6.4 to 0.6.5 ([#766](https://github.com/andrewthetechie/py-healthchecks.io/issues/766)) ([2cfe5d1](https://github.com/andrewthetechie/py-healthchecks.io/commit/2cfe5d18f978e31ad154c458f318d674788a65cf))
* bump ruff from 0.6.5 to 0.6.7 ([#771](https://github.com/andrewthetechie/py-healthchecks.io/issues/771)) ([6bfa9cd](https://github.com/andrewthetechie/py-healthchecks.io/commit/6bfa9cd706d1271d8ecb0632418c6a82c51f4153))
* bump ruff from 0.6.7 to 0.6.8 ([#773](https://github.com/andrewthetechie/py-healthchecks.io/issues/773)) ([dfd12b7](https://github.com/andrewthetechie/py-healthchecks.io/commit/dfd12b788eb1c0fac394c46bd4345cb1ee79bccf))
* bump safety from 3.2.3 to 3.2.4 ([#706](https://github.com/andrewthetechie/py-healthchecks.io/issues/706)) ([8e3d977](https://github.com/andrewthetechie/py-healthchecks.io/commit/8e3d977abdf725714fd534c5ac05a20f92a5aee9))
* bump safety from 3.2.4 to 3.2.5 ([#745](https://github.com/andrewthetechie/py-healthchecks.io/issues/745)) ([305e72e](https://github.com/andrewthetechie/py-healthchecks.io/commit/305e72ead297423db8849392a5b307da6b11f85e))
* bump safety from 3.2.5 to 3.2.6 ([#750](https://github.com/andrewthetechie/py-healthchecks.io/issues/750)) ([5108b43](https://github.com/andrewthetechie/py-healthchecks.io/commit/5108b4317f373cc7f2b5d32b42df913e8040a790))
* bump safety from 3.2.6 to 3.2.7 ([#755](https://github.com/andrewthetechie/py-healthchecks.io/issues/755)) ([32c3044](https://github.com/andrewthetechie/py-healthchecks.io/commit/32c30445b9cc0435978efce186b7fe29aa0350b0))
* bump safety from 3.2.7 to 3.2.8 ([#775](https://github.com/andrewthetechie/py-healthchecks.io/issues/775)) ([a7a58b2](https://github.com/andrewthetechie/py-healthchecks.io/commit/a7a58b227b4069141ff36c36c4cf7906da23c7ac))
* bump types-croniter from 2.0.0.20240423 to 2.0.5.20240717 ([#716](https://github.com/andrewthetechie/py-healthchecks.io/issues/716)) ([ed43967](https://github.com/andrewthetechie/py-healthchecks.io/commit/ed439678011e940f27d8694348afa96666e42cc5))
* bump types-croniter from 2.0.5.20240717 to 3.0.3.20240731 ([#737](https://github.com/andrewthetechie/py-healthchecks.io/issues/737)) ([c4a73b1](https://github.com/andrewthetechie/py-healthchecks.io/commit/c4a73b1a570ad458e4d05ea3198b2e6fc6b633f5))
* bump types-pytz from 2024.1.0.20240417 to 2024.2.0.20240913 ([#767](https://github.com/andrewthetechie/py-healthchecks.io/issues/767)) ([e64dbf8](https://github.com/andrewthetechie/py-healthchecks.io/commit/e64dbf8dfd54546ac50cba40c0f3667ddac7d3b2))
* bump xdoctest from 1.1.5 to 1.1.6 ([#738](https://github.com/andrewthetechie/py-healthchecks.io/issues/738)) ([e7756fb](https://github.com/andrewthetechie/py-healthchecks.io/commit/e7756fbf283ba5f674fcf8dbb2b04f4acc721174))
* bump xdoctest from 1.1.6 to 1.2.0 ([#749](https://github.com/andrewthetechie/py-healthchecks.io/issues/749)) ([4f8bb6b](https://github.com/andrewthetechie/py-healthchecks.io/commit/4f8bb6b9a46912831863420556db76f66f46a272))
### Documentation
* bump sphinx from 7.3.7 to 7.4.4 in /docs ([#713](https://github.com/andrewthetechie/py-healthchecks.io/issues/713)) ([95b93e8](https://github.com/andrewthetechie/py-healthchecks.io/commit/95b93e857b41129310171f11eea3884918b15b02))
* bump sphinx from 7.4.4 to 7.4.5 in /docs ([#715](https://github.com/andrewthetechie/py-healthchecks.io/issues/715)) ([08bf505](https://github.com/andrewthetechie/py-healthchecks.io/commit/08bf505f70c2d096e46f3f5ac6c26249b4673bfa))
* bump sphinx from 7.4.5 to 7.4.6 in /docs ([#719](https://github.com/andrewthetechie/py-healthchecks.io/issues/719)) ([4de0f1a](https://github.com/andrewthetechie/py-healthchecks.io/commit/4de0f1ac2faedcb39be1fbf9fbf40b88ba6ab309))
* bump sphinx from 7.4.6 to 7.4.7 in /docs ([#726](https://github.com/andrewthetechie/py-healthchecks.io/issues/726)) ([7a3c8d0](https://github.com/andrewthetechie/py-healthchecks.io/commit/7a3c8d0a5616472bae35f408951034d4dc5ea80d))
* bump sphinx from 7.4.7 to 8.0.2 in /docs ([#735](https://github.com/andrewthetechie/py-healthchecks.io/issues/735)) ([37c780e](https://github.com/andrewthetechie/py-healthchecks.io/commit/37c780e865d30684ded5d6038802b5474eaa1211))
* bump sphinx from 8.0.2 to 8.1.0 in /docs ([#781](https://github.com/andrewthetechie/py-healthchecks.io/issues/781)) ([e4a42b5](https://github.com/andrewthetechie/py-healthchecks.io/commit/e4a42b5fba052259a22a7de62061cc20681d2a8e))
* bump sphinx from 8.1.0 to 8.1.3 in /docs ([#782](https://github.com/andrewthetechie/py-healthchecks.io/issues/782)) ([2d4b8f7](https://github.com/andrewthetechie/py-healthchecks.io/commit/2d4b8f77a1a55c303180b263aa8f38ae8874845b))
## [0.4.3](https://github.com/andrewthetechie/py-healthchecks.io/compare/v0.4.2...v0.4.3) (2024-07-03) ## [0.4.3](https://github.com/andrewthetechie/py-healthchecks.io/compare/v0.4.2...v0.4.3) (2024-07-03)

View File

@@ -1,13 +1,13 @@
[tool.poetry] [tool.poetry]
name = "healthchecks_io" name = "healthchecks_io"
version = "0.4.3" version = "0.4.4"
description = "A python client package for Healthchecks.io API" description = "A python client package for Healthchecks.io API"
authors = ["Andrew Herrington <andrew.the.techie@gmail.com>"] authors = ["Andrew Herrington <andrew.the.techie@gmail.com>"]
license = "MIT" license = "MIT"
readme = "README.rst" readme = "README.rst"
homepage = "https://github.com/andrewthetechie/py-healthchecks.io" homepage = "https://github.com/andrewthetechie/py-healthchecks.io"
repository = "https://github.com/andrewthetechie/py-healthchecks.io" repository = "https://github.com/andrewthetechie/py-healthchecks.io"
documentation = "https://py-healthchecks.io.readthedocs.io" documentation = "https://py-healthchecksio.readthedocs.io"
classifiers = [ classifiers = [
"Development Status :: 4 - Beta", "Development Status :: 4 - Beta",
"Intended Audience :: Developers", "Intended Audience :: Developers",

View File

@@ -1,7 +1,7 @@
"""Py Healthchecks.Io.""" """Py Healthchecks.Io."""
# set by poetry-dynamic-versioning # set by poetry-dynamic-versioning
__version__ = "0.4.3" # noqa: E402 __version__ = "0.4.4" # noqa: E402
from .client import AsyncClient # noqa: F401, E402 from .client import AsyncClient # noqa: F401, E402
from .client import Client # noqa: F401, E402 from .client import Client # noqa: F401, E402

View File

@@ -128,33 +128,33 @@ class CheckCreate(BaseModel):
@field_validator("schedule") @field_validator("schedule")
@classmethod @classmethod
def validate_schedule(cls, value: str) -> str: def validate_schedule(cls, value: str | None) -> str:
"""Validates that the schedule is a valid cron expression.""" """Validates that the schedule is a valid cron expression."""
if not croniter.is_valid(value): if value and not croniter.is_valid(value):
raise ValueError("Schedule is not a valid cron expression") raise ValueError("Schedule is not a valid cron expression")
return value return value
@field_validator("tz") @field_validator("tz")
@classmethod @classmethod
def validate_tz(cls, value: str) -> str: def validate_tz(cls, value: str | None) -> str:
"""Validates that the timezone is a valid timezone string.""" """Validates that the timezone is a valid timezone string."""
if value not in pytz.all_timezones: if value and value not in pytz.all_timezones:
raise ValueError("Tz is not a valid timezone") raise ValueError("Tz is not a valid timezone")
return value return value
@field_validator("methods") @field_validator("methods")
@classmethod @classmethod
def validate_methods(cls, value: str) -> str: def validate_methods(cls, value: str | None) -> str:
"""Validate that methods.""" """Validate that methods."""
if value not in ("", "POST"): if value and value != "POST":
raise ValueError("Methods is invalid, it should be either an empty string or POST") raise ValueError("Methods is invalid, it should be either an empty string, None, or POST")
return value return ""
@field_validator("unique") @field_validator("unique")
@classmethod @classmethod
def validate_unique(cls, value: List[Optional[str]]) -> List[Optional[str]]: def validate_unique(cls, value: List[Optional[str]] | None) -> List[Optional[str]]:
"""Validate unique list.""" """Validate unique list."""
for unique in value: for unique in value or []:
if unique not in ("name", "tags", "timeout", "grace"): if unique not in ("name", "tags", "timeout", "grace"):
raise ValueError( raise ValueError(
"Unique is not valid. Unique can only be name, tags, timeout, and grace or an empty list" "Unique is not valid. Unique can only be name, tags, timeout, and grace or an empty list"