-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·147 lines (137 loc) · 5.01 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·147 lines (137 loc) · 5.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
from setuptools import setup, find_packages
import os
import sys
# Get version from package
def get_version():
"""Get version from chirpkit package"""
version_file = os.path.join('src', 'chirpkit', '_version.py')
with open(version_file, 'r') as f:
for line in f:
if line.startswith('__version__'):
# Extract version and strip whitespace, quotes, and newlines
version = line.split('=')[1].strip()
return version.strip('"\'')
return '0.1.2' # Fallback
setup(
name='chirpkit',
version=get_version(),
packages=find_packages(where='src'),
package_dir={'': 'src'},
# Models are downloaded on first use, not included in package
include_package_data=False,
install_requires=[
# Core dependencies - compatible with modern ecosystem
'numpy>=1.21.0', # Remove upper bound for compatibility with modern projects
'scikit-learn>=1.0.0',
'pandas>=1.3.0',
'librosa>=0.9.0',
'soundfile>=0.10.0',
'joblib>=1.0.0',
'requests>=2.32.4', # Security: CVE fixes in 2.32.4
'PyYAML>=5.4.0', # Configuration file support
# BirdNET dependency — pin to v2.4.0, the latest release that still exposes
# the embedding API this package calls: birdnet_analyzer.model.load_model(
# class_output=False) and .embeddings(). The default branch (and the PyPI
# build) removed/renamed these, so an unpinned install breaks embedding
# extraction (1024-dim) at inference time.
'birdnet-analyzer @ git+https://github.com/birdnet-team/BirdNET-Analyzer.git@v2.4.0',
# Web interface (optional by default)
'fastapi>=0.68.0',
'uvicorn>=0.15.0',
],
extras_require={
# TensorFlow variants for different platforms
'tensorflow': [
'tensorflow>=2.12.0,<3.0.0',
],
'tensorflow-macos': [
# tensorflow-macos maxes out at 2.16.2 as of Jan 2025
'tensorflow-macos>=2.12.0,<=2.16.2',
'tensorflow-metal>=1.0.0',
],
'tensorflow-gpu': [
'tensorflow[and-cuda]>=2.12.0,<3.0.0',
],
# PyTorch variants - modern versions compatible with ecosystem
'torch': [
'torch>=2.0.0', # Modern PyTorch for compatibility
'torchvision>=0.15.0',
'torchaudio>=2.0.0',
],
'torch-cpu': [
'torch>=2.0.0',
'torchvision>=0.15.0',
'torchaudio>=2.0.0',
],
# Visualization and experiment tracking
'viz': [
'matplotlib>=3.3.0',
'seaborn>=0.11.0',
'wandb>=0.12.0',
],
# UI components
'ui': [
'gradio>=5.0.0',
'python-multipart>=0.0.20', # Required by gradio for file uploads
],
# Dataset utilities
'datasets': [
'kagglehub>=0.1.0',
],
# Audio enhancement
'audio-enhanced': [
'essentia>=2.1',
'resampy>=0.4.0',
],
# Inference-only (minimal production deployment)
'inference': [
'torch>=2.0.0', # Core ML backend
],
# Development dependencies
'dev': [
'pytest>=6.2.0',
'pytest-cov>=2.12.0',
'black>=21.0.0',
'flake8>=3.9.0',
],
# Complete installation with recommended backends
'full': [
'tensorflow-macos>=2.12.0,<=2.16.2; sys_platform == "darwin"',
'tensorflow-metal>=1.0.0; sys_platform == "darwin"',
'tensorflow>=2.12.0,<3.0.0; sys_platform != "darwin"',
'torch>=2.0.0', # Modern PyTorch
'torchvision>=0.15.0',
'torchaudio>=2.0.0',
'matplotlib>=3.3.0',
'seaborn>=0.11.0',
'gradio>=5.0.0',
'python-multipart>=0.0.20',
'wandb>=0.12.0',
'kagglehub>=0.1.0',
],
},
entry_points={
'console_scripts': [
'chirpkit=chirpkit.cli:main',
'chirpkit-doctor=chirpkit.cli:doctor',
'chirpkit-fix=chirpkit.cli:fix',
],
},
python_requires='>=3.8',
author='Patrick Metzger',
description='A robust toolkit for insect sound classification and analysis',
long_description=open('README.md').read() if 'README.md' in locals() else '',
long_description_content_type='text/markdown',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Multimedia :: Sound/Audio :: Analysis',
],
)