Add setup.py to support pip install -e .

Also add an action to test it.
This commit is contained in:
Hayk Martiros 2023-03-26 22:00:51 +00:00
parent e722d05825
commit 5a989fff9c
8 changed files with 72 additions and 5 deletions

View File

@ -1,4 +1,4 @@
name: Black Format
name: black format
on:
push:

View File

@ -1,5 +1,4 @@
name: Python Test
run-name: ${{ github.actor }} is running Riffusion CI
name: python test
on:
push:

View File

@ -1,4 +1,4 @@
name: MyPy Type Check
name: mypy type check
on:
push:

28
.github/workflows/pip.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: pip install
on:
push:
branches:
- 'main'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Editable Pip Install
run: python -m pip install -e .

View File

@ -1,4 +1,4 @@
name: Ruff Lint
name: ruff lint
on:
push:

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.3.1

View File

@ -5,4 +5,5 @@ ruff
types-Flask-Cors
types-Pillow
types-requests
types-setuptools
types-tqdm

38
setup.py Normal file
View File

@ -0,0 +1,38 @@
from pathlib import Path
from setuptools import find_packages, setup
# Load the version from file
__version__ = Path("VERSION").read_text().strip()
# Load packages
packages = Path("requirements.txt").read_text().splitlines()
setup(
name="riffusion",
packages=find_packages(exclude=[]),
version=__version__,
license="MIT",
description="Riffusion - Stable diffusion for real-time music generation",
author="Hayk Martiros",
author_email="hayk.mart@gmail.com",
long_description_content_type="text/markdown",
url="https://github.com/riffusion/riffusion",
keywords=[
"artificial intelligence",
"audio generation",
"music",
"diffusion",
"riffusion",
"deep learning",
"transformers",
],
install_requires=packages,
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
],
)