Skip to content

Commit

Permalink
Moved division to a multiplication to reduce computation cost
Browse files Browse the repository at this point in the history
Refined concept, but introduced errors within rich.

Rename refactor and defined __all__

Moved type aliases and constants to own files to avoid cyclic referencing

Refactored code to a more maintainable state

Moved into Extractor.py to avoid cyclic referencing

Changed imports along with refeactor

WIP: Progress printing

Finished PoC revision of progress display

Refactor: Moved files. Continued working on progress display.

Adjusted version

Continued working on progress display

Black reformat

Refactor & Updated pyproject.toml

Fixed issues with progress not displaying

Need to fix logging option and fixed printing bug

Corrected progress duplicating

Black reformat

Update project version

Moved main.py into own submodule

Updated to set up pre-commit

Cleanup with mypy

Corrected pre-commits

Updated pyproject

Added pytest

Changed to start app from __main__.py

Create CI.yml

Create python-publish.yml

Formatted

Updated workflows

Reformatted file

Added poetry-dynamic-versioning plugin

Added dynamic version plugin

Removed explicit python version

Changed install order

Added version

Added basic tests

Added app_theme to __all__

Refactor to target python 3.8

updated

Updated to target lower python version

Refactor to target python 3.8+

Replaced built-in

Corrected types

Updated project to better use pyproject, pre-commits, and poetry plugins

Squash commit: Corrected pre-commit

Updated project layout

Formatted

Updated workflows

Added poetry-dynamic-versioning plugin

Removed explicit python version

Changed install order

Added version

Removed

Added simple test

Refactor to target python 3.8+

Corrected typing

Corrected typing

Changed lowest target version to python 3.11

Corrected tests

Squashed commit of the following:

commit 4a17e5d
Merge: 1fc7702 5280ebb
Author: TimeTravelPenguin <TimeTravelPenguin@gmail.com>
Date:   Thu Jan 4 22:37:04 2024 +1100

    Merge branch 'rich-progress-bar' of https://github.com/TimeTravelPenguin/BulkAudioExtractTool into rich-progress-bar

commit 1fc7702
Author: TimeTravelPenguin <TimeTravelPenguin@gmail.com>
Date:   Thu Jan 4 22:28:33 2024 +1100

    Corrected tests

Update

Squashed commit of the following:

commit 7d7253e
Author: TimeTravelPenguin <TimeTravelPenguin@gmail.com>
Date:   Thu Jan 4 23:24:15 2024 +1100

    Removed

commit 78fb100
Author: TimeTravelPenguin <TimeTravelPenguin@gmail.com>
Date:   Thu Jan 4 23:04:07 2024 +1100

    Update

commit 4a17e5d
Merge: 1fc7702 5280ebb
Author: TimeTravelPenguin <TimeTravelPenguin@gmail.com>
Date:   Thu Jan 4 22:37:04 2024 +1100

    Merge branch 'rich-progress-bar' of https://github.com/TimeTravelPenguin/BulkAudioExtractTool into rich-progress-bar

commit 1fc7702
Author: TimeTravelPenguin <TimeTravelPenguin@gmail.com>
Date:   Thu Jan 4 22:28:33 2024 +1100

    Corrected tests

Updated version

Corrected versioning

Corrected invalid typing

Corrected versioning

Version update
  • Loading branch information
TimeTravelPenguins authored and TimeTravelPenguin committed Jan 4, 2024
1 parent 69ca02e commit 6f71628
Show file tree
Hide file tree
Showing 34 changed files with 1,377 additions and 635 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/CI.yml
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
69 changes: 69 additions & 0 deletions .pre-commit-config.yaml
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ On Linux/MacOS, locate your `~/.bashrc` or `~/.zshrc` file and edit it, adding:
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.
Restart your terminal and enter `baet --help`. The application's help screen should now show from any directory.
27 changes: 27 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[mypy]
strict = True
python_version = 3.12
files = src

install_types = true
ignore_missing_imports = True
cache_fine_grained = True
warn_unused_ignores = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_decorators = False
disallow_subclassing_any = False
warn_return_any = True
implicit_optional = False
strict_optional = True
warn_unreachable = True

[mypy-BAET._aliases]
disable_error_code = valid-type

[mypy-BAET._constants]
disable_error_code = valid-type

[mypy-BAET.progress_status]
disable_error_code = valid-type
Loading

0 comments on commit 6f71628

Please sign in to comment.