-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from FelixNgFender/main
4 Data modalities, python typings, python testing and CLI, client multithreading for send function
- Loading branch information
Showing
251 changed files
with
17,049 additions
and
10,568 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,75 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# security: restrict permissions for CI jobs. | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
server-ci: | ||
name: Server CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Python | ||
id: install_python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: "1.8.3" | ||
|
||
- name: Setup a local virtual environment (if no poetry.toml file) | ||
working-directory: ./python | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- name: Restore cached virtualenv | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./python/.venv | ||
key: venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }} | ||
|
||
- name: Install dependencies (used by later workflows) | ||
working-directory: ./python | ||
run: | | ||
poetry install | ||
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH | ||
echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV | ||
- name: Saved cached virtualenv | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ./python/.venv | ||
key: venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }} | ||
|
||
- name: Lint with ruff | ||
working-directory: ./python | ||
run: ruff check --output-format=github | ||
|
||
- name: Typecheck with pyright | ||
working-directory: ./python | ||
run: pyright arflow | ||
|
||
- name: Test with pytest | ||
working-directory: ./python | ||
timeout-minutes: 5 # pytest sometimes hangs for (yet) unknown reasons | ||
# TODO: Add coverage tracking once we have a stable test suite | ||
run: | | ||
pytest |
This file was deleted.
Oops, something went wrong.
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,65 @@ | ||
name: Pre-release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Release package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Python | ||
id: install_python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: "1.8.3" | ||
|
||
- name: Setup a local virtual environment (if no poetry.toml file) | ||
working-directory: ./python | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- name: Restore cached virtualenv | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./python/.venv | ||
key: venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }} | ||
|
||
- name: Install dependencies (skipped if cache hit, fallback to install) | ||
working-directory: ./python | ||
run: | | ||
poetry install | ||
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH | ||
echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV | ||
- name: Saved cached virtualenv | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ./python/.venv | ||
key: venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }} | ||
|
||
- name: Configure Test PyPI with Poetry | ||
working-directory: ./python | ||
run: | | ||
poetry config repositories.testpypi https://test.pypi.org/legacy/ | ||
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
- name: Build and publish the package | ||
working-directory: ./python | ||
run: poetry publish --build -r testpypi |
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,76 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Release package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Python | ||
id: install_python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: "1.8.3" | ||
|
||
- name: Setup a local virtual environment (if no poetry.toml file) | ||
working-directory: ./python | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- name: Restore cached virtualenv | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./python/.venv | ||
key: venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }} | ||
|
||
- name: Install dependencies (skipped if cache hit, fallback to install) | ||
working-directory: ./python | ||
run: | | ||
poetry install | ||
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH | ||
echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV | ||
- name: Saved cached virtualenv | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ./python/.venv | ||
key: venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }} | ||
|
||
- name: Use PyPI API token | ||
working-directory: ./python | ||
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
- name: Build and publish the package | ||
working-directory: ./python | ||
run: poetry publish --build | ||
|
||
- name: Upload Python package to GitHub | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./python/dist/ | ||
if-no-files-found: error | ||
|
||
publish-docs: | ||
name: Publish documentation | ||
permissions: | ||
pages: write | ||
id-token: write | ||
uses: ./.github/workflows/publish-docs.yml |
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,19 @@ | ||
name: Update contributors | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
contrib-readme-job: | ||
runs-on: ubuntu-latest | ||
name: A job to automate contrib in readme | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Contribute List | ||
uses: akhilmhdh/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.