From 0fdc42c916bad8e2e4103752f78eae437237c135 Mon Sep 17 00:00:00 2001
From: 34j <55338215+34j@users.noreply.github.com>
Date: Wed, 15 Mar 2023 23:15:49 +0900
Subject: [PATCH] chore: initial commit
---
.all-contributorsrc | 15 +++
.copier-answers.yml | 22 +++
.editorconfig | 21 +++
.flake8 | 3 +
.github/FUNDING.yml | 1 +
.github/ISSUE_TEMPLATE/1-bug_report.md | 14 ++
.github/ISSUE_TEMPLATE/2-feature-request.md | 14 ++
.github/labels.toml | 94 +++++++++++++
.github/workflows/ci.yml | 90 +++++++++++++
.github/workflows/hacktoberfest.yml | 17 +++
.github/workflows/issue-manager.yml | 32 +++++
.github/workflows/labels.yml | 22 +++
.gitignore | 140 ++++++++++++++++++++
.gitpod.yml | 8 ++
.idea/so-vits-svc-fork.iml | 9 ++
.idea/watcherTasks.xml | 65 +++++++++
.idea/workspace.xml | 32 +++++
.pre-commit-config.yaml | 73 ++++++++++
.readthedocs.yml | 24 ++++
CHANGELOG.md | 3 +
CONTRIBUTING.md | 117 ++++++++++++++++
LICENSE | 22 +++
README.md | 54 ++++++++
commitlint.config.js | 8 ++
docs/Makefile | 20 +++
docs/_static/.gitkeep | 0
docs/changelog.md | 3 +
docs/conf.py | 78 +++++++++++
docs/contributing.md | 3 +
docs/index.md | 28 ++++
docs/installation.md | 7 +
docs/make.bat | 35 +++++
docs/usage.md | 9 ++
pyproject.toml | 92 +++++++++++++
renovate.json | 3 +
setup.py | 9 ++
src/so_vits_svc_fork/__init__.py | 1 +
src/so_vits_svc_fork/main.py | 2 +
src/so_vits_svc_fork/py.typed | 0
tests/__init__.py | 0
tests/test_main.py | 5 +
41 files changed, 1195 insertions(+)
create mode 100644 .all-contributorsrc
create mode 100644 .copier-answers.yml
create mode 100644 .editorconfig
create mode 100644 .flake8
create mode 100644 .github/FUNDING.yml
create mode 100644 .github/ISSUE_TEMPLATE/1-bug_report.md
create mode 100644 .github/ISSUE_TEMPLATE/2-feature-request.md
create mode 100644 .github/labels.toml
create mode 100644 .github/workflows/ci.yml
create mode 100644 .github/workflows/hacktoberfest.yml
create mode 100644 .github/workflows/issue-manager.yml
create mode 100644 .github/workflows/labels.yml
create mode 100644 .gitignore
create mode 100644 .gitpod.yml
create mode 100644 .idea/so-vits-svc-fork.iml
create mode 100644 .idea/watcherTasks.xml
create mode 100644 .idea/workspace.xml
create mode 100644 .pre-commit-config.yaml
create mode 100644 .readthedocs.yml
create mode 100644 CHANGELOG.md
create mode 100644 CONTRIBUTING.md
create mode 100644 LICENSE
create mode 100644 README.md
create mode 100644 commitlint.config.js
create mode 100644 docs/Makefile
create mode 100644 docs/_static/.gitkeep
create mode 100644 docs/changelog.md
create mode 100644 docs/conf.py
create mode 100644 docs/contributing.md
create mode 100644 docs/index.md
create mode 100644 docs/installation.md
create mode 100644 docs/make.bat
create mode 100644 docs/usage.md
create mode 100644 pyproject.toml
create mode 100644 renovate.json
create mode 100644 setup.py
create mode 100644 src/so_vits_svc_fork/__init__.py
create mode 100644 src/so_vits_svc_fork/main.py
create mode 100644 src/so_vits_svc_fork/py.typed
create mode 100644 tests/__init__.py
create mode 100644 tests/test_main.py
diff --git a/.all-contributorsrc b/.all-contributorsrc
new file mode 100644
index 00000000..8d66e392
--- /dev/null
+++ b/.all-contributorsrc
@@ -0,0 +1,15 @@
+{
+ "projectName": "so-vits-svc-fork",
+ "projectOwner": "34j",
+ "repoType": "github",
+ "repoHost": "https://github.com",
+ "files": [
+ "README.md"
+ ],
+ "imageSize": 80,
+ "commit": true,
+ "commitConvention": "angular",
+ "contributors": [],
+ "contributorsPerLine": 7,
+ "skipCi": true
+}
diff --git a/.copier-answers.yml b/.copier-answers.yml
new file mode 100644
index 00000000..941491bc
--- /dev/null
+++ b/.copier-answers.yml
@@ -0,0 +1,22 @@
+# Changes here will be overwritten by Copier
+_commit: 2b33a13
+_src_path: gh:34j/pypackage-template-fork
+add_me_as_contributor: true
+copyright_year: '2023'
+documentation: true
+email: 34j.95a2p@simplelogin.com
+full_name: 34j
+github_username: 34j
+initial_commit: true
+open_source_license: MIT
+open_with_vscode: true
+package_name: so_vits_svc_fork
+project_name: SoftVC VITS Singing Voice Conversion Fork
+project_short_description: A fork of so-vits-svc.
+project_slug: so-vits-svc-fork
+run_poetry_install: true
+setup_github: true
+setup_pre_commit: true
+setup_venv: true
+venv_version: '3.10'
+
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..d4a2c440
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,21 @@
+# http://editorconfig.org
+
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+insert_final_newline = true
+charset = utf-8
+end_of_line = lf
+
+[*.bat]
+indent_style = tab
+end_of_line = crlf
+
+[LICENSE]
+insert_final_newline = false
+
+[Makefile]
+indent_style = tab
diff --git a/.flake8 b/.flake8
new file mode 100644
index 00000000..997e99b7
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,3 @@
+[flake8]
+exclude = docs
+max-line-length = 88
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..803ebaaf
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+github: ["34j"]
diff --git a/.github/ISSUE_TEMPLATE/1-bug_report.md b/.github/ISSUE_TEMPLATE/1-bug_report.md
new file mode 100644
index 00000000..4644945a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/1-bug_report.md
@@ -0,0 +1,14 @@
+---
+name: Bug report
+about: Create a report to help us improve
+labels: bug
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md
new file mode 100644
index 00000000..a4c01ccb
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/2-feature-request.md
@@ -0,0 +1,14 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+labels: enhancement
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/labels.toml b/.github/labels.toml
new file mode 100644
index 00000000..56865bef
--- /dev/null
+++ b/.github/labels.toml
@@ -0,0 +1,94 @@
+[breaking]
+color = "ffcc00"
+name = "breaking"
+description = "Breaking change."
+
+[bug]
+color = "d73a4a"
+name = "bug"
+description = "Something isn't working"
+
+[dependencies]
+color = "0366d6"
+name = "dependencies"
+description = "Pull requests that update a dependency file"
+
+[github_actions]
+color = "000000"
+name = "github_actions"
+description = "Update of github actions"
+
+[documentation]
+color = "1bc4a5"
+name = "documentation"
+description = "Improvements or additions to documentation"
+
+[duplicate]
+color = "cfd3d7"
+name = "duplicate"
+description = "This issue or pull request already exists"
+
+[enhancement]
+color = "a2eeef"
+name = "enhancement"
+description = "New feature or request"
+
+["good first issue"]
+color = "7057ff"
+name = "good first issue"
+description = "Good for newcomers"
+
+["help wanted"]
+color = "008672"
+name = "help wanted"
+description = "Extra attention is needed"
+
+[invalid]
+color = "e4e669"
+name = "invalid"
+description = "This doesn't seem right"
+
+[nochangelog]
+color = "555555"
+name = "nochangelog"
+description = "Exclude pull requests from changelog"
+
+[question]
+color = "d876e3"
+name = "question"
+description = "Further information is requested"
+
+[removed]
+color = "e99695"
+name = "removed"
+description = "Removed piece of functionalities."
+
+[tests]
+color = "bfd4f2"
+name = "tests"
+description = "CI, CD and testing related changes"
+
+[wontfix]
+color = "ffffff"
+name = "wontfix"
+description = "This will not be worked on"
+
+[discussion]
+color = "c2e0c6"
+name = "discussion"
+description = "Some discussion around the project"
+
+[hacktoberfest]
+color = "ffa663"
+name = "hacktoberfest"
+description = "Good issues for Hacktoberfest"
+
+[answered]
+color = "0ee2b6"
+name = "answered"
+description = "Automatically closes as answered after a delay"
+
+[waiting]
+color = "5f7972"
+name = "waiting"
+description = "Automatically closes if no answer after a delay"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..3807f7b2
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,90 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+
+concurrency:
+ group: ${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.9"
+ - uses: pre-commit/action@v3.0.0
+
+ # Make sure commit messages follow the conventional commits convention:
+ # https://www.conventionalcommits.org
+ commitlint:
+ name: Lint Commit Messages
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - uses: wagoid/commitlint-github-action@v5.3.1
+
+ test:
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version:
+ - "3.8"
+ - "3.9"
+ - "3.10"
+ - "3.11"
+ os:
+ - ubuntu-latest
+ # - windows-latest
+ # - macOS-latest
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - uses: snok/install-poetry@v1.3.3
+ - name: Install Dependencies
+ run: poetry install
+ shell: bash
+ - name: Test with Pytest
+ run: poetry run pytest --cov-report=xml
+ shell: bash
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v3
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+
+ release:
+ runs-on: ubuntu-latest
+ environment: release
+ if: github.ref == 'refs/heads/main'
+ needs:
+ - test
+ - lint
+ - commitlint
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ # Run semantic release:
+ # - Update CHANGELOG.md
+ # - Update version in code
+ # - Create git tag
+ # - Create GitHub release
+ # - Publish to PyPI
+ - name: Python Semantic Release
+ uses: relekang/python-semantic-release@v7.33.2
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ pypi_token: ${{ secrets.PYPI_TOKEN }}
diff --git a/.github/workflows/hacktoberfest.yml b/.github/workflows/hacktoberfest.yml
new file mode 100644
index 00000000..00239a4a
--- /dev/null
+++ b/.github/workflows/hacktoberfest.yml
@@ -0,0 +1,17 @@
+name: Hacktoberfest
+
+on:
+ schedule:
+ # Run every day in October
+ - cron: "0 0 * 10 *"
+ # Run on the 1st of November to revert
+ - cron: "0 13 1 11 *"
+
+jobs:
+ hacktoberfest:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: browniebroke/hacktoberfest-labeler-action@v2.3.0
+ with:
+ github_token: ${{ secrets.GH_PAT }}
diff --git a/.github/workflows/issue-manager.yml b/.github/workflows/issue-manager.yml
new file mode 100644
index 00000000..e41c2fbd
--- /dev/null
+++ b/.github/workflows/issue-manager.yml
@@ -0,0 +1,32 @@
+name: Issue Manager
+
+on:
+ schedule:
+ - cron: "0 0 * * *"
+ issue_comment:
+ types:
+ - created
+ issues:
+ types:
+ - labeled
+ pull_request_target:
+ types:
+ - labeled
+ workflow_dispatch:
+
+jobs:
+ issue-manager:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: tiangolo/issue-manager@0.4.0
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ config: >
+ {
+ "answered": {
+ "message": "Assuming the original issue was solved, it will be automatically closed now."
+ },
+ "waiting": {
+ "message": "Automatically closing. To re-open, please provide the additional information requested."
+ }
+ }
diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml
new file mode 100644
index 00000000..c9330a48
--- /dev/null
+++ b/.github/workflows/labels.yml
@@ -0,0 +1,22 @@
+name: Sync Github labels
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - ".github/**"
+
+jobs:
+ labels:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: 3.8
+ - name: Install labels
+ run: pip install labels
+ - name: Sync config with Github
+ run: labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..08cfdfd9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,140 @@
+# Created by .ignore support plugin (hsz.mobi)
+### Python template
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+cover/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+# For a library or package, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+# .python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder {{package_name}} settings
+.spyderproject
+.spyproject
+
+# Rope {{package_name}} settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 00000000..450add9c
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,8 @@
+tasks:
+ - command: |
+ pip install poetry
+ PIP_USER=false poetry install
+ - command: |
+ pip install pre-commit
+ pre-commit install
+ PIP_USER=false pre-commit install-hooks
diff --git a/.idea/so-vits-svc-fork.iml b/.idea/so-vits-svc-fork.iml
new file mode 100644
index 00000000..a46d9bbd
--- /dev/null
+++ b/.idea/so-vits-svc-fork.iml
@@ -0,0 +1,9 @@
+
+
+ + + + + +
+ +A fork of so-vits-svc. + +## Installation + +Install this via pip (or your favourite package manager): + +```shell +pip install so-vits-svc-fork +``` + +## Contributors ✨ + +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 00000000..8b827688 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,8 @@ +module.exports = { + extends: ["@commitlint/config-conventional"], + rules: { + "header-max-length": [0, "always", Infinity], + "body-max-line-length": [0, "always", Infinity], + "footer-max-line-length": [0, "always", Infinity], + }, +}; diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..d4bb2cbb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_static/.gitkeep b/docs/_static/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/docs/changelog.md b/docs/changelog.md new file mode 100644 index 00000000..d9e79ba6 --- /dev/null +++ b/docs/changelog.md @@ -0,0 +1,3 @@ +```{include} ../CHANGELOG.md + +``` diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..97d057fc --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,78 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html +from pathlib import Path +from typing import Any + +from sphinx.application import Sphinx +from sphinx.ext import apidoc + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = "SoftVC VITS Singing Voice Conversion Fork" +copyright = "2023, 34j" +author = "34j" +release = "0.0.0" + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "myst_parser", + "sphinx.ext.napoleon", + "sphinx.ext.autodoc", + "sphinx.ext.viewcode", +] +napoleon_google_docstring = False + +# The suffix of source filenames. +source_suffix = [".rst", ".md"] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns: list[str] = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "sphinx_rtd_theme" + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ["_static"] + + +# -- Automatically run sphinx-apidoc ----------------------------------------- + + +def run_apidoc(_: Any) -> None: + docs_path = Path(__file__).parent + module_path = docs_path.parent / "src" / "so_vits_svc_fork" + + apidoc.main( + [ + "--force", + "--module-first", + "-o", + docs_path.as_posix(), + module_path.as_posix(), + ] + ) + + +def setup(app: Sphinx) -> None: + app.connect("builder-inited", run_apidoc) diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 00000000..66c1f98d --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,3 @@ +```{include} ../CONTRIBUTING.md + +``` diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..610cebce --- /dev/null +++ b/docs/index.md @@ -0,0 +1,28 @@ +# Welcome to SoftVC VITS Singing Voice Conversion Fork documentation! + +```{toctree} +:caption: Installation & Usage +:maxdepth: 2 + +installation +usage +``` + +```{toctree} +:caption: Project Info +:maxdepth: 2 + +changelog +contributing +``` + +```{toctree} +:caption: API Reference +:maxdepth: 2 + +so_vits_svc_fork +``` + +```{include} ../README.md + +``` diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 00000000..512a87f6 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,7 @@ +# Installation + +The package is published on [PyPI](https://pypi.org/project/so-vits-svc-fork/) and can be installed with `pip` (or any equivalent): + +```bash +pip install so-vits-svc-fork +``` diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 00000000..954237b9 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/usage.md b/docs/usage.md new file mode 100644 index 00000000..0caf8915 --- /dev/null +++ b/docs/usage.md @@ -0,0 +1,9 @@ +# Usage + +To use this package, import it: + +```python +import so_vits_svc_fork +``` + +TODO: Document usage diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..34f92da0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,92 @@ +[tool.poetry] +name = "so-vits-svc-fork" +version = "0.0.0" +description = "A fork of so-vits-svc." +authors = ["34j <34j.95a2p@simplelogin.com>"] +license = "MIT" +readme = "README.md" +repository = "https://github.com/34j/so-vits-svc-fork" +documentation = "https://so-vits-svc-fork.readthedocs.io" +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Natural Language :: English", + "Operating System :: OS Independent", + "Topic :: Software Development :: Libraries", +] +packages = [ + { include = "so_vits_svc_fork", from = "src" }, +] + +[tool.poetry.urls] +"Bug Tracker" = "https://github.com/34j/so-vits-svc-fork/issues" +"Changelog" = "https://github.com/34j/so-vits-svc-fork/blob/main/CHANGELOG.md" + +[tool.poetry.dependencies] +python = "^3.8" + +[tool.poetry.group.dev.dependencies] +pre-commit = ">=3" +pytest = "^7.0" +pytest-cov = "^3.0" + +[tool.poetry.group.docs] +optional = true + +[tool.poetry.group.docs.dependencies] +myst-parser = ">=0.16" +sphinx = ">=4.0" +sphinx-rtd-theme = ">=1.0" + +[tool.semantic_release] +branch = "main" +version_toml = "pyproject.toml:tool.poetry.version" +version_variable = "src/so_vits_svc_fork/__init__.py:__version__" +build_command = "pip install poetry && poetry build" + +[tool.pytest.ini_options] +addopts = "-v -Wdefault --cov=so_vits_svc_fork --cov-report=term-missing:skip-covered" +pythonpath = ["src"] + +[tool.coverage.run] +branch = true + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "@overload", + "if TYPE_CHECKING", + "raise NotImplementedError", + 'if __name__ == "__main__":', +] + +[tool.isort] +profile = "black" +known_first_party = ["so_vits_svc_fork", "tests"] + +[tool.mypy] +check_untyped_defs = true +disallow_any_generics = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +mypy_path = "src/" +no_implicit_optional = true +show_error_codes = true +warn_unreachable = true +warn_unused_ignores = true +exclude = [ + 'docs/.*', + 'setup.py', +] + +[[tool.mypy.overrides]] +module = "tests.*" +allow_untyped_defs = true + +[[tool.mypy.overrides]] +module = "docs.*" +ignore_errors = true + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..0200e15c --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "extends": ["github>browniebroke/renovate-configs:python"] +} diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..aa05c826 --- /dev/null +++ b/setup.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +# This is a shim to allow GitHub to detect the package, build is done with poetry +# Taken from https://github.com/Textualize/rich + +import setuptools + +if __name__ == "__main__": + setuptools.setup(name="so-vits-svc-fork") diff --git a/src/so_vits_svc_fork/__init__.py b/src/so_vits_svc_fork/__init__.py new file mode 100644 index 00000000..6c8e6b97 --- /dev/null +++ b/src/so_vits_svc_fork/__init__.py @@ -0,0 +1 @@ +__version__ = "0.0.0" diff --git a/src/so_vits_svc_fork/main.py b/src/so_vits_svc_fork/main.py new file mode 100644 index 00000000..f2a43485 --- /dev/null +++ b/src/so_vits_svc_fork/main.py @@ -0,0 +1,2 @@ +def add(n1: int, n2: int) -> int: + return n1 + n2 diff --git a/src/so_vits_svc_fork/py.typed b/src/so_vits_svc_fork/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_main.py b/tests/test_main.py new file mode 100644 index 00000000..3d509bf5 --- /dev/null +++ b/tests/test_main.py @@ -0,0 +1,5 @@ +from so_vits_svc_fork.main import add + + +def test_add(): + assert add(1, 1) == 2