Skip to content

Commit

Permalink
Merge pull request #53 from HenestrosaDev/dev
Browse files Browse the repository at this point in the history
Add mypy changes, CI and pre-commit hooks for v2.3.0
  • Loading branch information
HenestrosaDev committed Jul 30, 2024
2 parents 791bcd7 + a110963 commit 3bc4a72
Show file tree
Hide file tree
Showing 41 changed files with 850 additions and 429 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GOOGLE_API_KEY=
OPENAI_API_KEY=
OPENAI_API_KEY=
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ This section guides you through submitting an enhancement suggestion for audiote
<!-- omit in toc -->
#### How Do I Submit a Good Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://github.com/HenestrosaConH/audiotext/issues). This is the [issue template](https://github.com/HenestrosaConH/audiotext/tree/main/.github/workflows/ISSUE_TEMPLATE.md).
Enhancement suggestions are tracked as [GitHub issues](https://github.com/HenestrosaConH/audiotext/issues). This is the [issue template](https://github.com/HenestrosaConH/audiotext/tree/main/.github/workflows/ISSUE_TEMPLATE.md).

Don't forget to follow these principles:
Don't forget to follow these principles:

- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ko_fi: henestrosadev
ko_fi: henestrosadev
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Bug Report
name: Bug Report
about: Create a report to help us improve
title: "[Bug] "
labels: ''
Expand Down Expand Up @@ -34,7 +34,7 @@ System information

- **System**: (For example, "Ubuntu 20.04 LTS x64", "Windows 11 x64", or "macOS Monterey")
- **System language**: (Please, indicate the region as well)
- **Audiotext version**:
- **Audiotext version**:


Code To Duplicate
Expand All @@ -55,4 +55,4 @@ Screenshot, Sketch, or Drawing

Optional. Feel free to provide an image if you think it adds more useful information to the issue.

You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Overview
In this section, provide a brief overview of the enhancement you are proposing.


Motivation
Motivation
------------------

In this section, describe the motivation behind the enhancement. What problem are you trying to solve? How will this enhancement benefit users of the project?
Expand All @@ -37,4 +37,4 @@ Next Steps

In this section, outline the next steps for implementing the enhancement. This could include assigning the enhancement to a specific team member, setting a timeline for implementation, or opening a pull request for review.

An enhancement template provides a clear and structured approach for proposing enhancements to a project, which can help ensure that proposals are well-thought-out and considered by the project's maintainers.
An enhancement template provides a clear and structured approach for proposing enhancements to a project, which can help ensure that proposals are well-thought-out and considered by the project's maintainers.
3 changes: 0 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ Put an x in the boxes that apply.

## Additional Notes
Please provide any additional information or context about your changes here.



34 changes: 34 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Code Quality

on:
pull_request:
branches:
- "*"
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install PortAudio to install PyAudio
run: |
sudo apt-get update
sudo apt-get install python3-pyaudio portaudio19-dev python3-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Run pre-commit
run: |
pre-commit run --all-files --show-diff-on-failure
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

audio-chunks/
audio-chunks/
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: debug-statements
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: no-commit-to-branch
args: [ --branch, main ]
- id: trailing-whitespace
- repo: local
hooks:
- id: mypy-local
name: Run mypy with all dev dependencies present
language: system
types:
- python
entry: mypy --strict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
10 changes: 5 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 3bc4a72

Please sign in to comment.