Skip to content

Commit

Permalink
Add setup.py to support pip install -e .
Browse files Browse the repository at this point in the history
Also add an action to test it.
  • Loading branch information
hmartiro committed Mar 26, 2023
1 parent e722d05 commit 5a989ff
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Black Format
name: black format

on:
push:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Python Test
run-name: ${{ github.actor }} is running Riffusion CI
name: python test

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MyPy Type Check
name: mypy type check

on:
push:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
@@ -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 .
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ruff Lint
name: ruff lint

on:
push:
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.1
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ ruff
types-Flask-Cors
types-Pillow
types-requests
types-setuptools
types-tqdm
38 changes: 38 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
],
)

0 comments on commit 5a989ff

Please sign in to comment.