kiba-core 0.5.3.dev79__tar.gz → 0.5.3.dev81__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. kiba_core-0.5.3.dev81/.github/workflows/publish.yml +29 -0
  2. kiba_core-0.5.3.dev81/.github/workflows/release.yml +34 -0
  3. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/CHANGELOG.md +1 -0
  4. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/PKG-INFO +1 -1
  5. kiba_core-0.5.3.dev81/core/util/typing_util.py +28 -0
  6. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/kiba_core.egg-info/PKG-INFO +1 -1
  7. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/kiba_core.egg-info/SOURCES.txt +1 -0
  8. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/pyproject.toml +1 -1
  9. kiba_core-0.5.3.dev79/.github/workflows/release.yml +0 -39
  10. kiba_core-0.5.3.dev79/core/util/typing_util.py +0 -7
  11. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/.github/pull_request_template.md +0 -0
  12. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/.github/workflows/deploy.yml +0 -0
  13. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/.github/workflows/pull-request.yml +0 -0
  14. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/.gitignore +0 -0
  15. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/Dockerfile +0 -0
  16. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/README.md +0 -0
  17. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/__init__.py +0 -0
  18. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/__init__.py +0 -0
  19. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/api_request.py +0 -0
  20. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/api_response.py +0 -0
  21. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/authorizer.py +0 -0
  22. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/default_routes.py +0 -0
  23. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/health.py +0 -0
  24. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/json_route.py +0 -0
  25. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/middleware/__init__.py +0 -0
  26. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/middleware/database_connection_middleware.py +0 -0
  27. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/middleware/exception_handling_middleware.py +0 -0
  28. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/middleware/logging_middleware.py +0 -0
  29. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/middleware/origin_ip_middleware.py +0 -0
  30. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/middleware/server_headers_middleware.py +0 -0
  31. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/openapi.py +0 -0
  32. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/rate_limit.py +0 -0
  33. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/request_context.py +0 -0
  34. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/route.py +0 -0
  35. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/route_auth.py +0 -0
  36. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/route_metadata.py +0 -0
  37. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/api/streaming_json_route.py +0 -0
  38. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/aws_requester.py +0 -0
  39. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/caching/__init__.py +0 -0
  40. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/caching/cache.py +0 -0
  41. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/caching/dict_cache.py +0 -0
  42. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/caching/file_cache.py +0 -0
  43. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/cron/__init__.py +0 -0
  44. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/cron/api_request_cron_job_processor.py +0 -0
  45. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/cron/cron_executor.py +0 -0
  46. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/cron/cron_job_processor.py +0 -0
  47. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/cron/model.py +0 -0
  48. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/exceptions.py +0 -0
  49. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/http/__init__.py +0 -0
  50. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/http/basic_authentication.py +0 -0
  51. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/http/jwt.py +0 -0
  52. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/http/rest_method.py +0 -0
  53. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/locks/__init__.py +0 -0
  54. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/locks/lock.py +0 -0
  55. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/locks/model.py +0 -0
  56. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/locks/sql.py +0 -0
  57. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/logging.py +0 -0
  58. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/notifications/__init__.py +0 -0
  59. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/notifications/discord_client.py +0 -0
  60. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/notifications/notification_client.py +0 -0
  61. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/notifications/slack_client.py +0 -0
  62. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/py.typed +0 -0
  63. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/queues/__init__.py +0 -0
  64. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/queues/aqs.py +0 -0
  65. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/queues/cosmos.py +0 -0
  66. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/queues/message_queue.py +0 -0
  67. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/queues/message_queue_processor.py +0 -0
  68. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/queues/model.py +0 -0
  69. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/queues/sql.py +0 -0
  70. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/queues/sqs.py +0 -0
  71. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/requester/__init__.py +0 -0
  72. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/requester/requester.py +0 -0
  73. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/s3_manager.py +0 -0
  74. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/service_client.py +0 -0
  75. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/store/__init__.py +0 -0
  76. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/store/database.py +0 -0
  77. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/store/entity_repository.py +0 -0
  78. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/store/retriever.py +0 -0
  79. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/store/saver.py +0 -0
  80. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/__init__.py +0 -0
  81. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/async_util.py +0 -0
  82. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/chain_util.py +0 -0
  83. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/date_util.py +0 -0
  84. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/dict_util.py +0 -0
  85. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/file_util.py +0 -0
  86. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/hashing_util.py +0 -0
  87. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/http_util.py +0 -0
  88. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/json_util.py +0 -0
  89. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/list_util.py +0 -0
  90. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/process_util.py +0 -0
  91. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/string_util.py +0 -0
  92. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/url_util.py +0 -0
  93. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/util/value_holder.py +0 -0
  94. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/web3/__init__.py +0 -0
  95. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/web3/eth_client.py +0 -0
  96. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/web3/eth_client_registry.py +0 -0
  97. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/core/web3/multicall3.py +0 -0
  98. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/kiba_core.egg-info/dependency_links.txt +0 -0
  99. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/kiba_core.egg-info/requires.txt +0 -0
  100. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/kiba_core.egg-info/top_level.txt +0 -0
  101. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/makefile +0 -0
  102. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/setup.cfg +0 -0
  103. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/__init__.py +0 -0
  104. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_api_response.py +0 -0
  105. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_authorizer.py +0 -0
  106. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_exception_handling_middleware.py +0 -0
  107. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_json_route.py +0 -0
  108. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_openapi.py +0 -0
  109. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_origin_ip_middleware.py +0 -0
  110. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_rate_limit.py +0 -0
  111. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_request_context.py +0 -0
  112. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_route.py +0 -0
  113. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/api/test_streaming_json_route.py +0 -0
  114. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/caching/test_dict_cache.py +0 -0
  115. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/caching/test_file_cache.py +0 -0
  116. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/cron/__init__.py +0 -0
  117. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/cron/test_cron_executor.py +0 -0
  118. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/locks/test_sql_lock.py +0 -0
  119. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/queues/conftest.py +0 -0
  120. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/queues/test_aqs_queue.py +0 -0
  121. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/queues/test_cosmos_queue.py +0 -0
  122. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/queues/test_message_queue_processor.py +0 -0
  123. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/queues/test_sql_queue.py +0 -0
  124. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/queues/test_sqs_queue.py +0 -0
  125. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/requester/__init__.py +0 -0
  126. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/requester/test_requester.py +0 -0
  127. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/test_database.py +0 -0
  128. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/test_entity_repository.py +0 -0
  129. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/test_exceptions.py +0 -0
  130. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/test_logging.py +0 -0
  131. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/__init__.py +0 -0
  132. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_async_util.py +0 -0
  133. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_chain_util.py +0 -0
  134. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_date_util.py +0 -0
  135. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_dict_util.py +0 -0
  136. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_file_util.py +0 -0
  137. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_json_util.py +0 -0
  138. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_list_util.py +0 -0
  139. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_process_util.py +0 -0
  140. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_string_util.py +0 -0
  141. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/util/test_url_util.py +0 -0
  142. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/web3/__init__.py +0 -0
  143. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/web3/test_eth_client_registry.py +0 -0
  144. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/tests/web3/test_rest_eth_client.py +0 -0
  145. {kiba_core-0.5.3.dev79 → kiba_core-0.5.3.dev81}/uv.lock +0 -0
