forked from spotify/klio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 790ec67
Showing
241 changed files
with
30,914 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- This form is for bug reports and feature requests ONLY! | ||
If you're looking for help, please find us in the #klio channel on the [Spotify FOSS Slack organization](https://slackin.spotify.com). | ||
--> | ||
|
||
**Is this a BUG REPORT or FEATURE REQUEST?**: | ||
|
||
> Uncomment only one, leave it on its own line: | ||
> | ||
> type: bug | ||
> type: feature | ||
## Environment | ||
<!-- Please include if you've confirmed one version of something works while another one does not --> | ||
- `klio` version(s): | ||
- Operating System(s): | ||
- Python version(s): | ||
|
||
## What happened | ||
|
||
## What you expected to happen | ||
|
||
## How to reproduce it (as minimally and precisely as possible) | ||
|
||
## Anything else we need to know? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Hey, I just made a Pull Request! | ||
|
||
## Description | ||
<!--- Describe your changes --> | ||
|
||
## Motivation and Context | ||
<!--- Why is this change required? What problem does it solve? --> | ||
<!--- If it fixes an open issue, please link to the issue here. --> | ||
|
||
## Have you tested this? If so, how? | ||
<!--- Valid responses are "I have included unit tests." or --> | ||
<!--- "I ran my jobs with this code and it works for me." --> | ||
|
||
## Checklist for PR author(s) | ||
<!--- Put an `x` in all the boxes that apply: --> | ||
- [ ] Changes are covered by unit test | ||
- [ ] All tests pass | ||
- [ ] Relevant documentation updated | ||
- [ ] This PR has NO breaking change | ||
- [ ] This PR has breaking change with big impact and a broad communication is done | ||
|
||
## Release note | ||
<!-- Write your release note: | ||
1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, start the release note with the string "action required: ". Please write it in the imperative. | ||
2. If no release note is required, just write "NONE". | ||
--> | ||
```release-note | ||
``` | ||
|
||
<!--- | ||
for more information on how to submit valuable contributions, | ||
see https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# 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/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
.venv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
site/ | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# PyCharm | ||
.idea/ | ||
|
||
# VS Code | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[run] | ||
parallel = True | ||
branch = True | ||
source = | ||
src | ||
|
||
[paths] | ||
source = | ||
src | ||
.tox/*/site-packages | ||
|
||
[report] | ||
show_missing = True | ||
exclude_lines = | ||
pragma: no cover | ||
if __name__ == .__main__.: | ||
|
||
[xml] | ||
output = cobertura/coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Include anything required to run the library that is *not* a Python file in `src/` | ||
include *.txt tox.ini .coveragerc *.rst *.md | ||
recursive-include tests *.py *.yaml *.txt *.md *.json *.in | ||
|
||
# Documentation | ||
recursive-include docs *.png | ||
recursive-include docs *.ico | ||
recursive-include docs *.md | ||
recursive-include docs *.rst | ||
|
||
# No need for GitHub-specific files. | ||
prune .github |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[bumpversion] | ||
current_version = 0.1.0.dev0 | ||
tag_name = audio-{new_version} | ||
commit = True | ||
tag = True | ||
message = [audio] Bump version: {current_version} → {new_version} | ||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.dev(?P<release>\d+) | ||
serialize = | ||
{major}.{minor}.{patch}.dev{release} | ||
|
||
[bumpversion:file:src/klio_audio/__init__.py] | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright 2019 Spotify AB | ||
|
||
import codecs | ||
import os | ||
import re | ||
|
||
from setuptools import find_packages | ||
from setuptools import setup | ||
|
||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
##### | ||
# Helper functions | ||
##### | ||
def read(*filenames, **kwargs): | ||
""" | ||
Build an absolute path from ``*filenames``, and return contents of | ||
resulting file. Defaults to UTF-8 encoding. | ||
""" | ||
encoding = kwargs.get("encoding", "utf-8") | ||
sep = kwargs.get("sep", "\n") | ||
buf = [] | ||
for fl in filenames: | ||
with codecs.open(os.path.join(HERE, fl), "rb", encoding) as f: | ||
buf.append(f.read()) | ||
return sep.join(buf) | ||
|
||
|
||
def find_meta(meta): | ||
"""Extract __*meta*__ from META_FILE.""" | ||
re_str = r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=meta) | ||
meta_match = re.search(re_str, META_FILE, re.M) | ||
if meta_match: | ||
return meta_match.group(1) | ||
raise RuntimeError("Unable to find __{meta}__ string.".format(meta=meta)) | ||
|
||
|
||
##### | ||
# Project-specific constants | ||
##### | ||
NAME = "klio-audio" | ||
PACKAGE_NAME = "klio_audio" | ||
PACKAGES = find_packages(where="src") | ||
META_PATH = os.path.join("src", PACKAGE_NAME, "__init__.py") | ||
CLASSIFIERS = [ | ||
"Development Status :: 1 - Planning", | ||
"Natural Language :: English", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
] | ||
META_FILE = read(META_PATH) | ||
INSTALL_REQUIRES = [ | ||
"apache-beam", | ||
"klio", | ||
"librosa", | ||
"numpy", | ||
"matplotlib", | ||
] | ||
EXTRAS_REQUIRE = { | ||
"docs": ["sphinx", "interrogate"], | ||
"tests": [ | ||
"coverage", | ||
"pytest>=4.3.0", # 4.3.0 dropped last use of `convert` | ||
"pytest-cov", | ||
"pytest-mock", | ||
], | ||
} | ||
EXTRAS_REQUIRE["dev"] = ( | ||
EXTRAS_REQUIRE["docs"] + EXTRAS_REQUIRE["tests"] + ["bumpversion", "wheel"] | ||
) | ||
|
||
|
||
setup( | ||
name=NAME, | ||
version=find_meta("version"), | ||
description=find_meta("description"), | ||
url=find_meta("uri"), | ||
author=find_meta("author"), | ||
author_email=find_meta("email"), | ||
maintainer=find_meta("author"), | ||
maintainer_email=find_meta("email"), | ||
packages=PACKAGES, | ||
package_dir={"": "src"}, | ||
include_package_data=True, | ||
classifiers=CLASSIFIERS, | ||
zip_safe=False, | ||
install_requires=INSTALL_REQUIRES, | ||
extras_require=EXTRAS_REQUIRE, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright 2020 Spotify AB | ||
# | ||
__author__ = "The klio developers" | ||
__version__ = "0.1.0.dev0" | ||
__email__ = "[email protected]" | ||
__description__ = "Library for audio-related Klio transforms and helpers" | ||
__uri__ = "https://github.com/spotify/klio" |
Oops, something went wrong.