Skip to content

Commit d8f8f6e

Browse files
authored
Merge branch 'master' into dependabot/pip/black-24.3.0
2 parents d705e16 + 3e6687c commit d8f8f6e

File tree

66 files changed

+1902
-179
lines changed

Some content is hidden

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

66 files changed

+1902
-179
lines changed

.github/workflows/coverage_runner.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,28 @@ jobs:
2727
uses: hazelcast/hazelcast-tpm/membership@main
2828
with:
2929
organization-name: 'hazelcast'
30-
member-name: ${{ github.event.pull_request.head.repo.owner.login }}
30+
member-name: ${{ github.actor }}
3131
token: ${{ secrets.PAT }}
3232

33+
python-versions:
34+
uses: ./.github/workflows/get-python-versions.yml
35+
3336
run-tests:
3437
runs-on: ${{ matrix.os }}
35-
needs: [check_for_membership]
38+
needs: [check_for_membership, python-versions]
3639
if: github.event_name == 'push' || needs.check_for_membership.outputs.check-result == 'true' || github.event_name == 'workflow_dispatch'
3740
name: Run tests with Python ${{ matrix.python-version }} on ${{ matrix.os }}
3841
strategy:
3942
matrix:
40-
python-version: [ '3.6', '3.12' ]
41-
os: [ ubuntu-20.04, windows-latest ]
43+
python-version:
44+
- ${{ needs.python-versions.outputs.earliest-python-version }}
45+
- ${{ needs.python-versions.outputs.latest-python-version }}
46+
os: [ ubuntu-latest, windows-latest ]
4247
fail-fast: false
4348

4449
steps:
4550
- name: Setup Python
46-
uses: actions/setup-python@v2
51+
uses: actions/setup-python@v5
4752
with:
4853
python-version: ${{ matrix.python-version }}
4954

@@ -55,17 +60,17 @@ jobs:
5560

5661
- name: Checkout code for PR
5762
if: github.event_name == 'pull_request_target'
58-
uses: actions/checkout@v2
63+
uses: actions/checkout@v4
5964
with:
6065
ref: refs/pull/${{ github.event.pull_request.number }}/merge
6166

6267
- name: Checkout repository for push event
6368
if: github.event_name == 'push'
64-
uses: actions/checkout@v2
69+
uses: actions/checkout@v4
6570

6671
- name: Checkout PR coming from community.
6772
if: github.event_name == 'workflow_dispatch'
68-
uses: actions/checkout@v2
73+
uses: actions/checkout@v4
6974
with:
7075
ref: refs/pull/${{ github.event.inputs.pr_number }}/merge
7176

@@ -75,31 +80,33 @@ jobs:
7580
7681
- name: Run tests
7782
env:
78-
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }}
83+
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}
84+
HZ_SNAPSHOT_INTERNAL_USERNAME: ${{ secrets.HZ_SNAPSHOT_INTERNAL_USERNAME }}
85+
HZ_SNAPSHOT_INTERNAL_PASSWORD: ${{ secrets.HZ_SNAPSHOT_INTERNAL_PASSWORD }}
7986
run: python run_tests.py
8087

