Skip to content

Commit 3bc4a72

Browse files
Merge pull request #53 from HenestrosaDev/dev
Add mypy changes, CI and pre-commit hooks for v2.3.0
2 parents 791bcd7 + a110963 commit 3bc4a72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+850
-429
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
GOOGLE_API_KEY=
2-
OPENAI_API_KEY=
2+
OPENAI_API_KEY=

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ This section guides you through submitting an enhancement suggestion for audiote
112112
<!-- omit in toc -->
113113
#### How Do I Submit a Good Enhancement Suggestion?
114114

115-
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).
115+
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).
116116

117-
Don't forget to follow these principles:
117+
Don't forget to follow these principles:
118118

119119
- Use a **clear and descriptive title** for the issue to identify the suggestion.
120120
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ko_fi: henestrosadev
1+
ko_fi: henestrosadev

.github/ISSUE_TEMPLATE/bug_report_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Bug Report
2+
name: Bug Report
33
about: Create a report to help us improve
44
title: "[Bug] "
55
labels: ''
@@ -34,7 +34,7 @@ System information
3434

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

3939

4040
Code To Duplicate
@@ -55,4 +55,4 @@ Screenshot, Sketch, or Drawing
5555

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

58-
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.
58+
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.

.github/ISSUE_TEMPLATE/feature_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Overview
1212
In this section, provide a brief overview of the enhancement you are proposing.
1313

1414

15-
Motivation
15+
Motivation
1616
------------------
1717

1818
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?
@@ -37,4 +37,4 @@ Next Steps
3737

3838
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.
3939

40-
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.
40+
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.

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,3 @@ Put an x in the boxes that apply.
2828

2929
## Additional Notes
3030
Please provide any additional information or context about your changes here.
31-
32-
33-

.github/workflows/code-quality.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Code Quality
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "*"
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.10"]
17+
steps:
18+
- uses: actions/checkout@master
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
cache: 'pip'
24+
- name: Install PortAudio to install PyAudio
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install python3-pyaudio portaudio19-dev python3-dev
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -r requirements.txt -r requirements-dev.txt
32+
- name: Run pre-commit
33+
run: |
34+
pre-commit run --all-files --show-diff-on-failure

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ cython_debug/
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161161

162-
audio-chunks/
162+
audio-chunks/

.pre-commit-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: check-ast
6+
- id: check-case-conflict
7+
- id: check-docstring-first
8+
- id: check-merge-conflict
9+
- id: check-vcs-permalinks
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
- id: fix-byte-order-marker
13+
- id: mixed-line-ending
14+
- id: requirements-txt-fixer
15+
- id: no-commit-to-branch
16+
args: [ --branch, main ]
17+
- id: trailing-whitespace
18+
- repo: local
19+
hooks:
20+
- id: mypy-local
21+
name: Run mypy with all dev dependencies present
22+
language: system
23+
types:
24+
- python
25+
entry: mypy --strict
26+
- repo: https://github.com/astral-sh/ruff-pre-commit
27+
rev: v0.5.5
28+
hooks:
29+
- id: ruff
30+
args: [--fix, --exit-non-zero-on-fix]
31+
- id: ruff-format

LICENSE

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ''AS IS'' AND ANY
1919
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2020
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2121
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2525
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
27-
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
27+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)