modusa 0.2.1__tar.gz → 0.2.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {modusa-0.2.1 → modusa-0.2.21}/PKG-INFO +1 -20
  2. {modusa-0.2.1 → modusa-0.2.21}/pyproject.toml +30 -26
  3. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/io/audio_loader.py +3 -1
  4. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/signals/audio_signal.py +8 -1
  5. {modusa-0.2.1 → modusa-0.2.21}/LICENSE.md +0 -0
  6. {modusa-0.2.1 → modusa-0.2.21}/README.md +0 -0
  7. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/.DS_Store +0 -0
  8. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/__init__.py +0 -0
  9. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/config.py +0 -0
  10. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/decorators.py +0 -0
  11. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/generate_template.py +0 -0
  12. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/list_authors.py +0 -0
  13. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/list_plugins.py +0 -0
  14. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/main.py +0 -0
  15. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/templates/engine.py +0 -0
  16. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/templates/generator.py +0 -0
  17. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/templates/io.py +0 -0
  18. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/templates/plugin.py +0 -0
  19. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/templates/signal.py +0 -0
  20. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/devtools/templates/test.py +0 -0
  21. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/engines/.DS_Store +0 -0
  22. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/engines/__init__.py +0 -0
  23. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/engines/base.py +0 -0
  24. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/generators/__init__.py +0 -0
  25. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/generators/audio_waveforms.py +0 -0
  26. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/generators/base.py +0 -0
  27. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/io/__init__.py +0 -0
  28. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/io/audio_converter.py +0 -0
  29. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/io/audio_player.py +0 -0
  30. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/io/base.py +0 -0
  31. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/io/plotter.py +0 -0
  32. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/io/youtube_downloader.py +0 -0
  33. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/main.py +0 -0
  34. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/plugins/__init__.py +0 -0
  35. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/plugins/base.py +0 -0
  36. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/signals/__init__.py +0 -0
  37. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/signals/base.py +0 -0
  38. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/signals/frequency_domain_signal.py +0 -0
  39. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/signals/signal_ops.py +0 -0
  40. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/signals/spectrogram.py +0 -0
  41. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/signals/time_domain_signal.py +0 -0
  42. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/utils/.DS_Store +0 -0
  43. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/utils/__init__.py +0 -0
  44. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/utils/config.py +0 -0
  45. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/utils/excp.py +0 -0
  46. {modusa-0.2.1 → modusa-0.2.21}/src/modusa/utils/logger.py +0 -0
  47. {modusa-0.2.1 → modusa-0.2.21}/tests/__init__.py +0 -0
  48. {modusa-0.2.1 → modusa-0.2.21}/tests/test_engines/audio_converter.py +0 -0
  49. {modusa-0.2.1 → modusa-0.2.21}/tests/test_engines/youtube_audio_loader.py +0 -0
  50. {modusa-0.2.1 → modusa-0.2.21}/tests/test_engines/youtube_downloader.py +0 -0
  51. {modusa-0.2.1 → modusa-0.2.21}/tests/test_generators/audio_waveform.py +0 -0
  52. {modusa-0.2.1 → modusa-0.2.21}/tests/test_io/audio_player.py +0 -0
  53. {modusa-0.2.1 → modusa-0.2.21}/tests/test_io/plotter.py +0 -0
  54. {modusa-0.2.1 → modusa-0.2.21}/tests/test_plugins/youtube_audio_loader.py +0 -0
  55. {modusa-0.2.1 → modusa-0.2.21}/tests/test_signals/frequency_domain_signal.py +0 -0
  56. {modusa-0.2.1 → modusa-0.2.21}/tests/test_signals/spectrogram.py +0 -0
  57. {modusa-0.2.1 → modusa-0.2.21}/tests/test_signals/time_domain_signal.py +0 -0
@@ -1,32 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modusa
3
- Version: 0.2.1
3
+ Version: 0.2.21
4
4
  Summary: A modular signal analysis python library.
5
5
  Author-Email: Ankit Anand <ankit0.anand0@gmail.com>
6
6
  License: MIT
7
7
  Requires-Python: >=3.12
8
- Requires-Dist: jupyter>=1.1.1
9
- Requires-Dist: pytest>=8.4.0
10
8
  Requires-Dist: numpy>=2.2.6
11
9
  Requires-Dist: matplotlib>=3.10.3
12
- Requires-Dist: pandas>=2.3.0
13
- Requires-Dist: pydantic>=2.11.5
14
- Requires-Dist: sqlalchemy>=2.0.41
15
- Requires-Dist: tqdm>=4.67.1
16
- Requires-Dist: sphinx==8.1.2
17
- Requires-Dist: sphinx-autodoc-typehints==2.1.0
18
- Requires-Dist: sphinx-copybutton>=0.5.2
19
- Requires-Dist: furo>=2024.8.6
20
- Requires-Dist: questionary>=2.1.0
21
- Requires-Dist: rich>=14.0.0
22
- Requires-Dist: snakeviz>=2.2.2
23
- Requires-Dist: line-profiler>=4.2.0
24
- Requires-Dist: nbsphinx==0.9.7
25
- Requires-Dist: ghp-import>=2.1.0
26
10
  Requires-Dist: yt-dlp>=2025.6.30
