Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 Data modalities, python typings, python testing and CLI, client multithreading for send function #18

Merged
merged 77 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
80c94c4
refactor(server): (VERY WIP) initial Python typings
FelixNgFender Sep 21, 2024
8ff1e77
fix(server): hashable client identifier
FelixNgFender Sep 21, 2024
21b7152
feat(client): sync with new schema changes
FelixNgFender Sep 21, 2024
326deef
docs(server): surface public API
FelixNgFender Sep 21, 2024
2c26935
chore(server): remove version-specific stuff
FelixNgFender Sep 21, 2024
ce0a890
docs(server): adopt Google `pydocstyle` format
FelixNgFender Sep 25, 2024
b0dbe1f
feat(server): proper graceful shutdown handling
FelixNgFender Sep 25, 2024
7909b24
refactor(server): use `strict` mode for `pyright`
FelixNgFender Sep 25, 2024
30d1b1c
fix(examples): (WIP) sync examples with new server API
FelixNgFender Sep 25, 2024
ccef17c
docs(examples): sync simple example with new server API (replay still…
FelixNgFender Sep 25, 2024
629637b
ci: new workflow for code quality & tests
FelixNgFender Sep 25, 2024
3dd207f
ci: add sample Python test to pass CI
FelixNgFender Sep 25, 2024
4654cf7
ci: keeps CI reproducible
FelixNgFender Sep 25, 2024
340c661
ci: install dev & docs dependencies beforehand to cache
FelixNgFender Sep 25, 2024
067ff9d
ci: install all dependencies beforehand for caching
FelixNgFender Sep 25, 2024
61bd772
ci: fix dumb caching mistake
FelixNgFender Sep 25, 2024
6be4077
ci: install docs deps in case cache miss
FelixNgFender Sep 25, 2024
7b242f8
chore: consolidate `.gitignore` files
FelixNgFender Sep 25, 2024
6faf73c
docs: sync simple example in top-level `README.md`
FelixNgFender Sep 25, 2024
10ce041
chore(server): add `pytest-randomly`
FelixNgFender Sep 25, 2024
097e59f
build(server): formalize public API
FelixNgFender Sep 26, 2024
2d99893
fix(client): sync new location of gRPC schema
FelixNgFender Sep 26, 2024
6a2b967
ci: new release workflow on tag
FelixNgFender Sep 26, 2024
b63f05a
feat(server): prefer `mypy-protobuf` plugin output over built-in `--p…
FelixNgFender Sep 26, 2024
0719c53
ci: fix permissions to publish docs
FelixNgFender Sep 26, 2024
c3f6463
ci: fix permissions to publish docs
FelixNgFender Sep 26, 2024
e3a6eef
ci: fix permissions to publish docs
FelixNgFender Sep 26, 2024
b5f1b69
ci: add new `pre-release` to Test PyPI workflow
FelixNgFender Sep 26, 2024
29370ce
ci: don't publish docs in pre-release
FelixNgFender Sep 26, 2024
7bd03fa
fix(server): allow partial data in decoded data frame
FelixNgFender Sep 26, 2024
028e484
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] Sep 26, 2024
72e779d
ci: upload Python package to GitHub once released
FelixNgFender Sep 30, 2024
5c219b5
feat(server): exception and error logger interceptors
FelixNgFender Sep 30, 2024
2747526
Merge from upstream + recompile proto files
legoeruro Oct 1, 2024
ba14c88
oh and i forgot about this: actually recompiling protoc
legoeruro Oct 1, 2024
63438f7
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] Oct 1, 2024
f24be16
my bad g
legoeruro Oct 1, 2024
f76f362
my bad g 2: breaking good
legoeruro Oct 1, 2024
8bf2fd1
Feature: Audio modality, sending is coupled with other data modalities
legoeruro Oct 3, 2024
d247449
feat(server): additional arguments to `serve` CLI command
FelixNgFender Oct 3, 2024
5c119e0
Feat (WIP): AR Meshing and Draco compression/decompression
legoeruro Oct 4, 2024
a0116ae
ci(server): new testing infra
FelixNgFender Oct 4, 2024
46a9f4e
feat(server): revamp `arflow` CLI
FelixNgFender Oct 4, 2024
ea52bb7
test(server): basic coverage of gRPC service, decoding, CLI, hooks, &…
FelixNgFender Oct 4, 2024
1e958c0
ci(server): prevents `pytest` hangs with timeout
FelixNgFender Oct 4, 2024
063adcf
feat(server): proper logging in place of `print()`
FelixNgFender Oct 4, 2024
59438f8
feat(server): expose log level controls to CLI
FelixNgFender Oct 4, 2024
1696141
Feat (WIP): Plane manager modality, and add package in Unity for AR s…
legoeruro Oct 4, 2024
a4a034a
Fix: Issue with mesh drawing and remove debug comments
legoeruro Oct 4, 2024
901f27d
Fix: Audio not working on mobile devices
legoeruro Oct 4, 2024
bbde0c8
Chore: Modify plane method to clear out old planes
legoeruro Oct 4, 2024
03445a6
fix(server): CLI only allows either `debug` or `verbose`
FelixNgFender Oct 5, 2024
f85ac52
docs(server): simplify getting started UX with CLI & simple example
FelixNgFender Oct 5, 2024
e0c49af
Merge remote-tracking branch 'origin/main' into non-streaming-data-mo…
legoeruro Oct 8, 2024
db22b7b
Chore: List Typings
legoeruro Oct 8, 2024
6204180
Merge pull request #2 from FelixNgFender/non-streaming-data-modalities
legoeruro Oct 8, 2024
8654013
Test: convert_2d_to_3d
legoeruro Oct 8, 2024
1d0f41e
test(server): integration tests with stub for vanilla gRPC server
FelixNgFender Oct 9, 2024
ed03694
refactor(server): move function to do 2d-to-3d conversion of boundary…
FelixNgFender Oct 9, 2024
8ec2104
refactor(server): unify typing for 3D boundary points
FelixNgFender Oct 9, 2024
3a22251
Feat: Asynchronous gRPC (and also Merge branch 'main' of https://gith…
legoeruro Oct 9, 2024
c6aa430
Fix: Modify decoding to throw when input values are of wrong format
legoeruro Oct 9, 2024
670b55b
refactor: conforming to gRPC schema best practices
FelixNgFender Oct 10, 2024
4c77fa3
Fix: error with attitute data being of wrong shape
legoeruro Oct 10, 2024
e1c8a85
Fix: Build errors, connection status errors, and added assembly defs…
legoeruro Oct 10, 2024
4cd7f71
test(server): plane detection, gyroscope, audio, and meshing
FelixNgFender Oct 10, 2024
8ffc737
chore: centralize build script
FelixNgFender Oct 21, 2024
beb8d4a
Chore: use interface for audio impl, change logging to only for debug…
legoeruro Oct 23, 2024
c4281ca
Chore: logging when debugging mode in UnityDataSample file
legoeruro Oct 23, 2024
4a5fcac
Chores: Change namings, add interfaces for outside package installed …
legoeruro Oct 23, 2024
5302096
refactor(server): replace `os` with `pathlib` for modern path handling
FelixNgFender Oct 24, 2024
ff40ec9
Packaging: Initial Unity Package
legoeruro Oct 24, 2024
dc011a1
Chore: Remove interfaces, and add files for packaging
legoeruro Oct 24, 2024
9a64dd8
Chore: Update Unity's README for package installation
legoeruro Oct 24, 2024
de822f7
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] Oct 24, 2024
0f7da5c
Chore: fix installation link to cake-lab
legoeruro Oct 24, 2024
7b16f31
Merge branch 'main' of https://github.com/FelixNgFender/ARFlow
legoeruro Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
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
17 changes: 0 additions & 17 deletions .github/workflows/main.yml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/pre-release.yml
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
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
name: Publish docs

on:
# Runs on pushes targeting the default branch
push:
branches:
- main
paths:
- 'python/**'
- '.github/workflows/website.yml'
- 'website/**'
- 'unity/**'

# Alternative: only build for tags.
# tags:
# - '*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
workflow_call:

# security: restrict permissions for CI jobs.
permissions:
contents: read
pages: write
id-token: write

jobs:
build-client-docs-as-artifact:
name: Build client docs
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -47,41 +34,52 @@ jobs:
path: ./unity/Documentation/clientHTMLOutput

build-server-docs:
name: Build server docs
needs: build-client-docs-as-artifact
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.12'
python-version: "3.10"

- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.8.3'
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: Define a cache for the virtual environment based on the dependencies lock file
uses: actions/cache@v3
- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
path: ./python/.venv
key: venv-${{ hashFiles('./python/poetry.lock') }}
key: venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }}

- name: Install docs dependencies
working-directory: ./python
run: poetry install --with docs
run: |
poetry install --with docs
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: Build the documentation
working-directory: ./python
run: poetry run python tools/make_docs_cli.py
run: python tools/make_docs_cli.py

- name: Move docs to website directory
run: |
mkdir -p ./website/docs/server/
Expand All @@ -92,7 +90,7 @@ jobs:
with:
name: client-docs
path: ./website/docs/client

# # cleanup client docs artifacts
# - name: Delete client docs artifact
# run: |
Expand All @@ -107,7 +105,8 @@ jobs:
path: ./website

# Single deploy job since we're just deploying
deploy:
deploy-website:
name: Deploy website
needs: build-server-docs
runs-on: ubuntu-latest
permissions:
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
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
19 changes: 19 additions & 0 deletions .github/workflows/update-contributors.yml
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 }}
Loading
Loading