Skip to content

Commit

Permalink
Merge pull request #5 from UCSD-E4E/release/v0.1.0
Browse files Browse the repository at this point in the history
Release/v0.1.0
  • Loading branch information
TylerFlar authored Jan 13, 2025
2 parents 73f90b3 + 3668ee5 commit e146c2d
Show file tree
Hide file tree
Showing 106 changed files with 10,374 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/eslint_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run ESLint Linter

on:
pull_request:
branches:
- main
- dev

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.npm
frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
working-directory: frontend
run: |
# Generate a fresh package-lock.json and install dependencies
npm install --package-lock-only
npm install
- name: Run ESLint
working-directory: frontend
run: npm run lint
52 changes: 52 additions & 0 deletions .github/workflows/pytest_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Run Pytest Tests

on:
pull_request:
branches:
- main
- dev

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: '3.13'

- name: Install Qt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libxkbcommon-x11-0 libxcb-icccm4 \
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
libxcb-xinerama0 libxcb-xfixes0 x11-utils xvfb
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev
- name: Run tests
env:
QT_QPA_PLATFORM: offscreen
DISPLAY: ":99.0"
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
poetry run pytest
103 changes: 103 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Create Release

on:
pull_request:
types: [closed]
branches:
- main

jobs:
# First job to check if we should run the release
check_release:
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true &&
(startsWith(github.event.pull_request.head.ref, 'hotfix/v') ||
startsWith(github.event.pull_request.head.ref, 'release/v'))
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Extract version from branch name
id: get_version
run: |
BRANCH=${{ github.event.pull_request.head.ref }}
VERSION=${BRANCH#*/v} # Remove prefix up to v
echo "version=$VERSION" >> $GITHUB_OUTPUT
# Build job that runs on each OS
build:
needs: check_release
strategy:
matrix:
include:
- os: windows-latest
build_os: windows
artifact: RTT-GCS-windows-x64.zip
- os: ubuntu-latest
build_os: linux
artifact: RTT-GCS-linux-x64.zip
- os: macos-latest
build_os: macos
artifact: RTT-GCS-macos-x64.zip

runs-on: ${{ matrix.os }}

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Install Node.js dependencies
working-directory: frontend
run: |
# Generate a fresh package-lock.json and install dependencies
npm install --package-lock-only
npm install
- name: Build for ${{ matrix.os }}
run: poetry run python scripts/build.py --os ${{ matrix.build_os }}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact }}
path: dist/${{ matrix.artifact }}

# Create release after all builds complete
create_release:
needs: [check_release, build]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: dist

- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ needs.check_release.outputs.version }}
name: Release v${{ needs.check_release.outputs.version }}
files: |
dist/RTT-GCS-windows-x64.zip/RTT-GCS-windows-x64.zip
dist/RTT-GCS-linux-x64.zip/RTT-GCS-linux-x64.zip
dist/RTT-GCS-macos-x64.zip/RTT-GCS-macos-x64.zip
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/ruff_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run Ruff Linter

on:
pull_request:
branches:
- main
- dev

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: '3.13'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev
- name: Run ruff linter
run: |
poetry run ruff check .
41 changes: 41 additions & 0 deletions .github/workflows/vitest_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run Vitest Tests

on:
pull_request:
branches:
- main
- dev

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.npm
frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
working-directory: frontend
run: |
# Generate a fresh package-lock.json and install dependencies
npm install --package-lock-only
npm install
- name: Run tests
working-directory: frontend
run: npm run test
63 changes: 63 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
.pytest_cache/
.coverage
htmlcov/
.env
.venv
env/
venv/
ENV/
ruff_cache/
poetry.lock

# Node/Frontend
node_modules/
frontend/dist/
frontend/build/
.npm
*.log
.env.local
.env.development.local
.env.test.local
.env.production.local
package-lock.json

# IDEs and editors
.idea/
.vscode/
*.swp
*.swo
.DS_Store
Thumbs.db

# Build outputs
*.spec
dist/
build/

# Misc
*.log
.DS_Store
*.db
*.db-shm
*.db-wal
12 changes: 12 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

This software is Copyright © 2024 The Regents of the University of California. All Rights Reserved. Permission to copy, modify, and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice, this paragraph and the following three paragraphs appear in all copies. Permission to make commercial use of this software may be obtained by contacting:

Office of Innovation and Commercialization
9500 Gilman Drive, Mail Code 0910
University of California
La Jolla, CA 92093-0910
[email protected]

This software program and documentation are copyrighted by The Regents of the University of California. The software program and documentation are supplied “as is”, without any accompanying services from The Regents. The Regents does not warrant that the operation of the program will be uninterrupted or error-free. The end-user understands that the program was developed for research purposes and is advised not to rely exclusively on the program for any reason.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN “AS IS” BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Loading

0 comments on commit e146c2d

Please sign in to comment.