27
- Requires-Dist: sphinx-book-theme>=1.1.4
28
- Requires-Dist: pydata-sphinx-theme>=0.15.4
29
- Requires-Dist: sphinx-material>=0.0.36
30
11
  Requires-Dist: librosa==0.10.1
31
12
  Description-Content-Type: text/markdown
32
13
 
@@ -1,33 +1,14 @@
1
1
  [project]
2
2
  name = "modusa"
3
- version = "0.2.1"
3
+ version = "0.2.21"
4
4
  description = "A modular signal analysis python library."
5
5
  authors = [
6
6
  { name = "Ankit Anand", email = "ankit0.anand0@gmail.com" },
7
7
  ]
8
8
  dependencies = [
9
- "jupyter>=1.1.1",
10
- "pytest>=8.4.0",
11
9
  "numpy>=2.2.6",
12
10
  "matplotlib>=3.10.3",
13
- "pandas>=2.3.0",
14
- "pydantic>=2.11.5",
15
- "sqlalchemy>=2.0.41",
16
- "tqdm>=4.67.1",
17
- "sphinx==8.1.2",
18
- "sphinx-autodoc-typehints==2.1.0",
19
- "sphinx-copybutton>=0.5.2",
20
- "furo>=2024.8.6",
21
- "questionary>=2.1.0",
22
- "rich>=14.0.0",
23
- "snakeviz>=2.2.2",
24
- "line-profiler>=4.2.0",
25
- "nbsphinx==0.9.7",
26
- "ghp-import>=2.1.0",
27
11
  "yt-dlp>=2025.6.30",
28
- "sphinx-book-theme>=1.1.4",
29
- "pydata-sphinx-theme>=0.15.4",
30
- "sphinx-material>=0.0.36",
31
12
  "librosa==0.10.1",
32
13
  ]
33
14
  requires-python = ">=3.12"
@@ -39,14 +20,37 @@ text = "MIT"
39
20
  [project.scripts]
40
21
  modusa-dev = "modusa.devtools.main:main"
41
22
 
42
- [build-system]
43
- requires = [
44
- "pdm-backend",
45
- ]
46
- build-backend = "pdm.backend"
47
-
48
23
  [tool.pdm]
49
24
  distribution = true
50
25
 
26
+ [tool.pdm.dev-dependencies]
27
+ test = [
28
+ "pytest>=8.4.0",
29
+ ]
30
+ docs = [
31
+ "jupyter>=1.1.1",
32
+ "sphinx==8.1.2",
33
+ "sphinx-autodoc-typehints==2.1.0",
34
+ "sphinx-copybutton>=0.5.2",
35
+ "furo>=2024.8.6",
36
+ "nbsphinx==0.9.7",
37
+ "ghp-import>=2.1.0",
38
+ ]
39
+ profiling = [
40
+ "snakeviz>=2.2.2",
41
+ "line-profiler>=4.2.0",
42
+ ]
43
+ misc = [
44
+ "pandas>=2.3.0",
45
+ "rich>=14.0.0",
46
+ "questionary>=2.1.0",
47
+ ]
48
+
51
49
  [tool.pdm.package-dir]
52
50
  "" = "src"
51
+
52
+ [build-system]
53
+ requires = [
54
+ "pdm-backend",
55
+ ]
56
+ build-backend = "pdm.backend"
@@ -72,7 +72,7 @@ class AudioLoader(ModusaIO):
72
72
  # Load the audio in memory and return that
73
73
  audio_data, audio_sr = librosa.load(wav_audio_fp, sr=sr)
74
74
 
75
- audio = AudioSignal(y=audio_data, sr=sr, title=audio_fp.stem)
75
+ audio = AudioSignal(y=audio_data, sr=audio_sr, title=audio_fp.stem)
76
76
 
77
77
  return audio
78
78
 
@@ -106,6 +106,8 @@ class AudioLoader(ModusaIO):
106
106
 
107
107
  """
108
108
  import librosa
109
+ import warnings
110
+ warnings.filterwarnings("ignore", message="pkg_resources is deprecated as an API.")
109
111
 
110
112
  fp = Path(fp)
111
113
  y, sr = librosa.load(fp, sr=sr)
@@ -313,7 +313,14 @@ class AudioSignal(ModusaSignal):
313
313
  #----------------------------
314
314
 
315
315
  def __array__(self, dtype=None):
316
- return np.asarray(self._S, dtype=dtype)
316
+ return np.asarray(self.y, dtype=dtype)
317
+
318
+ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
319
+ if ufunc == np.abs and method == "__call__":
320
+ # Extract the actual array from self or others
321
+ result = ufunc(self.y, **kwargs)
322
+ return self.__class__(y=result, sr=self.sr, title=f"{self.title} (abs)")
323
+ return NotImplemented
317
324
 
318
325
  def __add__(self, other):
319
326
  other_data = other.y if isinstance(other, self.__class__) else other
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes