-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
TimeTravelPenguins
authored and
TimeTravelPenguin
committed
Jan 4, 2024
1 parent
75e03e7
commit d475c23
Showing
29 changed files
with
2,254 additions
and
203 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,75 @@ | ||
name: CI | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
DISPLAY: :0 | ||
PYTEST_ADDOPTS: "--color=yes" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
python: [ "3.11","3.12" ] | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
#- name: Setup macOS PATH | ||
# if: runner.os == 'macOS' | ||
# run: | | ||
# echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
|
||
- name: Install project | ||
run: poetry install --no-interaction | ||
|
||
- name: Check format with Black | ||
run: | | ||
poetry run black --check . | ||
- name: Typecheck with mypy | ||
run: | | ||
poetry run mypy | ||
- name: Run tests | ||
run: | | ||
source $VENV | ||
poetry run pytest |
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 |
---|---|---|
|
@@ -231,3 +231,5 @@ pyrightconfig.json | |
|
||
test audio | ||
.vscode | ||
files | ||
.idea |
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,69 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
fail_fast: false | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: check-vcs-permalinks | ||
- id: check-shebang-scripts-are-executable | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-mock-methods | ||
- id: python-no-log-warn | ||
- id: python-use-type-annotations | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
|
||
- repo: https://github.com/hadialqattan/pycln | ||
rev: v2.4.0 | ||
hooks: | ||
- id: pycln | ||
args: [ --all ] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.12.1 | ||
hooks: | ||
- id: black | ||
args: [ --safe ] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
language_version: "3.12" | ||
args: [ "--profile", "black" ] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.0 | ||
hooks: | ||
- id: pyupgrade | ||
|
||
- repo: https://github.com/python-poetry/poetry | ||
rev: 1.7.0 | ||
hooks: | ||
- id: poetry-check | ||
- id: poetry-lock | ||
- id: poetry-export | ||
args: [ "--without", "dev", "-f", "requirements.txt", "-o", "requirements.txt" ] | ||
verbose: true | ||
- id: poetry-install |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
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 |
---|---|---|
@@ -1 +1,24 @@ | ||
# Bulk Audio Extract Tool | ||
# Bulk Audio Extract Tool | ||
|
||
## About | ||
|
||
## Install | ||
Depending on your platform, to call python, you may need to use the command `python` or `python3`. | ||
Typing `python3 --version` or `python --version` should display the currently installed python environment your PATH. | ||
For the remainder of this document, replace instances of `python3` with the appropriate alias on your machine. | ||
|
||
To install the requirements: | ||
```bash | ||
python3 -m pip install -r requirements.txt | ||
``` | ||
|
||
Then, call `./main.py --help` to see application information. | ||
|
||
## Add to Path | ||
|
||
On Linux/MacOS, locate your `~/.bashrc` or `~/.zshrc` file and edit it, adding: | ||
```bash | ||
BAET_PATH="/path/to/BulkAudioExtractTool/main.py" | ||
alias baet="python3 $(BAET_PATH)" | ||
``` | ||
Restart your terminal and enter `baet --help`. The application's help screen should now show from any directory. |
Oops, something went wrong.