Skip to content

Commit 03e2d76

Browse files
authored
Restructure the connector for dataplane support (#1)
1 parent f887fc0 commit 03e2d76

File tree

118 files changed

+8869
-1521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+8869
-1521
lines changed

.changes/header.tpl.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
6+
and is generated by [Changie](https://github.com/miniscruff/changie).
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Add missing sql state errors
3+
time: 2025-03-07T01:11:15.37576+01:00
4+
custom:
5+
Author: Kayrnt
6+
Issue: ""

.changes/v0.1.0.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## deltastream-connector v0.1.0 - February 12, 2025
2+
3+
### Features
4+
5+
6+
- initial release
7+
8+
### Contributors
9+
- [@Kayrnt](https://github.com/Kayrnt)
10+

.changes/v0.1.1.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## deltastream-connector v0.1.1 - February 16, 2025
2+
3+
### Fixes
4+
5+
6+
- Fixes the Python wheel packaging
7+
8+
### Contributors
9+
- [@Kayrnt](https://github.com/Kayrnt)
10+

.changes/v0.1.2.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## deltastream-connector v0.1.2 - February 16, 2025
2+
3+
### Fixes
4+
5+
6+
- Fix ResultSet import on APIClient
7+
8+
### Contributors
9+
- [@Kayrnt](https://github.com/Kayrnt)
10+

.changie.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
changesDir: .changes
2+
unreleasedDir: unreleased
3+
headerPath: header.tpl.md
4+
versionHeaderPath: ""
5+
changelogPath: CHANGELOG.md
6+
versionExt: md
7+
envPrefix: "CHANGIE_"
8+
versionFormat: '## deltastream-connector {{.Version}} - {{.Time.Format "January 02, 2006"}}'
9+
kindFormat: '### {{.Kind}}'
10+
changeFormat: |-
11+
{{- $IssueList := list }}
12+
{{- if $.Custom.Issue }}
13+
{{- $changes := splitList " " (printf "%s" $.Custom.Issue) }}
14+
{{- if ne (len $changes) 0 }}
15+
{{- range $issueNbr := $changes }}
16+
{{- $changeLink := "[#nbr](https://github.com/deltastreaminc/deltastream-connector-python/issues/nbr)" | replace "nbr" $issueNbr }}
17+
{{- $IssueList = append $IssueList $changeLink }}
18+
{{- end }}
19+
- {{.Body}} ({{ range $index, $element := $IssueList }}{{if $index}}, {{end}}{{$element}}{{end}})
20+
{{- else }}
21+
- {{.Body}}
22+
{{- end }}
23+
{{- else }}
24+
- {{.Body}}
25+
{{- end }}
26+
27+
kinds:
28+
- label: Breaking Changes
29+
auto: major
30+
- label: Features
31+
auto: minor
32+
- label: Fixes
33+
auto: patch
34+
- label: Docs
35+
auto: patch
36+
- label: Under the Hood
37+
auto: patch
38+
- label: Dependencies
39+
auto: patch
40+
- label: Security
41+
auto: patch
42+
- label: Removed
43+
auto: major
44+
45+
newlines:
46+
afterChangelogHeader: 1
47+
afterKind: 1
48+
afterChangelogVersion: 1
49+
beforeKind: 1
50+
endOfVersion: 1
51+
52+
custom:
53+
- key: Author
54+
label: GitHub Username(s) (separated by a single space if multiple)
55+
type: string
56+
minLength: 3
57+
- key: Issue
58+
label: GitHub Issue Number (optional, separated by a single space if multiple)
59+
type: string
60+
minLength: 0
61+
62+
footerFormat: |
63+
{{- $contributorDict := dict }}
64+
{{- /* ensure we always skip snyk and dependabot in addition to the core team */}}
65+
{{- $maintainers := list "dependabot[bot]" "snyk-bot"}}
66+
{{- range $change := .Changes }}
67+
{{- $authorList := splitList " " (printf "%s" $change.Custom.Author) }}
68+
{{- /* loop through all authors for a single changelog */}}
69+
{{- range $author := $authorList }}
70+
{{- $authorLower := lower $author }}
71+
{{- /* we only want to include non-core team contributors */}}
72+
{{- if not (has $authorLower $maintainers)}}
73+
{{- $IssueList := list }}
74+
{{- if $change.Custom.Issue }}
75+
{{- $changes := splitList " " (printf "%s" $change.Custom.Issue) }}
76+
{{- if ne (len $changes) 0 }}
77+
{{- range $issueNbr := $changes }}
78+
{{- $changeLink := "[#nbr](https://github.com/deltastreaminc/deltastream-connector-python/issues/nbr)" | replace "nbr" $issueNbr }}
79+
{{- $IssueList = append $IssueList $changeLink }}
80+
{{- end }}
81+
{{- end }}
82+
{{- end }}
83+
{{- /* check if this contributor has other changes associated with them already */}}
84+
{{- if hasKey $contributorDict $author }}
85+
{{- $contributionList := get $contributorDict $author }}
86+
{{- $contributionList = concat $contributionList $IssueList }}
87+
{{- $contributorDict = set $contributorDict $author $contributionList }}
88+
{{- else }}
89+
{{- $contributionList := $IssueList }}
90+
{{- $contributorDict = set $contributorDict $author $contributionList }}
91+
{{- end }}
92+
{{- end }}
93+
{{- end }}
94+
{{- end }}
95+
{{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}}
96+
{{- if $contributorDict}}
97+
### Contributors
98+
{{- range $k,$v := $contributorDict }}
99+
- [@{{$k}}](https://github.com/{{$k}}){{ if $v }} ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}}){{ end }}
100+
{{- end }}
101+
{{- end }}

.coveragerc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[run]
2+
source =
3+
src
4+
omit =
5+
*/tests/*
6+
*/__init__.py
7+
8+
[report]
9+
exclude_lines =
10+
pragma: no cover
11+
def __repr__
12+
raise NotImplementedError
13+
if __name__ == .__main__.:
14+
pass
15+
raise ImportError
16+
except ImportError

.github/copilot-instructions.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# deltastream driver
2+
# Project Context
3+
A Python client library for [DeltaStream](https://deltastream.io) - a SQL streaming processing engine based on Apache Flink.
4+
# Code Style and Structure
5+
- Write concise, technical Python, SQL or Jinja code with accurate examples
6+
- Use functional and declarative programming patterns; avoid classes
7+
- Prefer iteration and modularization over code duplication
8+
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
9+
- Structure repository files as follows:
10+
.
11+
├── src/ # Source code root directory
12+
│ └── deltastream/ # Main package namespace
13+
│ └── api/ # API client implementation
14+
15+
└── tests/ # Test suite root directory
16+
└── api/ # API tests
17+
├── controlplane/ # Tests for control plane operations
18+
└── dataplane/ # Tests for data plane operations
19+
20+
# Build and project setup
21+
The project is using `uv` for dependency management. You can find the lockfile in `uv.lock`.
22+
To run tests, use `uv run pytest <path_to_test>`.
23+
To add dependencies use `uv add <package>`.
24+
Dependency resolution is done using `uv sync`.
25+
Dependencies are specified in `pyproject.toml`.
26+
Dependencies are installed in `./.venv`.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Changelog release
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ CHANGELOG.md ]
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Get the latest version
16+
id: latest
17+
uses: miniscruff/changie-action@v2
18+
with:
19+
version: latest
20+
args: latest
21+
22+
- name: Release
23+
uses: softprops/action-gh-release@v2
24+
with:
25+
body_path: ".changes/${{ steps.latest.outputs.output }}.md"
26+
tag_name: "${{ steps.latest.outputs.output }}"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Generate Release PR
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
generate-pr:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Batch changes
14+
uses: miniscruff/changie-action@v2
15+
with:
16+
version: latest
17+
args: batch auto
18+
19+
- name: Merge changes
20+
uses: miniscruff/changie-action@v2
21+
with:
22+
version: latest
23+
args: merge
24+
25+
- name: Get the latest version
26+
id: latest
27+
uses: miniscruff/changie-action@v2
28+
with:
29+
version: latest
30+
args: latest
31+
32+
- name: Create Pull Request
33+
uses: peter-evans/create-pull-request@v4
34+
with:
35+
title: Release ${{ steps.latest.outputs.output }}
36+
branch: release/${{ steps.latest.outputs.output }}
37+
commit-message: Release ${{ steps.latest.outputs.output }}

0 commit comments

Comments
 (0)