8188
- name: Publish results to Codecov for PR coming from hazelcast organization
82-
if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-20.04' && github.event_name == 'pull_request_target' }}
89+
if: ${{ matrix.python-version == needs.python-versions.outputs.latest-python-version && matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request_target' }}
8390
uses: codecov/codecov-action@v1
8491
with:
8592
files: ./coverage.xml
8693
override_pr: ${{ github.event.pull_request.number }}
8794

8895
- name: Publish results to Codecov for Push
89-
if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-20.04' && github.event_name == 'push' }}
96+
if: ${{ matrix.python-version == needs.python-versions.outputs.latest-python-version && matrix.os == 'ubuntu-latest' && github.event_name == 'push' }}
9097
uses: codecov/codecov-action@v1
9198
with:
9299
files: ./coverage.xml
93100

94101
- name: Publish result to Codecov for PR coming from community
95-
if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-20.04' && github.event_name == 'workflow_dispatch' }}
102+
if: ${{ matrix.python-version == needs.python-versions.outputs.latest-python-version && matrix.os == 'ubuntu-latest' && github.event_name == 'workflow_dispatch' }}
96103
uses: codecov/codecov-action@v1
97104
with:
98105
files: ./coverage.xml
99106
override_pr: ${{ github.event.inputs.pr_number }}
100107

101108
- name: Upload remote controller logs if test run fails
102-
uses: actions/upload-artifact@v2
109+
uses: actions/upload-artifact@v4
103110
if: failure()
104111
with:
105112
name: rc-logs-${{ matrix.python-version }}-${{ matrix.os }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Get Python versions
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
python-versions:
7+
value: ${{ jobs.get-python-versions.outputs.python-versions }}
8+
earliest-python-version:
9+
value: ${{ jobs.get-python-versions.outputs.earliest-python-version }}
10+
latest-python-version:
11+
value: ${{ jobs.get-python-versions.outputs.latest-python-version }}
12+
13+
jobs:
14+
get-python-versions:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
python-versions: ${{ steps.extract-versions.outputs.python-versions }}
18+
earliest-python-version: ${{ steps.extract-versions.outputs.earliest-python-version }}
19+
latest-python-version: ${{ steps.extract-versions.outputs.latest-python-version }}
20+
steps:
21+
- id: extract-versions
22+
run: |
23+
python_versions='[ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]'
24+
25+
echo "python-versions=${python_versions}" >> $GITHUB_OUTPUT
26+
echo "earliest-python-version=$(echo "${python_versions}" | jq --raw-output '.[0]')" >> $GITHUB_OUTPUT
27+
echo "latest-python-version=$(echo "${python_versions}" | jq --raw-output '.[-1]')" >> $GITHUB_OUTPUT
28+
- run: exit 0

.github/workflows/linter_docs_mypy.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@ on:
99
- master
1010
- '[45].*.z'
1111
jobs:
12+
python-versions:
13+
uses: ./.github/workflows/get-python-versions.yml
14+
1215
run-linter:
1316
runs-on: ubuntu-latest
17+
needs: python-versions
1418
name: Run black to check the code style
1519
steps:
1620
- name: Setup Python
17-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v5
1822
with:
19-
python-version: '3.11'
23+
python-version: ${{ needs.python-versions.outputs.latest-python-version }}
2024

2125
- name: Checkout to code
22-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
2327

2428
- name: Install dependencies
2529
run: |
@@ -31,15 +35,16 @@ jobs:
3135
3236
generate_docs:
3337
runs-on: ubuntu-latest
38+
needs: python-versions
3439
name: Generate documentation
3540
steps:
3641
- name: Setup Python
37-
uses: actions/setup-python@v2
42+
uses: actions/setup-python@v5
3843
with:
39-
python-version: '3.11'
44+
python-version: ${{ needs.python-versions.outputs.latest-python-version }}
4045

4146
- name: Checkout to code
42-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
4348

4449
- name: Install dependencies
4550
run: |
@@ -52,15 +57,16 @@ jobs:
5257
5358
run-mypy:
5459
runs-on: ubuntu-latest
60+
needs: python-versions
5561
name: Run mypy to check type annotations
5662
steps:
5763
- name: Setup Python
58-
uses: actions/setup-python@v2
64+
uses: actions/setup-python@v5
5965
with:
60-
python-version: '3.11'
66+
python-version: ${{ needs.python-versions.outputs.latest-python-version }}
6167

6268
- name: Checkout to code
63-
uses: actions/checkout@v2
69+
uses: actions/checkout@v4
6470

6571
- name: Install dependencies
6672
run: |

.github/workflows/nightly_runner.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ on:
44
schedule:
55
- cron: '0 2 * * *'
66
jobs:
7+
python-versions:
8+
uses: ./.github/workflows/get-python-versions.yml
9+
710
run-tests:
11+
needs: python-versions
812
runs-on: ${{ matrix.os }}
913
name: Run tests with Python ${{ matrix.python-version }} on ${{ matrix.os }}
1014
strategy:
1115
matrix:
12-
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.9']
13-
os: [ ubuntu-20.04, windows-latest ]
14-
exclude:
15-
- os: windows-latest
16-
python-version: pypy-3.9
16+
python-version: ${{ fromJSON(needs.python-versions.outputs.python-versions) }}
17+
os: [ ubuntu-latest, windows-latest ]
1718
fail-fast: false
1819
steps:
1920
- name: Setup Python
20-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
2122
with:
2223
python-version: ${{ matrix.python-version }}
2324
- name: Install JDK
@@ -26,16 +27,18 @@ jobs:
2627
distribution: 'temurin'
2728
java-version: '17'
2829
- name: Checkout to code
29-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3031
- name: Install dependencies
3132
run: |
3233
pip install -r requirements-test.txt
3334
- name: Run tests
3435
env:
35-
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }}
36+
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}
37+
HZ_SNAPSHOT_INTERNAL_USERNAME: ${{ secrets.HZ_SNAPSHOT_INTERNAL_USERNAME }}
38+
HZ_SNAPSHOT_INTERNAL_PASSWORD: ${{ secrets.HZ_SNAPSHOT_INTERNAL_PASSWORD }}
3639
run: python run_tests.py
3740
- name: Upload remote controller logs on test failure
38-
uses: actions/upload-artifact@v2
41+
uses: actions/upload-artifact@v4
3942
if: failure()
4043
with:
4144
name: rc-logs-${{ matrix.python-version }}-${{ matrix.os }}

