Skip to content

Commit 933e436

Browse files
authored
Merge pull request #20 from stackql/feature/refactor
Feature/refactor
2 parents 3f6ea33 + 6d470c7 commit 933e436

File tree

13 files changed

+760
-381
lines changed

13 files changed

+760
-381
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: 'Run Async Server Tests'
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
jobs:
8+
run-tests:
9+
strategy:
10+
matrix:
11+
os:
12+
- ubuntu-latest
13+
# - windows-latest
14+
# - macos-latest
15+
python-version:
16+
- "3.7"
17+
- "3.8"
18+
- "3.9"
19+
- "3.10"
20+
- "3.11"
21+
- "3.12"
22+
exclude:
23+
- os: windows-latest
24+
python-version: "3.12"
25+
runs-on: ${{matrix.os}}
26+
name: 'Run Tests on ${{matrix.os}} with Python ${{matrix.python-version}}'
27+
28+
steps:
29+
- uses: actions/checkout@v3
30+
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install dependencies from requirements.txt
37+
shell: bash
38+
run: |
39+
python3 -m pip install --upgrade pip
40+
pip install -r requirements.txt
41+
42+
- name: Install psycopg2 for non-Windows OS
43+
if: matrix.os != 'windows-latest'
44+
run: |
45+
pip install psycopg2
46+
47+
# Windows specific
48+
# whl files downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg
49+
- name: Install psycopg2-binary for Windows using local wheel
50+
if: matrix.os == 'windows-latest'
51+
run: |
52+
# Determine the wheel filename based on the Python version
53+
$wheelFilename = switch ("${{ matrix.python-version }}") {
54+
"3.7" { "psycopg2-2.9.3-cp37-cp37m-win_amd64.whl" }
55+
"3.8" { "psycopg2-2.9.3-cp38-cp38-win_amd64.whl" }
56+
"3.9" { "psycopg2-2.9.3-cp39-cp39-win_amd64.whl" }
57+
"3.10" { "psycopg2-2.9.3-cp310-cp310-win_amd64.whl" }
58+
"3.11" { "psycopg2-2.9.3-cp311-cp311-win_amd64.whl" }
59+
}
60+
61+
# Print the wheel filename for debugging
62+
Write-Host "Determined wheel filename: $wheelFilename"
63+
64+
# Install the wheel
65+
pip install ./tests/whls/$wheelFilename
66+
shell: powershell
67+
# End Windows specific
68+
69+
- name: Install pystackql
70+
run: |
71+
pip install .
72+
73+
- name: Run tests
74+
env:
75+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
76+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
77+
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
78+
AWS_REGIONS: ${{ vars.AWS_REGIONS }}
79+
GCP_PROJECT: ${{ vars.GCP_PROJECT }}
80+
GCP_ZONE: ${{ vars.GCP_ZONE }}
81+
run: |
82+
python3 -m tests.pystackql_async_server_tests

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## v3.1.1 (2023-10-16)
4+
5+
### Updates
6+
7+
* updated class parameters
8+
* added additional tests
9+
310
## v3.0.0 (2023-10-11)
411

512
### Updates

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@ To publish the package to PyPI, run the following command:
193193

194194
::
195195

196-
twine upload dist/pystackql-3.0.0.tar.gz
196+
twine upload dist/pystackql-3.1.1.tar.gz

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = ''
2828
# The full version, including alpha/beta/rc tags
29-
release = '3.0.0'
29+
release = '3.1.1'
3030

3131

3232
# -- General configuration ---------------------------------------------------

pystackql/_util.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# import subprocess, platform, json, site, os, requests, zipfile, pkg_resources
2-
3-
# def _get_package_version(package_name):
4-
# try:
5-
# return pkg_resources.get_distribution(package_name).version
6-
# except pkg_resources.DistributionNotFound:
7-
# return None
8-
91
import subprocess, platform, json, site, os, requests, zipfile
102

113
# Conditional import for package metadata retrieval
@@ -143,6 +135,3 @@ def _format_auth(auth):
143135
error_message = e.args[0]
144136
print("ERROR: [_format_auth] %s" % (error_message))
145137
exit(1)
146-
147-
def _execute_queries_in_parallel(stackql_instance, queries):
148-
return [stackql_instance.execute(query) for query in queries]

0 commit comments

Comments
 (0)