@@ -0,0 +1,29 @@
1
+ name: Publish
2
+ on:
3
+ push:
4
+ tags: ["v*"]
5
+ jobs:
6
+ deploy-package:
7
+ runs-on: ubuntu-latest
8
+ env:
9
+ DOCKER_IMAGE: build
10
+ PYPI_PUBLISH_TOKEN: ${{ secrets.PYPI_PUBLISH_TOKEN }}
11
+ steps:
12
+ - name: Check out the repo
13
+ uses: actions/checkout@v7
14
+ - name: Build docker image
15
+ run: docker build --tag $DOCKER_IMAGE .
16
+ - name: Publish package to pypi
17
+ run: docker run -e UV_PUBLISH_TOKEN=$PYPI_PUBLISH_TOKEN $DOCKER_IMAGE /bin/bash -c " make publish"
18
+ create-release:
19
+ needs: deploy-package
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: write
23
+ steps:
24
+ - name: Check out the repo
25
+ uses: actions/checkout@v7
26
+ - name: Create Release
27
+ env:
28
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29
+ run: gh release create ${{ github.ref_name }} --title "Release ${{ github.ref_name }}" --generate-notes
@@ -0,0 +1,34 @@
1
+ name: Release
2
+ on:
3
+ workflow_dispatch:
4
+ concurrency:
5
+ group: release
6
+ jobs:
7
+ push-version-tag:
8
+ runs-on: ubuntu-latest
9
+ # NOTE(krishan711): the release environment only allows main and holds the deploy key, the only thing allowed to push version tags. Unlike the GITHUB_TOKEN, a push with it starts the workflows that publish the tag.
10
+ environment: release
11
+ permissions:
12
+ contents: read
13
+ steps:
14
+ - name: Check out the repo
15
+ uses: actions/checkout@v7
16
+ with:
17
+ ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }}
18
+ - name: Push the version tag
19
+ run: |
20
+ version="v$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")"
21
+ if [[ ! "$version" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
22
+ echo "::error::pyproject.toml version $version is not X.Y.Z"
23
+ exit 1
24
+ fi
25
+ existingSha="$(git ls-remote origin "refs/tags/$version" | cut -f1)"
26
+ if [[ "$existingSha" == "$GITHUB_SHA" ]]; then
27
+ echo "$version is already tagged on this commit; if publishing failed, re-run the workflow run for the tag"
28
+ elif [[ -n "$existingSha" ]]; then
29
+ echo "::error::$version already exists on $existingSha, bump the version in pyproject.toml"
30
+ exit 1
31
+ else
32
+ git tag "$version"
33
+ git push origin "refs/tags/$version"
34
+ fi
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
8
8
  ## [Unreleased]
9
9
 
10
10
  ### Added
11
+ - [MINOR] Added `UNDEFINED`, `Undefined` and `UpdateValue[T]` to `core.util.typing_util` for partial updates: `UpdateValue[T]` is `T` or the `UNDEFINED` sentinel, so an update can tell "not provided" apart from an explicit `None`. Use it as a pydantic field default (`title: UpdateValue[str | None] = UNDEFINED`); request input never validates to `UNDEFINED` (a JSON `"UNDEFINED"` stays a string), and `x is not UNDEFINED` narrows `x` to `T` for type checkers
11
12
  - [MINOR] Added `core.store.entity_repository.EntityRepository`, which reads and writes rows of a table as pydantic models: `create`, `update`, `upsert`, `upsert_many` (postgres and sqlite), `delete`, `list_many`, `get_first`, `get`, `get_one` and `get_one_or_none`. It exposes UUID columns as strings and datetimes as aware utc datetimes, dumps pydantic values in JSON columns, generates ids for UUID primary keys and stamps `createdDate`/`updatedDate` when the table has them; subclasses can override `_convert_value_from_db`/`_convert_value_to_db` for other columns
12
13
  - [MINOR] Added `UUIDFieldFilter` (accepts `uuid.UUID` or `str` values) and module-level `apply_orders`, `apply_field_filters` and `get_field_filters_conditions` (conditions usable on selects, updates and deletes) to `core.store.retriever`; `Retriever` now uses them
13
14
  - [PATCH] Updated `DateFieldFilter` to convert values to utc for the column (naive for columns without a timezone, aware otherwise) so aware datetimes in any timezone compare correctly
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kiba-core
3
- Version: 0.5.3.dev79
3
+ Version: 0.5.3.dev81
4
4
  Summary: Kiba Labs' python utilities
5
5
  Project-URL: repository, https://github.com/kibalabs/core-py
6
6
  Requires-Python: <4,>=3.12
@@ -0,0 +1,28 @@
1
+ import enum
2
+ import typing
3
+ from collections.abc import Mapping
4
+ from collections.abc import Sequence
5
+
6
+ from pydantic import GetCoreSchemaHandler
7
+ from pydantic_core import core_schema
8
+
9
+ JsonBaseType = str | int | float | bool | None
10
+ type Json = dict[str, 'Json'] | Mapping[str, 'Json'] | list['Json'] | Sequence['Json'] | JsonBaseType
11
+ type JsonObject = dict[str, 'Json']
12
+ type JsonList = list['Json']
13
+
14
+
15
+ class Undefined(enum.Enum):
16
+ UNDEFINED = 'UNDEFINED'
17
+
18
+ def __repr__(self) -> str:
19
+ return 'UNDEFINED'
20
+
21
+ @classmethod
22
+ def __get_pydantic_core_schema__(cls, sourceType: typing.Any, handler: GetCoreSchemaHandler) -> core_schema.CoreSchema: # type: ignore[explicit-any]
23
+ # NOTE(krishan711): only the default can be UNDEFINED, input values (e.g. "UNDEFINED" in json) must never validate to it
24
+ return core_schema.is_instance_schema(cls)
25
+
26
+
27
+ UNDEFINED: typing.Final = Undefined.UNDEFINED
28
+ type UpdateValue[T] = T | Undefined
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kiba-core
3
- Version: 0.5.3.dev79
3
+ Version: 0.5.3.dev81
4
4
  Summary: Kiba Labs' python utilities
5
5
  Project-URL: repository, https://github.com/kibalabs/core-py
6
6
  Requires-Python: <4,>=3.12
@@ -7,6 +7,7 @@ pyproject.toml
7
7
  uv.lock
8
8
  .github/pull_request_template.md
9
9
  .github/workflows/deploy.yml
10
+ .github/workflows/publish.yml
10
11
  .github/workflows/pull-request.yml
11
12
  .github/workflows/release.yml
12
13
  core/__init__.py
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kiba-core"
3
- version = "0.5.3.dev79"
3
+ version = "0.5.3.dev81"
4
4
  description = "Kiba Labs' python utilities"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12, <4"
@@ -1,39 +0,0 @@
1
- name: Release
2
- on:
3
- push:
4
- tags: ["v*"]
5
- jobs:
6
- deploy-package:
7
- runs-on: ubuntu-latest
8
- env:
9
- DOCKER_IMAGE: build
10
- PYPI_PUBLISH_TOKEN: ${{ secrets.PYPI_PUBLISH_TOKEN }}
11
- steps:
12
- - name: Check out the repo
13
- uses: actions/checkout@v2
14
- - name: Check the package version is the same as the tag
15
- run: |
16
- version=$(python3 setup.py --version)
17
- if [ "${{ github.ref }}" != "refs/tags/v${version}" ]; then
18
- echo "version in setup.py (v${version}) is different to the given tag (${{ github.ref }})"
19
- exit 1;
20
- fi
21
- - name: Build docker image
22
- run: docker build --tag $DOCKER_IMAGE .
23
- - name: Publish package to pypi
24
- run: docker run -e UV_PUBLISH_TOKEN=$PYPI_PUBLISH_TOKEN $DOCKER_IMAGE /bin/bash -c " make publish"
25
- create-release:
26
- needs: deploy-package
27
- runs-on: ubuntu-latest
28
- env:
29
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30
- steps:
31
- - name: Check out the repo
32
- uses: actions/checkout@v2
33
- - name: Create Release
34
- uses: actions/create-release@v1
35
- with:
36
- tag_name: ${{ github.ref }}
37
- release_name: Release ${{ github.ref }}
38
- draft: false
39
- prerelease: false
@@ -1,7 +0,0 @@
1
- from collections.abc import Mapping
2
- from collections.abc import Sequence
3
-
4
- JsonBaseType = str | int | float | bool | None
5
- type Json = dict[str, 'Json'] | Mapping[str, 'Json'] | list['Json'] | Sequence['Json'] | JsonBaseType
6
- type JsonObject = dict[str, 'Json']
7
- type JsonList = list['Json']
File without changes