Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a0cd2bc
feat: remove redis ping
ville Jun 19, 2025
688c05d
feat(DEVC-265): add py-typed file & update pyproject.toml accordingly
kossman Sep 9, 2025
607a58e
feat(DEVC-265): ensure that lint passed; bump mypy version from mypy=…
kossman Sep 9, 2025
e49af54
feat(DEVC-265): move mypy CLI args into single place - pyproject.toml…
kossman Sep 9, 2025
45c5f07
feat(DEVC-265): remove exclude block at mypy settings for skipping so…
kossman Sep 9, 2025
56898cd
feat(DEVC-265): optimise mypy config
kossman Sep 10, 2025
335b839
feat(DEVC-265): remove redundant
kossman Sep 10, 2025
03d6f5f
feature(DEVC-1282): migrate SDK code to pydantic V2
kossman Sep 10, 2025
aa63e0b
feat(DEVC-1282): fix import & lint
kossman Sep 10, 2025
1fd4f2a
feat(DEVC-1282): fix tests
kossman Sep 10, 2025
b6c279b
feat(DEVC-1282): make tests at least "runnable"
kossman Sep 10, 2025
d72adb6
feat(DEVC-1282): migrate tests to pydantic v2 as well; add some fixes
kossman Sep 10, 2025
4ee3efc
feat(DEVC-1282): fix linting
kossman Sep 10, 2025
a402663
feat(DEVC-1282): fix typing imports for py3.9 & 3.10
kossman Sep 10, 2025
6ba2b0a
feat(DEVC-1282): improve type annotations; refactor RerunTimeRange cl…
kossman Sep 10, 2025
c6bffac
feat(DEVC-1282): fix annotations for `model_validator` with mode="bef…
kossman Sep 10, 2025
db86e83
feat(DEVC-1282): set new minor version
kossman Sep 11, 2025
6f9e524
feat(DEVC-1282): update changelog
kossman Sep 11, 2025
2da0461
feat(DEVC-265): update changelog
kossman Sep 11, 2025
52ea020
Merge branch 'feature/DEVC-265-add-py-typed-for-improve-type-hinting'…
kossman Sep 15, 2025
07834fd
feat(DEVC-265): change version for new release to 2.x.x since changes…
kossman Sep 15, 2025
a3b8958
feat(DEVC-265): update version at src/version.py
kossman Sep 15, 2025
fc825ba
Merge branch 'feature/DEVC-265-add-py-typed-for-improve-type-hinting'…
kossman Sep 15, 2025
75a363e
feat(DEVC-265): add trailing
kossman Sep 15, 2025
971efab
Merge branch 'master' into feature/remove-redis-ping
kossman Sep 15, 2025
ea17c1a
feat(DEVC-1286): Revamp redis usage (#111)
kossman Sep 24, 2025
8be3331
Merge branch 'feature/remove-redis-ping' into feature/DEVC-1282-migra…
kossman Sep 24, 2025
cdbec46
feat(DEVC-1282): set proper version at related files
kossman Sep 24, 2025
8650104
feat(DEVC-1282): fix docs
kossman Sep 24, 2025
8f82714
temp: trigger rebuild docs
kossman Sep 24, 2025
1b7e823
revert temp changes
kossman Sep 24, 2025
11798ae
Post-release: nullified version in antora.yml
kossman Sep 24, 2025
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.0] - 2025-09-11
### Changed
- Full migration from old `v1`of `pydantic` to `v2`dependencies:
- `pydantic` itself: `"pydantic >= 2.0, <3.0"`
- `pydantic-settings`: `"pydantic-settings >=2.0, <3.0"`
- Revamp Redis, get rid of LUA scripts at all
- Add `py.typed` for type checking
- Upgrading a bunch of dependencies


## [1.15.0] - 2025-09-04
### Security
- Upgraded internal dependency `urllib3` to version `2.5.0`
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ coverage-html: test
.PHONY: lint
lint:
@ruff check $(srcs)
@mypy --check-untyped-defs $(srcs)
@mypy $(srcs)

## format: Format all files.
.PHONY: format
Expand Down Expand Up @@ -112,7 +112,7 @@ up-cache:
-d \
--name python-sdk-redis \
-p 6379:6379 \
redis:6.0.9 # apps use 6.0.9 or 6.2.3
redis:7.4.0