.readthedocs.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: latest
10+
11+
sphinx:
12+
configuration: docs/conf.py
13+
14+
python:
15+
install:
16+
- requirements: requirements-dev.txt

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ check:
55
black --check --config black.toml .
66

77
test:
8+
pytest -m "not enterprise"
9+
10+
test-enterprise:
811
pytest
912

1013
test-cover:

README.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ Features
143143
- Distributed, CRDT based counter, called **PNCounter**
144144
- Distributed concurrency primitives from CP Subsystem such as
145145
**FencedLock**, **Semaphore**, **AtomicLong**
146-
- Integration with `Hazelcast Viridian <https://viridian.hazelcast.com/>`__
146+
- Similarity search using **VectorCollection** (Beta)
147+
- Integration with `Hazelcast Cloud <https://cloud.hazelcast.com/>`__
147148
- Support for serverless and traditional web service architectures with
148149
**Unisocket** and **Smart** operation modes
149150
- Ability to listen to client lifecycle, cluster state, and distributed
@@ -161,9 +162,6 @@ development/usage issues:
161162
repository <https://github.com/hazelcast/hazelcast-python-client/issues/new>`__
162163
- `Documentation <https://hazelcast.readthedocs.io>`__
163164
- `Slack <https://slack.hazelcast.com>`__
164-
- `Google Groups <https://groups.google.com/g/hazelcast>`__
165-
- `Stack
166-
Overflow <https://stackoverflow.com/questions/tagged/hazelcast>`__
167165

168166
Contributing
169167
------------
@@ -218,11 +216,18 @@ following:
218216
- `Supported Java virtual machine <https://docs.hazelcast.com/hazelcast/latest/deploy/versioning-compatibility#supported-java-virtual-machines>`
219217
- `Apache Maven <https://maven.apache.org/>`
220218

221-
Following commands starts the tests:
219+
Set the environment variables for credentials:
222220

223221
.. code:: bash
224222
225-
python run_tests.py
223+
export HZ_SNAPSHOT_INTERNAL_USERNAME=YOUR_MAVEN_USERNAME
224+
export HZ_SNAPSHOT_INTERNAL_PASSWORD=YOUR_MAVEN_PASSWORD
225+
226+
Following command starts the tests:
227+
228+
.. code:: bash
229+
230+
python3 run_tests.py
226231
227232
Test script automatically downloads ``hazelcast-remote-controller`` and
228233
Hazelcast. The script uses Maven to download those.
@@ -235,7 +240,7 @@ License
235240
Copyright
236241
---------
237242

238-
Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved.
243+
Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved.
239244

240245
Visit `hazelcast.com <https://hazelcast.com>`__ for more
241246
information.

0 commit comments

Comments
 (0)