Skip to content

Commit 519efc8

Browse files
authored
Merge pull request #1 from formeo/global_refactoring
refactoring
2 parents cebbd35 + 5ba4b6b commit 519efc8

File tree

16 files changed

+1833
-591
lines changed

16 files changed

+1833
-591
lines changed
Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3-
4-
name: Python package
1+
name: Tests
52

63
on:
74
push:
8-
branches: [ "main" ]
5+
branches: [ main, master ]
96
pull_request:
10-
branches: [ "main" ]
7+
branches: [ main, master ]
118

129
jobs:
13-
build:
14-
10+
test:
1511
runs-on: ubuntu-latest
1612
strategy:
17-
fail-fast: false
1813
matrix:
19-
python-version: ["3.9", "3.10", "3.11"]
14+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2015

2116
steps:
2217
- uses: actions/checkout@v4
18+
2319
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v3
20+
uses: actions/setup-python@v5
2521
with:
2622
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install system dependencies
25+
run: sudo apt-get update && sudo apt-get install -y ffmpeg
26+
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
python -m pip install flake8 pytest
31-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32-
- name: Lint with flake8
33-
run: |
34-
# stop the build if there are Python syntax errors or undefined names
35-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38-
- name: Test with pytest
39-
run: |
40-
pytest
30+
pip install -e ".[dev]"
31+
32+
- name: Run tests
33+
run: pytest -v --cov=music_recognition
34+
35+
- name: Check formatting
36+
run: black --check src/
37+
continue-on-error: true

.gitignore

Lines changed: 25 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,38 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Python template
3-
# Byte-compiled / optimized / DLL files
1+
# Byte-compiled
42
__pycache__/
53
*.py[cod]
64
*$py.class
7-
8-
# C extensions
95
*.so
106

11-
# Distribution / packaging
12-
.Python
7+
# Distribution
138
build/
14-
develop-eggs/
159
dist/
16-
downloads/
17-
eggs/
18-
.eggs/
19-
lib/
20-
lib64/
21-
parts/
22-
sdist/
23-
var/
24-
wheels/
25-
share/python-wheels/
2610
*.egg-info/
27-
.installed.cfg
28-
*.egg
29-
MANIFEST
30-
31-
# Unit test / coverage reports
32-
htmlcov/
33-
.tox/
34-
.nox/
35-
.coverage
36-
.coverage.*
37-
.cache
38-
nosetests.xml
39-
coverage.xml
40-
*.cover
41-
*.py,cover
42-
.hypothesis/
43-
.pytest_cache/
44-
cover/
45-
report.xml
46-
47-
# Translations
48-
*.mo
49-
*.pot
50-
51-
# Django stuff:
52-
*.log
53-
local_settings.py
54-
db.sqlite3
55-
db.sqlite3-journal
56-
/logs/*
57-
/media/*
58-
/static/*
59-
60-
# Jupyter Notebook
61-
.ipynb_checkpoints
62-
63-
# IPython
64-
profile_default/
65-
ipython_config.py
66-
67-
# Celery stuff
68-
celerybeat-schedule
69-
celerybeat.pid
11+
.eggs/
7012

71-
# Environments
72-
.env
73-
.venv
74-
env/
13+
# Virtual environments
14+
.venv/
7515
venv/
7616
ENV/
77-
env.bak/
78-
venv.bak/
79-
80-
# mkdocs documentation
81-
/site
82-
83-
# mypy
84-
.mypy_cache/
85-
.dmypy.json
86-
dmypy.json
87-
88-
# Cython debug symbols
89-
cython_debug/
9017

91-
### Example user template
92-
# IntelliJ project files
93-
.idea
94-
*.iml
95-
out
96-
gen
97-
98-
### Project files
99-
helm/charts/*
100-
config.yml
101-
config.*.yml
102-
!config.example.yml
103-
config.ini
104-
config.*.ini
105-
gateway/grammars/*
106-
!gateway/grammars/*.g4
107-
logging.yml
108-
logging.*.yml
109-
/uploads/*
110-
values.yaml
18+
# Testing
19+
.pytest_cache/
20+
.coverage
21+
htmlcov/
22+
.tox/
11123

112-
# pyenv
113-
.python-version
24+
# IDE
25+
.idea/
26+
.vscode/
27+
*.swp
28+
29+
# OS
30+
.DS_Store
31+
Thumbs.db
32+
33+
# Project
34+
*.mp3
35+
*.wav
36+
*.flac
37+
output/
38+
reports/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 formeo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)