# down-cache: Stop Redis.
.PHONY: down-cache
Expand Down
2 changes: 1 addition & 1 deletion docs/antora-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ content:
start_path: docs
branches: []
# branches: HEAD # Use this for local development
tags: [v1.15.0]
tags: [v2.0.0]
asciidoc:
attributes:
page-toclevels: 5
Expand Down
6 changes: 4 additions & 2 deletions docs/modules/ROOT/examples/cache/tutorial002.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

@scheduled
def scheduled_app(event: ScheduledDataTimeEvent, api: Api, cache: Cache):
cache.set(key='key', value='value', ttl=1) # <.>
ttl_value = 1
cache.set(key='key', value='value', ttl=ttl_value) # <.>

assert cache.get('key') == 'value'

time.sleep(1) # <.>
time.sleep(ttl_value + 0.01) # <.>

assert cache.get('key') is None # <.>
2 changes: 1 addition & 1 deletion docs/modules/ROOT/examples/cache/tutorial006.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ def scheduled_app(event: ScheduledDataTimeEvent, api: Api, cache: Cache):
'key_with_custom_expiry': 'value_2',
}

time.sleep(1) # <.>
time.sleep(1 + 0.01) # <.>

assert cache.get_all() == {'key': 'value_1'} # <.>
5 changes: 0 additions & 5 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,6 @@ It will try to re-send the same request again with exponential back-off for HTTP
* 503
* 504

[source,python]
----
include::example$api/tutorial008.py[]
----

[#cache]
== Cache
Apps might need to share some data between invokes.
Expand Down
36 changes: 24 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ build-backend = "setuptools.build_meta"
name = "corva-sdk"
description = "SDK for building Corva DevCenter Python apps."
readme = "README.md"
version = "1.15.0"
version = "2.0.0"
license = { text = "The Unlicense" }
authors = [
{ name = "Jordan Ambra", email = "jordan.ambra@corva.ai" }
]
keywords = ["corva", "sdk"]
requires-python = ">=3.9,<4.0"
dependencies = [
"fakeredis[lua] >=2.26.2, <2.30.0",
"pydantic >=1.8.2, <2.0.0",
"redis >=5.2.1, <6.0.0",
"fakeredis >=2.30.0, <2.32.0",
"pydantic >= 2.0, <3.0",
"pydantic-settings >=2.0, <3.0",
"redis == 6.4.0",
"requests >=2.32.3, <3.0.0",
"urllib3==2.5.0"
"urllib3 == 2.5.0",
"semver==3.0.4"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -27,7 +29,8 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Libraries"
"Topic :: Software Development :: Libraries",
"Typing :: Typed"
]

[project.urls]
Expand All @@ -36,9 +39,9 @@ Homepage = "https://github.com/corva-ai/python-sdk"
[project.optional-dependencies]
dev = [
"ruff==0.12.11",
"mypy==0.950",
"mypy>=1.10,<2",
"types-freezegun~=1.1.9",
"types-redis~=4.2.4",
"types-redis~=4.6.0",
"types-requests~=2.27.27",
"coverage==7.6.1",
"freezegun==1.5.1",
Expand All @@ -48,10 +51,14 @@ dev = [
]

[tool.setuptools]
include-package-data = true
package-dir = { "" = "src" }
packages = { find = { where = ["src"] } }
py-modules = ["plugin"]

[tool.setuptools.package-data]
corva = ["py.typed"]

[project.entry-points."pytest11"]
corva = "plugin"

Expand Down Expand Up @@ -82,24 +89,26 @@ omit = [
"docs/modules/ROOT/examples/logging/tutorial003.py",
"docs/modules/ROOT/examples/logging/tutorial004.py",
"docs/modules/ROOT/examples/logging/tutorial005.py",
"docs/modules/ROOT/examples/testing/tutorial008.py",
"docs/modules/ROOT/examples/followable/tutorial001.py",
"src/corva/__init__.py",
"src/version.py",
"src/plugin.py"
]

[tool.mypy]
exclude = '''(?x)(
^docs/modules/ROOT/examples/cache/tutorial004\.py$
| ^docs/modules/ROOT/examples/cache/tutorial005\.py$
)'''
python_version = "3.9"
mypy_path = "src"
explicit_package_bases = true
check_untyped_defs = true

[[tool.mypy.overrides]]
module = "setuptools.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "docs.*"
ignore_errors = true
ignore_missing_imports = true

[[tool.mypy.overrides]]
Expand All @@ -122,3 +131,6 @@ ignore_missing_imports = true
module = "fakeredis.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
Loading