forked from google/spatial-media
-
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.
Add initial project structure and CI/CD configuration
- Created .gitignore to exclude database files. - Added summary.md for project overview, detailing technologies, purpose, and file structure for the Spatial Media project. - Implemented GitHub Actions workflow (build.yml) for automated testing and building across multiple OS and Python versions. - Updated Dockerfile to streamline dependency installation and improve the setup process. - Enhanced spatial_media_metadata_injector.spec for better executable handling on Linux and macOS.
- Loading branch information
1 parent
270f48d
commit 5901832
Showing
5 changed files
with
206 additions
and
20 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 @@ | ||
db/ |
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,46 @@ | ||
# Project Summary: Spatial Media | ||
|
||
## Overview of Technologies Used | ||
The project is primarily developed using **Python** and utilizes various libraries and frameworks to handle spatial media. The key technologies include: | ||
|
||
- **Flask**: A micro web framework for Python, used for building web applications. | ||
- **Gunicorn**: A Python WSGI HTTP server for UNIX, used to serve the Flask application. | ||
- **PyInstaller**: A tool for converting Python applications into stand-alone executables. | ||
|
||
## Purpose of the Project | ||
The Spatial Media project is a collection of specifications and tools designed to facilitate the use of 360° video and spatial audio. It provides metadata specifications for spatial audio and spherical video, as well as tools for injecting this metadata into media files. The project aims to enhance the experience of immersive media by enabling proper handling and playback of spatial audio and video formats. | ||
|
||
## List of Build/Configuration/Project Files | ||
- **Build/Configuration Files:** | ||
- `/setup.py`: Configuration for packaging the project. | ||
- `/docker/Dockerfile`: Docker configuration file for building the application container. | ||
- `/docker/requirements.txt`: Lists the Python dependencies required by the application. | ||
|
||
## Source Files Directory | ||
The source files can be found in the following directories: | ||
- `/spatialmedia`: Contains the main application code for spatial media metadata injection. | ||
- `/spatial-audio`: Contains resources related to spatial audio, including ambisonic filters and HRIRs. | ||
- `/docker`: Contains the application entry point (`app.py`), WSGI configuration (`wsgi.py`), and startup script (`startup.sh`). | ||
|
||
## Documentation Files Location | ||
Documentation files are located in the `/docs` directory, which includes: | ||
- Metadata specifications for spatial audio and spherical video. | ||
- Various images and RFC documents related to the project. | ||
|
||
## Summary of Key Files | ||
- **Main Application:** | ||
- `/spatialmedia/__init__.py`: Initializes the spatial media package. | ||
- `/spatialmedia/gui.py`: Contains the GUI implementation for the application. | ||
- `/spatialmedia/metadata_utils.py`: Utility functions for handling metadata. | ||
|
||
- **Spatial Audio Resources:** | ||
- `/spatial-audio/README.md`: Documentation for spatial audio resources. | ||
- `/spatial-audio/raw-symmetric-cube-hrirs`: Contains HRIR files for binaural audio processing. | ||
|
||
- **Documentation:** | ||
- `/docs/spatial-audio-rfc.md`: Specification for spatial audio metadata. | ||
- `/docs/spherical-video-rfc.md`: Specification for spherical video metadata. | ||
- `/docs/spherical-video-v2-rfc.md`: Updated specification for spherical video metadata. | ||
- `/docs/vr180.md`: Documentation for the VR180 video format. | ||
|
||
This summary provides a comprehensive overview of the Spatial Media project, detailing its purpose, technologies, file structure, and documentation resources. |
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,119 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install pytest pylint | ||
- name: Lint with pylint | ||
run: | | ||
pylint spatialmedia/ || true | ||
- name: Run tests | ||
run: | | ||
python -m pytest || true | ||
build: | ||
needs: test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.12'] # Use latest stable Python for builds | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install pyinstaller | ||
- name: Build executable | ||
run: | | ||
python build_executables.py | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: spatial-media-${{ runner.os }} | ||
path: | | ||
dist/Spatial Media Metadata Injector* | ||
!dist/*.spec | ||
docker: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./docker | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: | | ||
${{ secrets.DOCKER_HUB_USERNAME }}/spatial-media:latest | ||
${{ secrets.DOCKER_HUB_USERNAME }}/spatial-media:${{ github.sha }} | ||
release: | ||
needs: [build, docker] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download all artifacts | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Upload Release Assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
spatial-media-*/Spatial Media Metadata Injector* |
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