Skip to content

Commit

Permalink
Repo maintenance (#10)
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>

---------

Signed-off-by: Rajvaibhav Rahane <rrahane@amazon.com>
  • Loading branch information
Rajrahane authored Feb 25, 2025
1 parent 69b5ae9 commit cd6d8d0
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ coverage:
threshold: 2% # the leniency in hitting the target

ignore:
- '**/tests/*.py'
- '**/tests/*.py'
- 'test_remote-vector-index-builder/'
13 changes: 13 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
max-line-length = 120

extend-ignore =
E203,
W503
exclude =
.git,
__pycache__,

# Output formatting
statistics = True
count = True
show-source = True
56 changes: 56 additions & 0 deletions .github/workflows/remote-vector-index-builder/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/
Empty file.
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

0 comments on commit cd6d8d0

Please sign in to comment.