Skip to content

Commit c2e51b7

Browse files
authored
Merge pull request #62 from MTG/improve_packaging
Several packaging improvements: - crate omar_rq package - set more flexible deps - fix tests by clearing cache after testing each model - extend tests to multiple Python versions - Add PyPI classifiers and other metadata
2 parents a469298 + 1abf658 commit c2e51b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+183
-369
lines changed

.github/workflows/python-tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1215

1316
steps:
14-
- uses: actions/checkout@v4
15-
- name: Set up Python
17+
- uses: actions/checkout@v5
18+
- name: Set up Python ${{ matrix.python-version }}
1619
uses: actions/setup-python@v5
1720
with:
18-
python-version: '3.10'
21+
python-version: ${{ matrix.python-version }}
1922
- name: Install dependencies
2023
run: |
2124
python -m pip install --upgrade pip
2225
pip install .[dev]
26+
pip cache purge
2327
- name: Run tests
2428
run: pytest

pyproject.toml

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,69 @@
11
[project]
2-
version = "0.1"
2+
version = "0.2.0"
33
name = "omar-rq"
4+
description = "Wrapper library to use the OMAR-RQ models for audio music representation"
5+
readme = "README.md"
6+
license = { text = "AGPL-3.0 license" }
7+
authors = [
8+
{ name = "Pablo Alonso", email = "pablo.alonso@upf.edu" },
9+
{ name = "Pedro Ramoneda", email = "pedro.ramoneda@upf.edu" },
10+
{ name = "R. Oguz Araz", email = "recepoguz.araz@upf.edu" },
11+
]
12+
keywords = [
13+
"deep learning",
14+
"audio",
15+
"transformers",
16+
"mir",
17+
"music",
18+
"representation learning",
19+
"self-supervised learning",
20+
]
21+
22+
classifiers = [
23+
"Intended Audience :: Developers",
24+
"Intended Audience :: Science/Research",
25+
26+
"License License :: OSI Approved :: AGPL-3.0 license",
27+
28+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
29+
"Topic :: Software Development :: Libraries",
30+
"Topic :: Multimedia :: Sound/Audio :: Analysis",
31+
32+
"Programming Language :: Python :: 3",
33+
"Programming Language :: Python :: 3.10",
34+
"Programming Language :: Python :: 3.11",
35+
"Programming Language :: Python :: 3.12",
36+
"Programming Language :: Python :: 3.13",
37+
]
38+
39+
440

541
requires-python = ">= 3.10"
642

743
dependencies = [
8-
"lightning==2.3",
9-
"torch==2.6",
10-
"torchaudio==2.6",
11-
"gin-config~=0.5",
12-
"einops",
13-
"transformers"
44+
"lightning>=2.3,<3.0",
45+
"torch>=2.6,<3.0",
46+
"torchaudio>=2.6,<3.0",
47+
"gin-config>=0.5,<1.0",
48+
"einops>=0.8,<1.0",
49+
"transformers>=4.50,<5.0",
1450
]
1551

1652
[project.optional-dependencies]
17-
dev = [
18-
"ruff",
19-
"pytest",
20-
]
53+
dev = ["ruff~=0.14", "pytest"]
54+
2155
train = [
22-
"bayesian_optimization~=1.5.1",
23-
"matplotlib",
24-
"scikit_learn~=1.5.2",
25-
"scipy~=1.14.1",
26-
"wandb",
56+
"bayesian_optimization~=1.5.1",
57+
"matplotlib",
58+
"scikit_learn~=1.5.2",
59+
"scipy~=1.14.1",
60+
"wandb",
2761
]
2862

63+
[project.urls]
64+
Issues = "https://https://github.com/MTG/omar-rq/issues/"
65+
Homepage = "https://github.com/username/omar-rq/"
66+
2967
[build-system]
30-
requires = ["setuptools>=61.0", "wheel"]
68+
requires = ["setuptools>=65.5.0", "wheel"]
3169
build-backend = "setuptools.build_meta"

src/modules_clap/clap.py

Lines changed: 0 additions & 244 deletions
This file was deleted.

src/omar_rq/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .get_model import get_model
2+
3+
__all__ = ["get_model"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import gin.torch
99

10-
from nets.transformer import Transformer
10+
from .nets.transformer import Transformer
1111

1212

1313
class GinConfigSaverCallback(Callback):
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import pytorch_lightning as L
1010
from tqdm import tqdm
1111

12-
from data import DATASETS
13-
from modules import MODULES
14-
from nets import NETS
15-
from utils import build_module, build_dev_datamodule
12+
from .data import DATASETS
13+
from .modules import MODULES
14+
from .nets import NETS
15+
from .utils import build_module, build_dev_datamodule
1616

1717

1818
for net_name, net in NETS.items():

0 commit comments

Comments
 (0)