From bba19e0d2a05d464760bafd9280127dada2defd4 Mon Sep 17 00:00:00 2001 From: Alain Riou <alain.riou14000@yahoo.com> Date: Mon, 15 Jan 2024 19:29:43 +0100 Subject: [PATCH] add pyproject.toml --- CHANGELOG.md | 10 ++++++++++ pyproject.toml | 45 +++++++++++++++++++++++++++++++++++++++++++ setup.py | 52 -------------------------------------------------- 3 files changed, 55 insertions(+), 52 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/CHANGELOG.md b/CHANGELOG.md index baa8bcd..b6fcb6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## v1.0.0 + +- Change API under the hood to make it more object-oriented + - store all utilities inside a `PESTO` object that is a subclass of `nn.Module` + - make the API compatible with the checkpoints generated by the training repo +- add tests +- replace `setup.py` by `pyproject.toml` +- fix a few issues +- improve README and documentation + ## v0.1.1 - solve issue when exporting in PNG diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8a3e416 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,45 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "pesto-pitch" +version = "1.0.0" +authors = [ + {name = "Alain Riou", email = "alain.riou@sony.com"} +] +description = "Efficient pitch estimation with self-supervised learning", +readme = {file = "README.md", content-type = "text/markdown"} +requires-python = ">=3.8" +classifiers = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', # If licence is provided must be on the repository + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', +] +dependencies = [ + 'numpy>=1.21.5', + 'scipy>=1.8.1', + 'tqdm>=4.66.1', + 'torch>=2.0.1', + 'torchaudio>=2.0.2' +] + +[project.optional-dependencies] +matplotlib = ["matplotlib"] +test = ["pytest"] + +[project.scripts] +pesto = "pesto.main.py:pesto" + +[project.urls] +source = "https://github.com/SonyCSLParis/pesto" + +[tool.setuptools.packages.find] +where = ["pesto"] + +[tool.setuptools.package-data] +weights = ["*.ckpt"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 6eafee0..0000000 --- a/setup.py +++ /dev/null @@ -1,52 +0,0 @@ -from pathlib import Path -from setuptools import setup, find_packages - -def get_readme_text(): - root_dir = Path(__file__).parent - readme_path = root_dir / "README.md" - return readme_path.read_text() - - -setup( - name='pesto-pitch', - version='0.1.0', - description='Efficient pitch estimation with self-supervised learning', - long_description=get_readme_text(), - long_description_content_type='text/markdown', - author='Alain Riou', - url='https://github.com/SonyCSLParis/pesto', - license='LGPL-3.0', - packages=find_packages(), - include_package_data=True, - package_data={ - 'pesto': ['weights/*'], # To include the .pth - }, - install_requires=[ - 'numpy>=1.21.5', - 'scipy>=1.8.1', - 'tqdm>=4.66.1', - 'torch>=2.0.1', - 'torchaudio>=2.0.2' - ], - classifiers=[ - # 'Development Status :: 1 - Planning', - # 'Development Status :: 2 - Pre-Alpha', - # 'Development Status :: 3 - Alpha', - # 'Development Status :: 4 - Beta', - 'Development Status :: 5 - Production/Stable', - # 'Development Status :: 6 - Mature', - # 'Development Status :: 7 - Inactive', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', # If licence is provided must be on the repository - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - ], - entry_points={ - 'console_scripts': [ - 'pesto=pesto.main:pesto', # For the command line, executes function pesto() in pesto/main as 'pesto' - ], - }, - python_requires='>=3.8', -) -- GitLab