forked from bchao1/bullet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Test Cases & Cache Updates (#18)
* adding caching usage * Addomg first test cases for Bullet class * Adding documentation to tests * Updating test script name to better match the class * Adding check tests * Adding documentation for check tests * first revision of tests for client * adding documentation to tests * Adding cursor tests * Adding keyhandler tests * Adding utils tests and updated getchar with optimizations/corrections * adding pytest to pre-commit and fixing the test file names * Adding validation workflow * adding pip install * removing caching for tests * Adding required packages * version bump
- Loading branch information
Showing
22 changed files
with
2,239 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
name: Validate definitions | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
format-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
id: setup_python | ||
with: | ||
python-version: '3.12' | ||
- name: cache virtualenv | ||
uses: actions/cache@v4 | ||
id: cache-venv | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}- | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
- name: Run Ruff Formatting and Checks | ||
uses: astral-sh/ruff-action@v3 | ||
with: | ||
args: "format --check" | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: [format-checks] | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
id: setup_python | ||
with: | ||
python-version: '3.12' | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
python -m pip install pytest-github-actions-annotate-failures | ||
python -m pip install . | ||
- name: Run Test Cases | ||
id: pytest | ||
run: pytest --tb=short -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ __pycache__/ | |
# C extensions | ||
*.so | ||
.DS_Store | ||
# Tests | ||
tests/ | ||
# Distribution / packaging | ||
.Python | ||
build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "tests"] | ||
path = tests | ||
url = https://github.com/danner26/BulletPrompt | ||
branch = master/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ dev = [ | |
"ruff", | ||
"pytest", | ||
"pre-commit", | ||
"pytest-mock", | ||
"uv", | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
pre_commit==4.1.0 | ||
pytest==8.3.4 | ||
pytest-mock==3.14.0 | ||
ruff==0.9.2 | ||
uv==0.5.22 |
Oops, something went wrong.