riffq 0.1.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.
Files changed (50) hide show
  1. riffq-0.1.0/.github/workflows/build-release.yml +71 -0
  2. riffq-0.1.0/.github/workflows/ci.yml +52 -0
  3. riffq-0.1.0/.gitignore +12 -0
  4. riffq-0.1.0/Cargo.lock +4600 -0
  5. riffq-0.1.0/Cargo.toml +43 -0
  6. riffq-0.1.0/LICENSE-APACHE +201 -0
  7. riffq-0.1.0/LICENSE-MIT +21 -0
  8. riffq-0.1.0/Makefile +11 -0
  9. riffq-0.1.0/PKG-INFO +162 -0
  10. riffq-0.1.0/README.md +152 -0
  11. riffq-0.1.0/agents.md +10 -0
  12. riffq-0.1.0/duckdb_arrow_sample.py +22 -0
  13. riffq-0.1.0/duckdb_pgcatalog/certs/server.crt +19 -0
  14. riffq-0.1.0/duckdb_pgcatalog/certs/server.key +28 -0
  15. riffq-0.1.0/duckdb_pgcatalog/server.py +137 -0
  16. riffq-0.1.0/duckdb_pgcatalog/test_duckdb_catalog.py +52 -0
  17. riffq-0.1.0/example/certs/server.crt +19 -0
  18. riffq-0.1.0/example/certs/server.key +28 -0
  19. riffq-0.1.0/example/convert_csv_to_parquet.py +7 -0
  20. riffq-0.1.0/example/fetch_binance_data.sh +39 -0
  21. riffq-0.1.0/example/pg_duckdb.py +69 -0
  22. riffq-0.1.0/integrate_pg_catalog.md +57 -0
  23. riffq-0.1.0/prep-codex.sh +3 -0
  24. riffq-0.1.0/pyproject.toml +15 -0
  25. riffq-0.1.0/pysrc/riffq/__init__.py +6 -0
  26. riffq-0.1.0/pysrc/riffq/connection.py +77 -0
  27. riffq-0.1.0/pysrc/riffq/helpers.py +21 -0
  28. riffq-0.1.0/requirements.txt +9 -0
  29. riffq-0.1.0/src/helpers.rs +26 -0
  30. riffq-0.1.0/src/lib.rs +1450 -0
  31. riffq-0.1.0/src/pg/arrow_map.rs +141 -0
  32. riffq-0.1.0/src/pg/mod.rs +3 -0
  33. riffq-0.1.0/test_concurrency/server_duckdb.py +154 -0
  34. riffq-0.1.0/test_concurrency/server_duckdb_arrow.py +124 -0
  35. riffq-0.1.0/test_concurrency/server_polars.py +140 -0
  36. riffq-0.1.0/test_concurrency/test_concurrency_duckdb.py +71 -0
  37. riffq-0.1.0/test_concurrency/test_concurrency_duckdb_arrow.py +73 -0
  38. riffq-0.1.0/test_concurrency/test_concurrency_polars.py +66 -0
  39. riffq-0.1.0/test_concurrency/utils.py +22 -0
  40. riffq-0.1.0/tests/helpers.py +6 -0
  41. riffq-0.1.0/tests/test_connection_id.py +86 -0
  42. riffq-0.1.0/tests/test_on_authentication.py +64 -0
  43. riffq-0.1.0/tests/test_on_connect.py +56 -0
  44. riffq-0.1.0/tests/test_on_disconnect.py +67 -0
  45. riffq-0.1.0/tests/test_pg_catalog_query.py +133 -0
  46. riffq-0.1.0/tests/test_register_catalog.py +66 -0
  47. riffq-0.1.0/tests/test_server.py +148 -0
  48. riffq-0.1.0/tests/test_server_tls.py +80 -0
  49. riffq-0.1.0/try_extended_protocol_client.py +37 -0
  50. riffq-0.1.0/try_pg.py +44 -0
