Skip to content

Commit

Permalink
refactor: move source code to src/ (#8)
Browse files Browse the repository at this point in the history
* refactor: move source code to `src/`
* compress image

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Borda and pre-commit-ci[bot] authored Jun 12, 2024
1 parent bbaa029 commit 137e8e5
Show file tree
Hide file tree
Showing 19 changed files with 47 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on: # Trigger the workflow on push or pull request, but only for the main branc
# based on https://github.com/pypa/gh-action-pypi-publish

jobs:
build:
build-release-upload:
runs-on: ubuntu-latest

steps:
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ repos:
- id: ruff-format
# validate if all is fine with preview mode
- id: ruff

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
hooks:
- id: pyproject-fmt
additional_dependencies: [tox]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
hooks:
- id: validate-pyproject
25 changes: 25 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Manifest syntax https://packaging.python.org/en/latest/guides/using-manifest-in/
graft wheelhouse

recursive-exclude __pycache__ *.py[cod] *.orig

# Include the README and CHANGELOG
include *.md
recursive-include src *.md

# Include marker file for PEP 561
recursive-include src *.typed

exclude *.sh
exclude *.toml
exclude *.svg

# Exclude build configs
exclude *.yml
exclude *.yaml

prune .git
prune .github
prune Matlab*
prune docs*
prune test*
Binary file modified docs/FurElise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
author="Jason Heeris",
author_email="[email protected]",
url="https://github.com/Lightning-Sandbox/gammatone",
download_url="https://github.com/Lightning-Sandbox/gammatone/archive/master.zip",
download_url="https://github.com/Lightning-Sandbox/gammatone/archive/main.zip",
long_description=README,
python_requires=">=3.8",
long_description_content_type="text/markdown",
packages=find_packages(exclude=["tests"]),
packages=find_packages(where="src"),
package_dir={"": "src"},
install_requires=["numpy", "scipy", "matplotlib"],
extras_require={"test": ["pytest", "mock"]},
entry_points={"console_scripts": ["gammatone = gammatone.plot:main"]},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions tests/test_cfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
# This file is part of the gammatone toolkit, and is licensed under the 3-clause
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING

import gammatone.filters
import pytest
from mock import patch

import gammatone.filters


@patch("gammatone.filters.erb_space")
@pytest.mark.parametrize(
Expand Down
3 changes: 1 addition & 2 deletions tests/test_erb_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# This file is part of the gammatone toolkit, and is licensed under the 3-clause
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING

import gammatone.filters
import numpy as np
import pytest
import scipy.io
from pkg_resources import resource_stream

import gammatone.filters

REF_DATA_FILENAME = "data/test_erbspace_data.mat"
INPUT_KEY = "erbspace_inputs"
RESULT_KEY = "erbspace_results"
Expand Down
3 changes: 1 addition & 2 deletions tests/test_fft_gtgram.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
# This file is part of the gammatone toolkit, and is licensed under the 3-clause
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING

import gammatone.fftweight
import numpy as np
import pytest
import scipy.io
from mock import patch
from pkg_resources import resource_stream

import gammatone.fftweight

REF_DATA_FILENAME = "data/test_fft_gammatonegram_data.mat"
INPUT_KEY = "fft_gammatonegram_inputs"
MOCK_KEY = "fft_gammatonegram_mocks"
Expand Down
3 changes: 1 addition & 2 deletions tests/test_fft_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING
from __future__ import division

import gammatone.fftweight
import numpy as np
import pytest
import scipy.io
from pkg_resources import resource_stream

import gammatone.fftweight

REF_DATA_FILENAME = "data/test_fft2gtmx_data.mat"
INPUT_KEY = "fft2gtmx_inputs"
RESULT_KEY = "fft2gtmx_results"
Expand Down
3 changes: 1 addition & 2 deletions tests/test_filterbank.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# This file is part of the gammatone toolkit, and is licensed under the 3-clause
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING

import gammatone.filters
import numpy as np
import pytest
import scipy.io
from pkg_resources import resource_stream

import gammatone.filters

REF_DATA_FILENAME = "data/test_filterbank_data.mat"
INPUT_KEY = "erb_filterbank_inputs"
RESULT_KEY = "erb_filterbank_results"
Expand Down
3 changes: 1 addition & 2 deletions tests/test_gammatone_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# This file is part of the gammatone toolkit, and is licensed under the 3-clause
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING

import gammatone.filters
import numpy as np
import pytest
import scipy.io
from pkg_resources import resource_stream

import gammatone.filters

REF_DATA_FILENAME = "data/test_erb_filter_data.mat"
INPUT_KEY = "erb_filter_inputs"
RESULT_KEY = "erb_filter_results"
Expand Down
3 changes: 1 addition & 2 deletions tests/test_gammatonegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
# This file is part of the gammatone toolkit, and is licensed under the 3-clause
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING

import gammatone.gtgram
import numpy as np
import pytest
import scipy.io
from mock import patch
from pkg_resources import resource_stream

import gammatone.gtgram

REF_DATA_FILENAME = "data/test_gammatonegram_data.mat"
INPUT_KEY = "gammatonegram_inputs"
MOCK_KEY = "gammatonegram_mocks"
Expand Down
3 changes: 1 addition & 2 deletions tests/test_specgram.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
# This file is part of the gammatone toolkit, and is licensed under the 3-clause
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING

import gammatone.fftweight
import numpy as np
import pytest
import scipy.io
from mock import patch
from pkg_resources import resource_stream

import gammatone.fftweight

REF_DATA_FILENAME = "data/test_specgram_data.mat"
INPUT_KEY = "specgram_inputs"
MOCK_KEY = "specgram_mocks"
Expand Down

0 comments on commit 137e8e5

Please sign in to comment.