Skip to content

Commit 065a7ea

Browse files
authored
Bug: Repo maintenance (#14)
* Add Initial Repo Maintenance Files. Signed-off-by: Rajvaibhav Rahane <[email protected]> * add github templates, workflows, codeowners Signed-off-by: Rajvaibhav Rahane <[email protected]> * Add RELEASING.md and .codecov.yml Signed-off-by: Rajvaibhav Rahane <[email protected]> * Add Test CI Signed-off-by: Rajvaibhav Rahane <[email protected]> * fix: add pytest to test requirements Signed-off-by: Rajvaibhav Rahane <[email protected]> * bug: move run-tests.yml to base workflows folder Signed-off-by: Rajvaibhav Rahane <[email protected]> * nit: resolve lint errors Signed-off-by: Rajvaibhav Rahane <[email protected]> * nit: resolve mypy errors Signed-off-by: Rajvaibhav Rahane <[email protected]> * nit: resolve rename errors in run-tests.py Signed-off-by: Rajvaibhav Rahane <[email protected]> * add test placeholder Signed-off-by: Rajvaibhav Rahane <[email protected]> * add test placeholder Signed-off-by: Rajvaibhav Rahane <[email protected]> * Change test config to setup.cfg Signed-off-by: Rajvaibhav Rahane <[email protected]> * nit: delete renamed folders, fix placeholder test Signed-off-by: Rajvaibhav Rahane <[email protected]> * Add Test CI Signed-off-by: Rajvaibhav Rahane <[email protected]> * fix: add pytest to test requirements Signed-off-by: Rajvaibhav Rahane <[email protected]> * bug: move run-tests.yml to base workflows folder Signed-off-by: Rajvaibhav Rahane <[email protected]> * nit: resolve lint errors Signed-off-by: Rajvaibhav Rahane <[email protected]> * nit: resolve mypy errors Signed-off-by: Rajvaibhav Rahane <[email protected]> * nit: resolve rename errors in run-tests.py Signed-off-by: Rajvaibhav Rahane <[email protected]> * add test placeholder Signed-off-by: Rajvaibhav Rahane <[email protected]> * add test placeholder Signed-off-by: Rajvaibhav Rahane <[email protected]> * Repo maintenance (#10) * Add Initial Repo Maintenance Files. Signed-off-by: Rajvaibhav Rahane <[email protected]> * add github templates, workflows, codeowners Signed-off-by: Rajvaibhav Rahane <[email protected]> * Add RELEASING.md and .codecov.yml Signed-off-by: Rajvaibhav Rahane <[email protected]> * Add Test CI Signed-off-by: Rajvaibhav Rahane <[email protected]> * fix: add pytest to test requirements Signed-off-by: Rajvaibhav Rahane <[email protected]> --------- Signed-off-by: Rajvaibhav Rahane <[email protected]> * Change test config to setup.cfg Signed-off-by: Rajvaibhav Rahane <[email protected]> * nit: delete renamed folders, fix placeholder test Signed-off-by: Rajvaibhav Rahane <[email protected]> --------- Signed-off-by: Rajvaibhav Rahane <[email protected]>
1 parent cd6d8d0 commit 065a7ea

File tree

12 files changed

+83
-7
lines changed

12 files changed

+83
-7
lines changed

.github/workflows/run-tests.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Run tests for Remote-Vector-Index-Builder
2+
3+
on:
4+
push:
5+
paths: # Note this is done for folder specific checkouts, reduce CI memory load
6+
- 'remote_vector_index_builder/**'
7+
- 'test_remote_vector_index_builder/**'
8+
pull_request:
9+
paths: # Note this is done for folder specific checkouts, reduce CI memory load
10+
- 'remote_vector_index_builder/**'
11+
- 'test_remote_vector_index_builder/**'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
run-tests:
18+
name: Run tests for Remote-Vector-Index-Builder
19+
runs-on: ubuntu-latest
20+
if: github.repository == 'opensearch-project/remote-vector-index-builder'
21+
22+
steps:
23+
# https://github.com/actions/checkout?tab=readme-ov-file#usage
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
# Note this is done for folder specific checkouts, reduce CI memory load
28+
sparse-checkout: |
29+
.github/CODEOWNERS
30+
remote_vector_index_builder
31+
test_remote_vector_index_builder
32+
- name: Setup Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.11'
36+
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
python -m pip install -r remote_vector_index_builder/core/requirements.txt
41+
python -m pip install -r test_remote_vector_index_builder/requirements.txt
42+
43+
- name: Run Linting - flake8
44+
run: |
45+
python -m flake8 remote_vector_index_builder/ test_remote_vector_index_builder/
46+
47+
- name: Run Formatter - black
48+
run: |
49+
python -m black --check remote_vector_index_builder/ test_remote_vector_index_builder/
50+
51+
- name: Run Type Checker - mypy
52+
run: |
53+
python -m mypy remote_vector_index_builder/ test_remote_vector_index_builder/
54+
- name: Run tests
55+
run: |
56+
python -m pytest test_remote_vector_index_builder/

test_remote-vector-index-builder/__init__.py renamed to remote_vector_index_builder/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# The OpenSearch Contributors require contributions made to
55
# this file be licensed under the Apache-2.0 license or a
6-
# compatible open source license.
6+
# compatible open source license.

remote-vector-index-builder/__init__.py renamed to remote_vector_index_builder/core/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# The OpenSearch Contributors require contributions made to
55
# this file be licensed under the Apache-2.0 license or a
6-
# compatible open source license.
6+
# compatible open source license.

remote-vector-index-builder/core/main.py renamed to remote_vector_index_builder/core/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# The OpenSearch Contributors require contributions made to
55
# this file be licensed under the Apache-2.0 license or a
6-
# compatible open source license.
6+
# compatible open source license.

remote-vector-index-builder/core/__init__.py renamed to remote_vector_index_builder/testing_api/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# The OpenSearch Contributors require contributions made to
55
# this file be licensed under the Apache-2.0 license or a
6-
# compatible open source license.
6+
# compatible open source license.

remote-vector-index-builder/testing_api/app.py renamed to remote_vector_index_builder/testing_api/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# The OpenSearch Contributors require contributions made to
55
# this file be licensed under the Apache-2.0 license or a
6-
# compatible open source license.
6+
# compatible open source license.

.flake8 renamed to setup.cfg

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[flake8]
12
max-line-length = 120
23

34
extend-ignore =
@@ -10,4 +11,8 @@ exclude =
1011
# Output formatting
1112
statistics = True
1213
count = True
13-
show-source = True
14+
show-source = True
15+
16+
[black]
17+
max-line-length = 120
18+
target-version = 'py38'

remote-vector-index-builder/testing_api/__init__.py renamed to test_remote_vector_index_builder/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# The OpenSearch Contributors require contributions made to
55
# this file be licensed under the Apache-2.0 license or a
6-
# compatible open source license.
6+
# compatible open source license.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
black>=25.1.0,<26.0.0
2+
flake8>=7.1.0,<8.0.0
3+
isort>=6.0.0,<7.0.0
4+
mypy>=1.15.0,<2.0.0
5+
pytest>=8.0.0,<9.0.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright OpenSearch Contributors
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# The OpenSearch Contributors require contributions made to
5+
# this file be licensed under the Apache-2.0 license or a
6+
# compatible open source license.
7+
8+
9+
def test_placeholder():
10+
assert 1 + 1 == 2

0 commit comments

Comments
 (0)