@@ -0,0 +1,71 @@
1
+ name: build-release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'release-*'
7
+
8
+ jobs:
9
+ build:
10
+ strategy:
11
+ matrix:
12
+ os: [ubuntu-latest, windows-latest, macos-latest]
13
+ runs-on: ${{ matrix.os }}
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: set-version
18
+ shell: bash
19
+ run: |
20
+ VERSION=${GITHUB_REF_NAME#release-}
21
+ python - "$VERSION" <<'PY'
22
+ import re, sys, pathlib
23
+ v = sys.argv[1]
24
+ p = pathlib.Path("Cargo.toml")
25
+ p.write_text(re.sub(r'^version\s*=.*$', f'version = "{v}"', p.read_text(), flags=re.M))
26
+ PY
27
+
28
+ - uses: PyO3/maturin-action@v1
29
+ with:
30
+ command: build
31
+ args: --release
32
+ - uses: actions/upload-artifact@v4
33
+ with:
34
+ name: wheels-${{ matrix.os }}
35
+ path: target/wheels/*.whl
36
+
37
+ sdist:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - run: |
42
+ VERSION=${GITHUB_REF_NAME#release-}
43
+ sed -i "s/^version = .*/version = \"${VERSION}\"/" Cargo.toml
44
+ - uses: PyO3/maturin-action@v1
45
+ with:
46
+ command: sdist
47
+ - uses: actions/upload-artifact@v4
48
+ with:
49
+ name: sdist
50
+ path: target/wheels/*.tar.gz
51
+
52
+ publish-pypi:
53
+ needs: [build, sdist]
54
+ runs-on: ubuntu-latest
55
+ permissions:
56
+ id-token: write
57
+ contents: read
58
+ steps:
59
+ - uses: actions/download-artifact@v4
60
+ with:
61
+ pattern: "wheels-*"
62
+ - uses: actions/download-artifact@v4
63
+ with:
64
+ pattern: "sdist"
65
+ - run: |
66
+ mkdir dist
67
+ find . -name '*.whl' -exec cp {} dist/ \;
68
+ find . -name '*.tar.gz' -exec cp {} dist/ \;
69
+ - uses: pypa/gh-action-pypi-publish@release/v1
70
+ with:
71
+ skip-existing: true
@@ -0,0 +1,52 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ pull_request:
7
+ branches: ["**"]
8
+
9
+ jobs:
10
+ unit-tests:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v3
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: '3.10'
19
+ - name: Cache cargo registry
20
+ uses: actions/cache@v3
21
+ with:
22
+ path: |
23
+ ~/.cargo/registry
24
+ ~/.cargo/git
25
+ target
26
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
27
+ restore-keys: ${{ runner.os }}-cargo-
28
+ - name: Set up Rust
29
+ uses: actions-rs/toolchain@v1
30
+ with:
31
+ toolchain: stable
32
+ profile: minimal
33
+ override: true
34
+ - name: Run Rust tests
35
+ run: cargo test --verbose
36
+ - name: Cache pip
37
+ uses: actions/cache@v3
38
+ with:
39
+ path: ~/.cache/pip
40
+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
41
+ restore-keys: ${{ runner.os }}-pip-
42
+ - name: Install Python dependencies
43
+ run: pip install -r requirements.txt
44
+ - name: Install maturin
45
+ run: pip install maturin
46
+ - name: Install wheel
47
+ run: pip install .
48
+ - name: Run Python unit tests
49
+ run: python -m unittest discover -s tests
50
+ - name: Run concurrency unit tests
51
+ run: python -m unittest discover -s test_concurrency
52
+
riffq-0.1.0/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ .idea/
2
+ .DS_Store/
3
+ target/
4
+ .DS_Store
5
+ /test_concurrency/duckdata.db
6
+ /test_concurrency/duckdata.db.wal
7
+ examples/
8
+ __pycache__/
9
+ venv/
10
+ duckdata.*
11
+ example/data/*
12
+ +riffq/_riffq*.so