Skip to content

Commit

Permalink
Bug: Repo maintenance (#14)
Browse files Browse the repository at this point in the history
* Add Initial Repo Maintenance Files.

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* add github templates, workflows, codeowners

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* Add RELEASING.md and .codecov.yml

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* Add Test CI

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* fix: add pytest to test requirements

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* bug: move run-tests.yml to base workflows folder

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* nit: resolve lint errors

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* nit: resolve mypy errors

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* nit: resolve rename errors in run-tests.py

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* add test placeholder

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* add test placeholder

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* Change test config to setup.cfg

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* nit: delete renamed folders, fix placeholder test

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* Add Test CI

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* fix: add pytest to test requirements

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* bug: move run-tests.yml to base workflows folder

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* nit: resolve lint errors

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* nit: resolve mypy errors

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* nit: resolve rename errors in run-tests.py

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* add test placeholder

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* add test placeholder

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* Repo maintenance (#10)

* Add Initial Repo Maintenance Files.

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* add github templates, workflows, codeowners

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* Add RELEASING.md and .codecov.yml

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* Add Test CI

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* fix: add pytest to test requirements

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

---------

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* Change test config to setup.cfg

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

* nit: delete renamed folders, fix placeholder test

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>

---------

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>
  • Loading branch information
Rajrahane authored Feb 26, 2025
1 parent cd6d8d0 commit 065a7ea
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 7 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Run tests for Remote-Vector-Index-Builder

on:
push:
paths: # Note this is done for folder specific checkouts, reduce CI memory load
- 'remote_vector_index_builder/**'
- 'test_remote_vector_index_builder/**'
pull_request:
paths: # Note this is done for folder specific checkouts, reduce CI memory load
- 'remote_vector_index_builder/**'
- 'test_remote_vector_index_builder/**'

permissions:
contents: read

jobs:
run-tests:
name: Run tests for Remote-Vector-Index-Builder
runs-on: ubuntu-latest
if: github.repository == 'opensearch-project/remote-vector-index-builder'

steps:
# https://github.com/actions/checkout?tab=readme-ov-file#usage
- name: Checkout code
uses: actions/checkout@v4
with:
# Note this is done for folder specific checkouts, reduce CI memory load
sparse-checkout: |
.github/CODEOWNERS
remote_vector_index_builder
test_remote_vector_index_builder
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r remote_vector_index_builder/core/requirements.txt
python -m pip install -r test_remote_vector_index_builder/requirements.txt
- name: Run Linting - flake8
run: |
python -m flake8 remote_vector_index_builder/ test_remote_vector_index_builder/
- name: Run Formatter - black
run: |
python -m black --check remote_vector_index_builder/ test_remote_vector_index_builder/
- name: Run Type Checker - mypy
run: |
python -m mypy remote_vector_index_builder/ test_remote_vector_index_builder/
- name: Run tests
run: |
python -m pytest test_remote_vector_index_builder/
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
# compatible open source license.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
# compatible open source license.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
# compatible open source license.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
# compatible open source license.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
# compatible open source license.
7 changes: 6 additions & 1 deletion .flake8 → setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[flake8]
max-line-length = 120

extend-ignore =
Expand All @@ -10,4 +11,8 @@ exclude =
# Output formatting
statistics = True
count = True
show-source = True
show-source = True

[black]
max-line-length = 120
target-version = 'py38'
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
# compatible open source license.
5 changes: 5 additions & 0 deletions test_remote_vector_index_builder/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
black>=25.1.0,<26.0.0
flake8>=7.1.0,<8.0.0
isort>=6.0.0,<7.0.0
mypy>=1.15.0,<2.0.0
pytest>=8.0.0,<9.0.0
10 changes: 10 additions & 0 deletions test_remote_vector_index_builder/test_placeholder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.


def test_placeholder():
assert 1 + 1 == 2

0 comments on commit 065a7ea

Please sign in to comment.