Skip to content

Commit

Permalink
Improve stability of main (#52)
Browse files Browse the repository at this point in the history
* update workflow

* Fix Pylint errors with Black

* activte venv in workflow

* fix build & test workflow

* fix naming & cleanup script

* Bump path version & update changelog

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
RitheeshBaradwaj and actions-user authored Sep 16, 2023
1 parent c7df135 commit 67cf5ae
Show file tree
Hide file tree
Showing 15 changed files with 192 additions and 162 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.x
python-version: 3.11.x

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.x
python-version: 3.11.x

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.x
python-version: 3.11.x

- name: Install dependencies
run: |
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.x
python-version: 3.11.x

- name: Install dependencies
run: |
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.x
python-version: 3.11.x

- name: Download package artifacts
uses: actions/download-artifact@v2
Expand All @@ -62,16 +62,29 @@ jobs:
sudo apt-get install libsox-dev
sudo apt-get install sox -y
sudo apt install ffmpeg -y
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install *.whl
- name: Run unit tests
- name: Download Sample Data
run: |
source .venv/bin/activate
python src/common/download_data.py
- name: Run unit tests
run: |
source .venv/bin/activate
python src/api/mimasa/manage.py test face_detection
- name: Run Audio & Video Translations
run: |
source .venv/bin/activate
python src/main.py
- name: Generate Coverage Reports
run: |
source .venv/bin/activate
coverage run src/api/mimasa/manage.py test face_detection
coverage html
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.x
python-version: 3.11.x

- name: Get tag
run: |
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.x
python-version: 3.11.x

- name: Get tag
run: |
Expand Down
109 changes: 58 additions & 51 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,58 @@
# Change Log

All notable changes to this package will be documented in this file.
This package adheres to [Semantic Versioning](http://semver.org/).

## 1.1.2 release

### Bug Fixes

* Fix transaltion module import error
* Add support to download mimasa sample data
* Improve setup envrionment script

## 1.1.1 release

### Bug Fixes

* Fix dependency issues
* Add pre-commit config to fix linting issues

## 1.1.0 release

### Features

* Add Django App for Mimasa to perform translations
* Add asynchronous functionality to detect faces and separate audio
* Add translation units for mimasa app and video, audio interfaces
* Improve face detection performance with asynchronous approaches added

### Documentation

* Document expected features and stories
* Document performance results

### Bug Fixes

* Fix labeler workflow for PRs
* Added tests results for performance of face detection & audio separation
* Prepare a demo video for Mimasa Django App

## 1.0.0 release

### Features

* Initial implementation of Mimasa App with FaceDetector component implemented
* Implement AudioSeparator component with NUSSL Separator

### Documentation

* Design documentation is added including components relationship, mimasa-state behavior and sequence diagrams
* Prepared the concept of Mimasa Application
# Change Log

All notable changes to this package will be documented in this file.
This package adheres to [Semantic Versioning](http://semver.org/).

## 1.1.3 release

### Bug Fixes

* Improve the stability of the GHA with testing Auido & Video Translations
* Fix project name in setup script

## 1.1.2 release

### Bug Fixes

* Fix transaltion module import error
* Add support to download mimasa sample data
* Improve setup envrionment script

## 1.1.1 release

### Bug Fixes

* Fix dependency issues
* Add pre-commit config to fix linting issues

## 1.1.0 release

### Features

* Add Django App for Mimasa to perform translations
* Add asynchronous functionality to detect faces and separate audio
* Add translation units for mimasa app and video, audio interfaces
* Improve face detection performance with asynchronous approaches added

### Documentation

* Document expected features and stories
* Document performance results

### Bug Fixes

* Fix labeler workflow for PRs
* Added tests results for performance of face detection & audio separation
* Prepare a demo video for Mimasa Django App

## 1.0.0 release

### Features

* Initial implementation of Mimasa App with FaceDetector component implemented
* Implement AudioSeparator component with NUSSL Separator

### Documentation

* Design documentation is added including components relationship, mimasa-state behavior and sequence diagrams
* Prepared the concept of Mimasa Application
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For the latest updates and news regarding Mimasa, please follow the [Announcemen

### Prerequisites

- [Python 3.10.x](https://www.python.org/downloads/)
- [Python 3.11.x](https://www.python.org/downloads/)
- [pip](https://pip.pypa.io/en/stable/installation/)
- Update the [settings](https://github.com/developers-cosmos/Mimasa/blob/main/src/common/config.py) for the application

Expand Down Expand Up @@ -96,7 +96,7 @@ The Django app for Mimasa is a web-based application that allows users to intera

### Prerequisites

- Python 3.10.x
- Python 3.11.x
- pip
- Django 4.x
- Redis
Expand Down
130 changes: 65 additions & 65 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
#!/usr/bin/env python3
"""
This module contains the setup script for installing the package.
"""
import os
import subprocess

from setuptools import find_packages, setup
from setuptools.command.install import install

DESCRIPTION = """
Mimasa is a real-time multilingual face translator application that takes a video input,
detects the facial patterns and speech of the person, translates the speech to another language
and changes the facial expression of the person to match the output language. The final output
is a video with the translated speech and modified facial expression.
"""


class LintCommand(install):
"""Custom command to run linting on package installation."""

def run(self):
"""Run linter."""
subprocess.call(["pylint", "src"])
install.run(self)


with open("requirements.txt", encoding="utf-8") as f:
requirements = f.read().splitlines()

os.environ["PYTHONPATH"] = os.path.join(os.getcwd(), "src")
author_list = ["Yellenki Ritheesh Baradwaj"]

setup(
name="Mimasa",
version="1.1.2",
author=", ".join(author_list),
author_email="[email protected]",
description="A Real-time Multilingual Face Translator",
long_description=DESCRIPTION,
url="https://github.com/developers-cosmos/Mimasa",
packages=find_packages(),
install_requires=requirements,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
scripts=["src/main.py"],
include_package_data=True,
package_data={
"": ["*.txt"],
},
entry_points={
"console_scripts": [
"mimasa = src.main:main",
],
},
env={"PYTHONPATH": os.path.abspath(os.path.join(os.path.dirname(__file__), "src"))},
# NOTE: Disbale the following lines to avoid lint checking
cmdclass={
"install": LintCommand,
},
)
#!/usr/bin/env python3
"""
This module contains the setup script for installing the package.
"""
import os
import subprocess

from setuptools import find_packages, setup
from setuptools.command.install import install

DESCRIPTION = """
Mimasa is a real-time multilingual face translator application that takes a video input,
detects the facial patterns and speech of the person, translates the speech to another language
and changes the facial expression of the person to match the output language. The final output
is a video with the translated speech and modified facial expression.
"""


class LintCommand(install):
"""Custom command to run linting on package installation."""

def run(self):
"""Run linter."""
subprocess.call(["pylint", "src"])
install.run(self)


with open("requirements.txt", encoding="utf-8") as f:
requirements = f.read().splitlines()

os.environ["PYTHONPATH"] = os.path.join(os.getcwd(), "src")
author_list = ["Yellenki Ritheesh Baradwaj"]

setup(
name="Mimasa",
version="1.1.3",
author=", ".join(author_list),
author_email="[email protected]",
description="A Real-time Multilingual Face Translator",
long_description=DESCRIPTION,
url="https://github.com/developers-cosmos/Mimasa",
packages=find_packages(),
install_requires=requirements,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
scripts=["src/main.py"],
include_package_data=True,
package_data={
"": ["*.txt"],
},
entry_points={
"console_scripts": [
"mimasa = src.main:main",
],
},
env={"PYTHONPATH": os.path.abspath(os.path.join(os.path.dirname(__file__), "src"))},
# NOTE: Disbale the following lines to avoid lint checking
cmdclass={
"install": LintCommand,
},
)
3 changes: 1 addition & 2 deletions src/api/mimasa/translation/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django.urls import path

from .views import (MimasaCreateView, download_translation, get_task_status,
translation, update_mimasa_instance)
from .views import MimasaCreateView, download_translation, get_task_status, translation, update_mimasa_instance

urlpatterns = [
path("", MimasaCreateView.as_view(), name="mimasa_application"),
Expand Down
3 changes: 1 addition & 2 deletions src/audioseparator/mask_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"""

import nussl
from nussl.ml.networks.modules import (AmplitudeToDB, BatchNorm, Embedding,
RecurrentStack)
from nussl.ml.networks.modules import AmplitudeToDB, BatchNorm, Embedding, RecurrentStack
from torch import nn


Expand Down
Loading

0 comments on commit 67cf5ae

Please sign in to comment.