cognite-function-apps 0.6.0__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.
- cognite_function_apps-0.6.0/.claude/settings.json +129 -0
- cognite_function_apps-0.6.0/.gemini/config.yaml +11 -0
- cognite_function_apps-0.6.0/.github/renovate.json +21 -0
- cognite_function_apps-0.6.0/.github/workflows/conventional-pr-title.yml +27 -0
- cognite_function_apps-0.6.0/.github/workflows/deploy-docs.yml +93 -0
- cognite_function_apps-0.6.0/.github/workflows/python-package.yml +58 -0
- cognite_function_apps-0.6.0/.github/workflows/python-publish.yml +44 -0
- cognite_function_apps-0.6.0/.github/workflows/release-please.yml +23 -0
- cognite_function_apps-0.6.0/.gitignore +212 -0
- cognite_function_apps-0.6.0/.pre-commit-config.yaml +24 -0
- cognite_function_apps-0.6.0/.python-version +1 -0
- cognite_function_apps-0.6.0/.release-please-manifest.json +3 -0
- cognite_function_apps-0.6.0/AGENTS.md +447 -0
- cognite_function_apps-0.6.0/CHANGELOG.md +95 -0
- cognite_function_apps-0.6.0/CLAUDE.md +45 -0
- cognite_function_apps-0.6.0/CODEOWNERS +1 -0
- cognite_function_apps-0.6.0/LICENSE +201 -0
- cognite_function_apps-0.6.0/PKG-INFO +228 -0
- cognite_function_apps-0.6.0/README.md +210 -0
- cognite_function_apps-0.6.0/RELEASING.md +300 -0
- cognite_function_apps-0.6.0/Terminology.md +115 -0
- cognite_function_apps-0.6.0/adr/response-customization.md +418 -0
- cognite_function_apps-0.6.0/codecov.yml +31 -0
- cognite_function_apps-0.6.0/docs/api-reference.md +341 -0
- cognite_function_apps-0.6.0/docs/app-composition.md +404 -0
- cognite_function_apps-0.6.0/docs/architecture.md +404 -0
- cognite_function_apps-0.6.0/docs/async-support.md +340 -0
- cognite_function_apps-0.6.0/docs/contributing.md +629 -0
- cognite_function_apps-0.6.0/docs/dependency-injection.md +409 -0
- cognite_function_apps-0.6.0/docs/dev-server.md +475 -0
- cognite_function_apps-0.6.0/docs/function-client.md +764 -0
- cognite_function_apps-0.6.0/docs/index.md +187 -0
- cognite_function_apps-0.6.0/docs/introspection.md +504 -0
- cognite_function_apps-0.6.0/docs/logging.md +235 -0
- cognite_function_apps-0.6.0/docs/mcp.md +495 -0
- cognite_function_apps-0.6.0/docs/release-process.md +1 -0
- cognite_function_apps-0.6.0/docs/response-customization.md +408 -0
- cognite_function_apps-0.6.0/docs/stylesheets/extra.css +20 -0
- cognite_function_apps-0.6.0/docs/tracing.md +429 -0
- cognite_function_apps-0.6.0/docs/type-safety.md +418 -0
- cognite_function_apps-0.6.0/docs-src/error-handling.py +242 -0
- cognite_function_apps-0.6.0/examples/dev.py +32 -0
- cognite_function_apps-0.6.0/examples/handler.py +165 -0
- cognite_function_apps-0.6.0/justfile +80 -0
- cognite_function_apps-0.6.0/mkdocs.yml +138 -0
- cognite_function_apps-0.6.0/pyproject.toml +114 -0
- cognite_function_apps-0.6.0/release-please-config.json +23 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/__init__.py +73 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/_version.py +1 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/app.py +786 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/base_client.py +316 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/cli.py +338 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/client.py +1107 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/client_generation.py +523 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/convert.py +327 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/dependency_registry.py +526 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/devserver/__init__.py +25 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/devserver/asgi.py +431 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/devserver/auth.py +108 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/devserver/swagger.py +282 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/formatting.py +100 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/introspection.py +190 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/logger.py +130 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/mcp.py +443 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/models.py +369 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/py.typed +0 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/routing.py +445 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/schema.py +945 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/service.py +314 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/templates/__init__.py +1 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/templates/client_template.jinja2 +120 -0
- cognite_function_apps-0.6.0/src/cognite_function_apps/tracer.py +727 -0
- cognite_function_apps-0.6.0/tests/__init__.py +1 -0
- cognite_function_apps-0.6.0/tests/conftest.py +177 -0
- cognite_function_apps-0.6.0/tests/test_app.py +136 -0
- cognite_function_apps-0.6.0/tests/test_asgi.py +742 -0
- cognite_function_apps-0.6.0/tests/test_async_handlers.py +275 -0
- cognite_function_apps-0.6.0/tests/test_cli.py +253 -0
- cognite_function_apps-0.6.0/tests/test_client_generation.py +880 -0
- cognite_function_apps-0.6.0/tests/test_convert.py +661 -0
- cognite_function_apps-0.6.0/tests/test_convert_edge_cases.py +424 -0
- cognite_function_apps-0.6.0/tests/test_convert_property_based.py +478 -0
- cognite_function_apps-0.6.0/tests/test_dependency_injection.py +1228 -0
- cognite_function_apps-0.6.0/tests/test_error_handling.py +290 -0
- cognite_function_apps-0.6.0/tests/test_formatting.py +129 -0
- cognite_function_apps-0.6.0/tests/test_handle_function.py +537 -0
- cognite_function_apps-0.6.0/tests/test_introspection.py +377 -0
- cognite_function_apps-0.6.0/tests/test_logger.py +393 -0
- cognite_function_apps-0.6.0/tests/test_mcp.py +517 -0
- cognite_function_apps-0.6.0/tests/test_models.py +158 -0
- cognite_function_apps-0.6.0/tests/test_routing.py +1489 -0
- cognite_function_apps-0.6.0/tests/test_schema.py +1375 -0
- cognite_function_apps-0.6.0/tests/test_swagger.py +497 -0
- cognite_function_apps-0.6.0/tests/test_trace_propagation.py +135 -0
- cognite_function_apps-0.6.0/tests/test_tracer.py +1033 -0
- cognite_function_apps-0.6.0/uv.lock +2285 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"allowedMcpServers": [
|
|
3
|
+
{
|
|
4
|
+
"serverName": "github"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"serverName": "atlassian"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"includeCoAuthoredBy": true,
|
|
11
|
+
"permissions": {
|
|
12
|
+
"allow": [
|
|
13
|
+
"Bash(git diff:*)",
|
|
14
|
+
"Bash(git log:*)",
|
|
15
|
+
"Bash(jj log:*)",
|
|
16
|
+
"Bash(jj show:*)"
|
|
17
|
+
],
|
|
18
|
+
"deny": [
|
|
19
|
+
"Bash(curl:*)",
|
|
20
|
+
"Read(./.env)",
|
|
21
|
+
"Read(./.env*)",
|
|
22
|
+
"Read(./secrets/**)",
|
|
23
|
+
"Read(./.secrets.env)",
|
|
24
|
+
"Read(./.secrets*)",
|
|
25
|
+
"Read(./.local.env)",
|
|
26
|
+
"Read(*.token)",
|
|
27
|
+
"Read(*.pem)",
|
|
28
|
+
"Read(*.key)",
|
|
29
|
+
"Read(*.crt)",
|
|
30
|
+
"Read(*.cer)",
|
|
31
|
+
"Read(*.p12)",
|
|
32
|
+
"Read(*.pfx)",
|
|
33
|
+
"Read(./.npmrc)",
|
|
34
|
+
"Read(~/.ssh/**)",
|
|
35
|
+
"Read(~/.aws/credentials)",
|
|
36
|
+
"Read(~/.aws/config)",
|
|
37
|
+
"Read(~/.azure/**)",
|
|
38
|
+
"Read(~/.config/gcloud/**)",
|
|
39
|
+
"Read(~/.kube/config)",
|
|
40
|
+
"Read(~/.gitconfig)",
|
|
41
|
+
"Read(~/.npmrc)",
|
|
42
|
+
"Read(~/.netrc)",
|
|
43
|
+
"Read(~/.config/pip/pip.conf)",
|
|
44
|
+
"Read(~/.pip/pip.conf)",
|
|
45
|
+
"Read(./.envrc)",
|
|
46
|
+
"Read(./.yarnrc.yml)",
|
|
47
|
+
"Read(./.azure/**)",
|
|
48
|
+
"Read(./.bash_history)",
|
|
49
|
+
"Read(./.zsh_history)",
|
|
50
|
+
"Read(./.config/**)",
|
|
51
|
+
"Read(./.sbt/**)",
|
|
52
|
+
"Read(./.vscode/**)",
|
|
53
|
+
"Read(./.thunderbird/**)",
|
|
54
|
+
"Read(./.jfrog/**)",
|
|
55
|
+
"Read(./.docker/**)",
|
|
56
|
+
"Read(./.dockercfg)",
|
|
57
|
+
"Read(./.dockerenv)",
|
|
58
|
+
"Read(./.m2/settings.xml)",
|
|
59
|
+
"Read(./.bazelrc)",
|
|
60
|
+
"Read(./.nuget/NuGet/**)",
|
|
61
|
+
"Read(./.gsutil/**)",
|
|
62
|
+
"Read(./.ssh/**)",
|
|
63
|
+
"Read(./.gnupg/**)",
|
|
64
|
+
"Read(./.pip/pip.conf)",
|
|
65
|
+
"Read(./.helm/**)",
|
|
66
|
+
"Read(./.terraform.d/credentials*)",
|
|
67
|
+
"Read(./.pulumi/credentials.json)",
|
|
68
|
+
"Read(./.vault-token)",
|
|
69
|
+
"Read(./.my.cnf)",
|
|
70
|
+
"Read(./.pgpass)",
|
|
71
|
+
"Read(./.pnpmrc)",
|
|
72
|
+
"Read(./.pypirc)",
|
|
73
|
+
"Read(./.gem/credentials)",
|
|
74
|
+
"Read(./.cargo/credentials*)",
|
|
75
|
+
"Read(./.gitconfig)",
|
|
76
|
+
"Read(./.local/share/keyrings/**)",
|
|
77
|
+
"Read(./.mozilla/**)",
|
|
78
|
+
"Read(./.wireguard/**)",
|
|
79
|
+
"Read(./.git-credentials)",
|
|
80
|
+
"Edit(./.yarnrc.yml)",
|
|
81
|
+
"Edit(./.npmrc)",
|
|
82
|
+
"Edit(./.envrc)",
|
|
83
|
+
"Edit(./.azure/**)",
|
|
84
|
+
"Edit(./.bash_history)",
|
|
85
|
+
"Edit(./.zsh_history)",
|
|
86
|
+
"Edit(./.config/**)",
|
|
87
|
+
"Edit(./.sbt/**)",
|
|
88
|
+
"Edit(./.vscode/**)",
|
|
89
|
+
"Edit(./.thunderbird/**)",
|
|
90
|
+
"Edit(./.jfrog/**)",
|
|
91
|
+
"Edit(./.docker/**)",
|
|
92
|
+
"Edit(./.dockercfg)",
|
|
93
|
+
"Edit(./.dockerenv)",
|
|
94
|
+
"Edit(./.m2/settings.xml)",
|
|
95
|
+
"Edit(./.bazelrc)",
|
|
96
|
+
"Edit(./.nuget/NuGet/**)",
|
|
97
|
+
"Edit(./.gsutil/**)",
|
|
98
|
+
"Edit(./.ssh/**)",
|
|
99
|
+
"Edit(./.gnupg/**)",
|
|
100
|
+
"Edit(./.pip/pip.conf)",
|
|
101
|
+
"Edit(./.helm/**)",
|
|
102
|
+
"Edit(./.terraform.d/credentials*)",
|
|
103
|
+
"Edit(./.pulumi/credentials.json)",
|
|
104
|
+
"Edit(./.vault-token)",
|
|
105
|
+
"Edit(./.my.cnf)",
|
|
106
|
+
"Edit(./.pgpass)",
|
|
107
|
+
"Edit(./.pnpmrc)",
|
|
108
|
+
"Edit(./.pypirc)",
|
|
109
|
+
"Edit(./.gem/credentials)",
|
|
110
|
+
"Edit(./.cargo/credentials*)",
|
|
111
|
+
"Edit(./.gitconfig)",
|
|
112
|
+
"Edit(./.local/share/keyrings/**)",
|
|
113
|
+
"Edit(./.mozilla/**)",
|
|
114
|
+
"Edit(./.wireguard/**)",
|
|
115
|
+
"Edit(./.git-credentials)",
|
|
116
|
+
"Edit(~/.ssh/**)",
|
|
117
|
+
"Edit(~/.aws/credentials)",
|
|
118
|
+
"Edit(~/.aws/config)",
|
|
119
|
+
"Edit(~/.azure/**)",
|
|
120
|
+
"Edit(~/.config/gcloud/**)",
|
|
121
|
+
"Edit(~/.kube/config)",
|
|
122
|
+
"Edit(~/.gitconfig)",
|
|
123
|
+
"Edit(~/.npmrc)",
|
|
124
|
+
"Edit(~/.netrc)",
|
|
125
|
+
"Edit(~/.config/pip/pip.conf)",
|
|
126
|
+
"Edit(~/.pip/pip.conf)"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"extends": [
|
|
4
|
+
"local>cognitedata/renovate-config"
|
|
5
|
+
],
|
|
6
|
+
"packageRules": [
|
|
7
|
+
{
|
|
8
|
+
"matchFileNames": [
|
|
9
|
+
"pyproject.toml"
|
|
10
|
+
],
|
|
11
|
+
"matchDepNames": [
|
|
12
|
+
"python"
|
|
13
|
+
],
|
|
14
|
+
"matchDepTypes": [
|
|
15
|
+
"python"
|
|
16
|
+
],
|
|
17
|
+
"enabled": false,
|
|
18
|
+
"description": "Disable Python version updates - we need to support Function runtimes from 3.10 to 3.12"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: conventional-pr-title
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, edited, synchronize, reopened]
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6
|
|
13
|
+
env:
|
|
14
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
15
|
+
with:
|
|
16
|
+
types: |
|
|
17
|
+
feat
|
|
18
|
+
fix
|
|
19
|
+
chore
|
|
20
|
+
docs
|
|
21
|
+
style
|
|
22
|
+
refactor
|
|
23
|
+
perf
|
|
24
|
+
test
|
|
25
|
+
ci
|
|
26
|
+
build
|
|
27
|
+
revert
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# This workflow deploys documentation to GitHub Pages
|
|
2
|
+
# - Deploys versioned docs on releases
|
|
3
|
+
# - Deploys dev docs on pushes to main
|
|
4
|
+
|
|
5
|
+
name: Deploy Documentation
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
release:
|
|
11
|
+
types: [created]
|
|
12
|
+
|
|
13
|
+
# Permissions needed for GitHub Pages deployment
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy-dev:
|
|
19
|
+
name: Deploy Development Docs
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
if: github.event_name == 'push'
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.14'
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: |
|
|
34
|
+
pipx install uv
|
|
35
|
+
uv sync --group dev
|
|
36
|
+
|
|
37
|
+
- name: Configure Git
|
|
38
|
+
run: |
|
|
39
|
+
git config user.name "github-actions[bot]"
|
|
40
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
41
|
+
|
|
42
|
+
- name: Install just
|
|
43
|
+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
|
|
44
|
+
|
|
45
|
+
- name: Convert Python docs to Markdown
|
|
46
|
+
run: just docs-convert
|
|
47
|
+
|
|
48
|
+
- name: Deploy dev documentation
|
|
49
|
+
run: |
|
|
50
|
+
uv run mike deploy dev --push --update-aliases
|
|
51
|
+
|
|
52
|
+
deploy-release:
|
|
53
|
+
name: Deploy Release Docs
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
if: github.event_name == 'release'
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
58
|
+
with:
|
|
59
|
+
fetch-depth: 0
|
|
60
|
+
|
|
61
|
+
- name: Set up Python
|
|
62
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
|
|
63
|
+
with:
|
|
64
|
+
python-version: '3.14'
|
|
65
|
+
|
|
66
|
+
- name: Install dependencies
|
|
67
|
+
run: |
|
|
68
|
+
pipx install uv
|
|
69
|
+
uv sync --group dev
|
|
70
|
+
|
|
71
|
+
- name: Configure Git
|
|
72
|
+
run: |
|
|
73
|
+
git config user.name "github-actions[bot]"
|
|
74
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
75
|
+
|
|
76
|
+
- name: Install just
|
|
77
|
+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
|
|
78
|
+
|
|
79
|
+
- name: Extract version from tag
|
|
80
|
+
id: version
|
|
81
|
+
run: |
|
|
82
|
+
TAG="${{ github.event.release.tag_name }}"
|
|
83
|
+
VERSION="${TAG#v}"
|
|
84
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
85
|
+
|
|
86
|
+
- name: Convert Python docs to Markdown
|
|
87
|
+
run: just docs-convert
|
|
88
|
+
|
|
89
|
+
- name: Deploy release documentation
|
|
90
|
+
run: |
|
|
91
|
+
uv run mike deploy ${{ steps.version.outputs.version }} latest --push --update-aliases
|
|
92
|
+
uv run mike set-default latest --push
|
|
93
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Python package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [main]
|
|
11
|
+
|
|
12
|
+
# Scoped permissions for security
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
actions: read
|
|
16
|
+
pull-requests: write # Allow posting test results as PR comments
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
if: ${{ github.actor != 'github-actions[bot]' }}
|
|
22
|
+
strategy:
|
|
23
|
+
matrix:
|
|
24
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
|
|
31
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
32
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: |
|
|
38
|
+
pipx install uv
|
|
39
|
+
uv sync --all-extras
|
|
40
|
+
|
|
41
|
+
- name: Check formatting
|
|
42
|
+
run: |
|
|
43
|
+
uv run ruff format --check .
|
|
44
|
+
|
|
45
|
+
- name: Code checks
|
|
46
|
+
run: |
|
|
47
|
+
SKIP=ruff-format uv run pre-commit run --all-files --show-diff-on-failure
|
|
48
|
+
|
|
49
|
+
- name: Test with pytest
|
|
50
|
+
run: |
|
|
51
|
+
uv run pytest --cov=src/cognite_typed_functions --cov-report=xml --cov-report=term
|
|
52
|
+
|
|
53
|
+
- name: Upload coverage reports to Codecov
|
|
54
|
+
if: matrix.python-version == '3.13'
|
|
55
|
+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
|
|
56
|
+
with:
|
|
57
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
58
|
+
slug: cognitedata/cognite-typed-functions
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# This workflow publishes a Python Package to PyPI when release-please creates a release
|
|
2
|
+
|
|
3
|
+
name: Publish Package
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
paths:
|
|
9
|
+
- 'src/cognite_function_apps/_version.py'
|
|
10
|
+
|
|
11
|
+
# Scoped permissions for security
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
actions: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
publish:
|
|
18
|
+
# Only run if this is a version bump commit from release-please by matching
|
|
19
|
+
# 'chore(main):' anywhere in the commit message (handles merge commits)
|
|
20
|
+
if: contains(github.event.head_commit.message, 'chore(main):')
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
name: "Publish library"
|
|
23
|
+
environment: CD
|
|
24
|
+
steps:
|
|
25
|
+
- name: Check out
|
|
26
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
27
|
+
with:
|
|
28
|
+
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
|
|
31
|
+
- name: Setup Python Env
|
|
32
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
|
|
33
|
+
with:
|
|
34
|
+
python-version: '3.14'
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: pipx install uv
|
|
38
|
+
|
|
39
|
+
- name: Build package
|
|
40
|
+
run: uv build
|
|
41
|
+
|
|
42
|
+
- name: Release to PyPI
|
|
43
|
+
run: |
|
|
44
|
+
uv publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} || echo 'Version exists'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This workflow uses release-please to automate releases based on conventional commits
|
|
2
|
+
# https://github.com/googleapis/release-please
|
|
3
|
+
|
|
4
|
+
name: Release Please
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
pull-requests: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
release-please:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4
|
|
20
|
+
with:
|
|
21
|
+
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }}
|
|
22
|
+
config-file: release-please-config.json
|
|
23
|
+
manifest-file: .release-please-manifest.json
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# Generated markdown files from Python sources (jupytext)
|
|
158
|
+
# We track .py files in docs-src/ and generate .md files to docs/ during build
|
|
159
|
+
# Add files here as they are converted from .md to .py
|
|
160
|
+
docs/error-handling.md
|
|
161
|
+
|
|
162
|
+
# mypy
|
|
163
|
+
.mypy_cache/
|
|
164
|
+
.dmypy.json
|
|
165
|
+
dmypy.json
|
|
166
|
+
|
|
167
|
+
# Pyre type checker
|
|
168
|
+
.pyre/
|
|
169
|
+
|
|
170
|
+
# pytype static type analyzer
|
|
171
|
+
.pytype/
|
|
172
|
+
|
|
173
|
+
# Cython debug symbols
|
|
174
|
+
cython_debug/
|
|
175
|
+
|
|
176
|
+
# PyCharm
|
|
177
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
178
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
179
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
180
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
181
|
+
#.idea/
|
|
182
|
+
|
|
183
|
+
# Abstra
|
|
184
|
+
# Abstra is an AI-powered process automation framework.
|
|
185
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
186
|
+
# Learn more at https://abstra.io/docs
|
|
187
|
+
.abstra/
|
|
188
|
+
|
|
189
|
+
# Visual Studio Code
|
|
190
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
191
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
192
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
193
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
194
|
+
.vscode/
|
|
195
|
+
|
|
196
|
+
# Ruff stuff:
|
|
197
|
+
.ruff_cache/
|
|
198
|
+
|
|
199
|
+
# PyPI configuration file
|
|
200
|
+
.pypirc
|
|
201
|
+
|
|
202
|
+
# Cursor
|
|
203
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
204
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
205
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
206
|
+
.cursorignore
|
|
207
|
+
.cursorindexingignore
|
|
208
|
+
|
|
209
|
+
# Marimo
|
|
210
|
+
marimo/_static/
|
|
211
|
+
marimo/_lsp/
|
|
212
|
+
__marimo__/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
exclude: "_version.py|versioneer.py"
|
|
2
|
+
repos:
|
|
3
|
+
- repo: local
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
name: ruff
|
|
7
|
+
entry: uv run ruff check
|
|
8
|
+
args: ["--fix"]
|
|
9
|
+
language: system
|
|
10
|
+
types: [python]
|
|
11
|
+
- id: ruff-format
|
|
12
|
+
name: ruff-format
|
|
13
|
+
entry: uv run ruff format
|
|
14
|
+
language: system
|
|
15
|
+
types: [python]
|
|
16
|
+
- hooks:
|
|
17
|
+
- id: pyright
|
|
18
|
+
name: pyright
|
|
19
|
+
entry: pyright
|
|
20
|
+
language: node
|
|
21
|
+
pass_filenames: false
|
|
22
|
+
types: [python]
|
|
23
|
+
additional_dependencies: ["pyright@1.1.407"]
|
|
24
|
+
repo: local
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|