-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update typecheck directories Add pre-commit config Fix pre-commit failures
- Loading branch information
Showing
15 changed files
with
159 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Formatting | ||
|
||
on: | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build: | ||
name: Formatting | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.9 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
id: setup_python | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Upgrade pip & install requirements | ||
run: | | ||
pip install pre-commit | ||
- name: Formatting | ||
run: | | ||
pre-commit run --all-files |
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,64 @@ | ||
name: "Test" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
# Always run when workflow configs change | ||
- ".github/workflows/**" | ||
# Run when package changes | ||
- "**" | ||
release: | ||
types: [published] | ||
|
||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
# Always run when workflow configs change | ||
- ".github/workflows/**" | ||
# Run when package changes | ||
- "**" | ||
|
||
workflow_dispatch: {} | ||
|
||
jobs: | ||
|
||
test_client: | ||
runs-on: large | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.9 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
id: setup_python | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
cache-dependency-path: | | ||
poetry.lock | ||
- name: Install dependencies (tests) | ||
run: | | ||
pip install pytest pytest-asyncio pytest-mock requests-mock | ||
- name: Install dependencies | ||
working-directory: . | ||
run: | | ||
pip install -e . | ||
- name: Run tests | ||
working-directory: . | ||
run: | | ||
echo $COHERE_API_KEY | ||
pytest -sv tests/test_compass_client.py |
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,35 @@ | ||
name: Typecheck | ||
|
||
on: | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
typecheck: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.11 | ||
package: | ||
- . | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
cache-dependency-path: | | ||
${{ matrix.package }}/poetry.lock | ||
- name: Install dependencies | ||
working-directory: ${{ matrix.package }} | ||
run: | | ||
pip install -e . | ||
- uses: jakebailey/pyright-action@v2 | ||
with: | ||
working-directory: ${{ matrix.package }} |
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,16 @@ | ||
repos: | ||
- repo: https://github.com/pycqa/isort | ||
rev: "5.13.2" | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files", "--line-length", "120", "--py", "39"] | ||
- repo: https://github.com/psf/black | ||
rev: "24.4.0" | ||
hooks: | ||
- id: black | ||
args: ["--line-length=120", "--target-version=py39"] | ||
- repo: https://github.com/pycqa/autoflake | ||
rev: "v2.3.1" | ||
hooks: | ||
- id: autoflake | ||
args: ["--in-place", "--remove-all-unused-imports", "--expand-star-imports", "--ignore-init-module-imports", "-r"] |
Validating CODEOWNERS rules …
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 @@ | ||
* @cohere-ai/compass |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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