quasimoto 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quasimoto-0.1.0/LICENSE +21 -0
- quasimoto-0.1.0/PKG-INFO +113 -0
- quasimoto-0.1.0/README.md +78 -0
- quasimoto-0.1.0/pyproject.toml +47 -0
- quasimoto-0.1.0/quasimoto/__init__.py +13 -0
- quasimoto-0.1.0/quasimoto/__main__.py +17 -0
- quasimoto-0.1.0/quasimoto/app.py +37 -0
- quasimoto-0.1.0/quasimoto/commands/__init__.py +0 -0
- quasimoto-0.1.0/quasimoto/commands/all.py +32 -0
- quasimoto-0.1.0/quasimoto/commands/gen.py +46 -0
- quasimoto-0.1.0/quasimoto/dev_requirements.txt +13 -0
- quasimoto-0.1.0/quasimoto/entry.py +80 -0
- quasimoto-0.1.0/quasimoto/py.typed +0 -0
- quasimoto-0.1.0/quasimoto/requirements.txt +1 -0
- quasimoto-0.1.0/quasimoto.egg-info/PKG-INFO +113 -0
- quasimoto-0.1.0/quasimoto.egg-info/SOURCES.txt +22 -0
- quasimoto-0.1.0/quasimoto.egg-info/dependency_links.txt +1 -0
- quasimoto-0.1.0/quasimoto.egg-info/entry_points.txt +2 -0
- quasimoto-0.1.0/quasimoto.egg-info/requires.txt +16 -0
- quasimoto-0.1.0/quasimoto.egg-info/top_level.txt +1 -0
- quasimoto-0.1.0/setup.cfg +4 -0
- quasimoto-0.1.0/setup.py +38 -0
- quasimoto-0.1.0/tests/test_entry.py +28 -0
- quasimoto-0.1.0/tests/test_resources.py +13 -0
quasimoto-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Vaughn Kottler
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
quasimoto-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: quasimoto
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A lossless audio generator.
|
|
5
|
+
Home-page: https://github.com/vkottler/quasimoto
|
|
6
|
+
Author: Vaughn Kottler
|
|
7
|
+
Author-email: Vaughn Kottler <vaughnkottler@gmail.com>
|
|
8
|
+
Maintainer-email: Vaughn Kottler <vaughnkottler@gmail.com>
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Operating System :: Unix
|
|
15
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: vcorelib
|
|
21
|
+
Provides-Extra: test
|
|
22
|
+
Requires-Dist: pylint; extra == "test"
|
|
23
|
+
Requires-Dist: flake8; extra == "test"
|
|
24
|
+
Requires-Dist: black; extra == "test"
|
|
25
|
+
Requires-Dist: ruff; extra == "test"
|
|
26
|
+
Requires-Dist: mypy; extra == "test"
|
|
27
|
+
Requires-Dist: isort; extra == "test"
|
|
28
|
+
Requires-Dist: yamllint; extra == "test"
|
|
29
|
+
Requires-Dist: yambs; extra == "test"
|
|
30
|
+
Requires-Dist: vmklib; extra == "test"
|
|
31
|
+
Requires-Dist: sphinx; extra == "test"
|
|
32
|
+
Requires-Dist: sphinx-book-theme; extra == "test"
|
|
33
|
+
Requires-Dist: setuptools-wrapper; extra == "test"
|
|
34
|
+
Requires-Dist: types-setuptools; extra == "test"
|
|
35
|
+
|
|
36
|
+
<!--
|
|
37
|
+
=====================================
|
|
38
|
+
generator=datazen
|
|
39
|
+
version=3.1.4
|
|
40
|
+
hash=32f83dc4656170a9cfc0c52220eb0ead
|
|
41
|
+
=====================================
|
|
42
|
+
-->
|
|
43
|
+
|
|
44
|
+
# quasimoto ([0.1.0](https://pypi.org/project/quasimoto/))
|
|
45
|
+
|
|
46
|
+
[](https://pypi.org/project/quasimoto/)
|
|
47
|
+

|
|
48
|
+
[](https://codecov.io/github/vkottler/quasimoto)
|
|
49
|
+

|
|
50
|
+

|
|
51
|
+
|
|
52
|
+
*A lossless audio generator.*
|
|
53
|
+
|
|
54
|
+
## Documentation
|
|
55
|
+
|
|
56
|
+
### Generated
|
|
57
|
+
|
|
58
|
+
* By [sphinx-apidoc](https://vkottler.github.io/python/sphinx/quasimoto)
|
|
59
|
+
(What's [`sphinx-apidoc`](https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html)?)
|
|
60
|
+
* By [pydoc](https://vkottler.github.io/python/pydoc/quasimoto.html)
|
|
61
|
+
(What's [`pydoc`](https://docs.python.org/3/library/pydoc.html)?)
|
|
62
|
+
|
|
63
|
+
## Python Version Support
|
|
64
|
+
|
|
65
|
+
This package is tested with the following Python minor versions:
|
|
66
|
+
|
|
67
|
+
* [`python3.11`](https://docs.python.org/3.11/)
|
|
68
|
+
* [`python3.12`](https://docs.python.org/3.12/)
|
|
69
|
+
|
|
70
|
+
## Platform Support
|
|
71
|
+
|
|
72
|
+
This package is tested on the following platforms:
|
|
73
|
+
|
|
74
|
+
* `ubuntu-latest`
|
|
75
|
+
* `macos-latest`
|
|
76
|
+
* `windows-latest`
|
|
77
|
+
|
|
78
|
+
# Introduction
|
|
79
|
+
|
|
80
|
+
# Command-line Options
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
$ ./venv3.11/bin/quasimoto -h
|
|
84
|
+
|
|
85
|
+
usage: quasimoto [-h] [--version] [-v] [-q] [--curses] [--no-uvloop] [-C DIR]
|
|
86
|
+
{gen,noop} ...
|
|
87
|
+
|
|
88
|
+
A lossless audio generator.
|
|
89
|
+
|
|
90
|
+
options:
|
|
91
|
+
-h, --help show this help message and exit
|
|
92
|
+
--version show program's version number and exit
|
|
93
|
+
-v, --verbose set to increase logging verbosity
|
|
94
|
+
-q, --quiet set to reduce output
|
|
95
|
+
--curses whether or not to use curses.wrapper when starting
|
|
96
|
+
--no-uvloop whether or not to disable uvloop as event loop driver
|
|
97
|
+
-C DIR, --dir DIR execute from a specific directory
|
|
98
|
+
|
|
99
|
+
commands:
|
|
100
|
+
{gen,noop} set of available commands
|
|
101
|
+
gen generate audio
|
|
102
|
+
noop command stub (does nothing)
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
# Internal Dependency Graph
|
|
107
|
+
|
|
108
|
+
A coarse view of the internal structure and scale of
|
|
109
|
+
`quasimoto`'s source.
|
|
110
|
+
Generated using [pydeps](https://github.com/thebjorn/pydeps) (via
|
|
111
|
+
`mk python-deps`).
|
|
112
|
+
|
|
113
|
+

|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
=====================================
|
|
3
|
+
generator=datazen
|
|
4
|
+
version=3.1.4
|
|
5
|
+
hash=32f83dc4656170a9cfc0c52220eb0ead
|
|
6
|
+
=====================================
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# quasimoto ([0.1.0](https://pypi.org/project/quasimoto/))
|
|
10
|
+
|
|
11
|
+
[](https://pypi.org/project/quasimoto/)
|
|
12
|
+

|
|
13
|
+
[](https://codecov.io/github/vkottler/quasimoto)
|
|
14
|
+

|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
*A lossless audio generator.*
|
|
18
|
+
|
|
19
|
+
## Documentation
|
|
20
|
+
|
|
21
|
+
### Generated
|
|
22
|
+
|
|
23
|
+
* By [sphinx-apidoc](https://vkottler.github.io/python/sphinx/quasimoto)
|
|
24
|
+
(What's [`sphinx-apidoc`](https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html)?)
|
|
25
|
+
* By [pydoc](https://vkottler.github.io/python/pydoc/quasimoto.html)
|
|
26
|
+
(What's [`pydoc`](https://docs.python.org/3/library/pydoc.html)?)
|
|
27
|
+
|
|
28
|
+
## Python Version Support
|
|
29
|
+
|
|
30
|
+
This package is tested with the following Python minor versions:
|
|
31
|
+
|
|
32
|
+
* [`python3.11`](https://docs.python.org/3.11/)
|
|
33
|
+
* [`python3.12`](https://docs.python.org/3.12/)
|
|
34
|
+
|
|
35
|
+
## Platform Support
|
|
36
|
+
|
|
37
|
+
This package is tested on the following platforms:
|
|
38
|
+
|
|
39
|
+
* `ubuntu-latest`
|
|
40
|
+
* `macos-latest`
|
|
41
|
+
* `windows-latest`
|
|
42
|
+
|
|
43
|
+
# Introduction
|
|
44
|
+
|
|
45
|
+
# Command-line Options
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
$ ./venv3.11/bin/quasimoto -h
|
|
49
|
+
|
|
50
|
+
usage: quasimoto [-h] [--version] [-v] [-q] [--curses] [--no-uvloop] [-C DIR]
|
|
51
|
+
{gen,noop} ...
|
|
52
|
+
|
|
53
|
+
A lossless audio generator.
|
|
54
|
+
|
|
55
|
+
options:
|
|
56
|
+
-h, --help show this help message and exit
|
|
57
|
+
--version show program's version number and exit
|
|
58
|
+
-v, --verbose set to increase logging verbosity
|
|
59
|
+
-q, --quiet set to reduce output
|
|
60
|
+
--curses whether or not to use curses.wrapper when starting
|
|
61
|
+
--no-uvloop whether or not to disable uvloop as event loop driver
|
|
62
|
+
-C DIR, --dir DIR execute from a specific directory
|
|
63
|
+
|
|
64
|
+
commands:
|
|
65
|
+
{gen,noop} set of available commands
|
|
66
|
+
gen generate audio
|
|
67
|
+
noop command stub (does nothing)
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
# Internal Dependency Graph
|
|
72
|
+
|
|
73
|
+
A coarse view of the internal structure and scale of
|
|
74
|
+
`quasimoto`'s source.
|
|
75
|
+
Generated using [pydeps](https://github.com/thebjorn/pydeps) (via
|
|
76
|
+
`mk python-deps`).
|
|
77
|
+
|
|
78
|
+

|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools-wrapper", "trove-classifiers"]
|
|
3
|
+
build-backend = "setuptools.build_meta:__legacy__"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "quasimoto"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A lossless audio generator."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "Vaughn Kottler", email = "vaughnkottler@gmail.com"}
|
|
13
|
+
]
|
|
14
|
+
maintainers = [
|
|
15
|
+
{name = "Vaughn Kottler", email = "vaughnkottler@gmail.com"}
|
|
16
|
+
]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Operating System :: Microsoft :: Windows",
|
|
21
|
+
"Operating System :: MacOS",
|
|
22
|
+
"Operating System :: POSIX :: Linux",
|
|
23
|
+
"Operating System :: Unix",
|
|
24
|
+
"Development Status :: 5 - Production/Stable",
|
|
25
|
+
"License :: OSI Approved :: MIT License"
|
|
26
|
+
]
|
|
27
|
+
dynamic = ["dependencies"]
|
|
28
|
+
|
|
29
|
+
[project.optional-dependencies]
|
|
30
|
+
test = [
|
|
31
|
+
"pylint",
|
|
32
|
+
"flake8",
|
|
33
|
+
"black",
|
|
34
|
+
"ruff",
|
|
35
|
+
"mypy",
|
|
36
|
+
"isort",
|
|
37
|
+
"yamllint",
|
|
38
|
+
"yambs",
|
|
39
|
+
"vmklib",
|
|
40
|
+
"sphinx",
|
|
41
|
+
"sphinx-book-theme",
|
|
42
|
+
"setuptools-wrapper",
|
|
43
|
+
"types-setuptools"
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[project.scripts]
|
|
47
|
+
quasimoto = "quasimoto.entry:main"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# =====================================
|
|
2
|
+
# generator=datazen
|
|
3
|
+
# version=3.1.4
|
|
4
|
+
# hash=5270e41d1149e6ca425f99c76f92c409
|
|
5
|
+
# =====================================
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
Useful defaults and other package metadata.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
DESCRIPTION = "A lossless audio generator."
|
|
12
|
+
PKG_NAME = "quasimoto"
|
|
13
|
+
VERSION = "0.1.0"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# =====================================
|
|
2
|
+
# generator=datazen
|
|
3
|
+
# version=3.1.4
|
|
4
|
+
# hash=dd15fcaae00a97a45b4568b47c90f634
|
|
5
|
+
# =====================================
|
|
6
|
+
"""
|
|
7
|
+
quasimoto - Package's default entry-point.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
# built-in
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
# internal
|
|
14
|
+
from quasimoto.entry import main
|
|
15
|
+
|
|
16
|
+
if __name__ == "__main__":
|
|
17
|
+
sys.exit(main(sys.argv))
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# =====================================
|
|
2
|
+
# generator=datazen
|
|
3
|
+
# version=3.1.4
|
|
4
|
+
# hash=6cf9ea2f116be006d3ff0bf0607799ef
|
|
5
|
+
# =====================================
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
This package's command-line entry-point application.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# built-in
|
|
12
|
+
from argparse import ArgumentParser as _ArgumentParser
|
|
13
|
+
from argparse import Namespace as _Namespace
|
|
14
|
+
from typing import Optional as _Optional
|
|
15
|
+
|
|
16
|
+
# third-party
|
|
17
|
+
from vcorelib.args import CommandFunction as _CommandFunction
|
|
18
|
+
from vcorelib.args import app_args as _app_args
|
|
19
|
+
|
|
20
|
+
# internal
|
|
21
|
+
from quasimoto.commands.all import commands
|
|
22
|
+
|
|
23
|
+
COMMAND: _Optional[_CommandFunction] = None
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def entry(args: _Namespace) -> int:
|
|
27
|
+
"""Execute the requested task."""
|
|
28
|
+
|
|
29
|
+
assert COMMAND is not None
|
|
30
|
+
return COMMAND(args)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def add_app_args(parser: _ArgumentParser) -> None:
|
|
34
|
+
"""Add application-specific arguments to the command-line parser."""
|
|
35
|
+
global COMMAND # pylint: disable=global-statement
|
|
36
|
+
add, COMMAND = _app_args(commands, {})
|
|
37
|
+
add(parser)
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# =====================================
|
|
2
|
+
# generator=datazen
|
|
3
|
+
# version=3.1.4
|
|
4
|
+
# hash=b8d2bc2e3ccbd1d7eab451040c2edb8e
|
|
5
|
+
# =====================================
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
A module aggregating package commands.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# built-in
|
|
12
|
+
from typing import List as _List
|
|
13
|
+
from typing import Tuple as _Tuple
|
|
14
|
+
|
|
15
|
+
# third-party
|
|
16
|
+
from vcorelib.args import CommandRegister as _CommandRegister
|
|
17
|
+
|
|
18
|
+
# internal
|
|
19
|
+
from quasimoto.commands.gen import add_gen_cmd
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def commands() -> _List[_Tuple[str, str, _CommandRegister]]:
|
|
23
|
+
"""Get this package's commands."""
|
|
24
|
+
|
|
25
|
+
return [
|
|
26
|
+
(
|
|
27
|
+
"gen",
|
|
28
|
+
"generate audio",
|
|
29
|
+
add_gen_cmd,
|
|
30
|
+
),
|
|
31
|
+
("noop", "command stub (does nothing)", lambda _: lambda _: 0),
|
|
32
|
+
]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""
|
|
2
|
+
An entry-point for the 'gen' command.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# built-in
|
|
6
|
+
import argparse
|
|
7
|
+
from enum import StrEnum
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
# third-party
|
|
11
|
+
from vcorelib.args import CommandFunction
|
|
12
|
+
|
|
13
|
+
# internal
|
|
14
|
+
from quasimoto import PKG_NAME
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class AudioFileTypes(StrEnum):
|
|
18
|
+
"""An enumeration for supported file types."""
|
|
19
|
+
|
|
20
|
+
WAVE = "wav"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
DEFAULT_FORMAT = AudioFileTypes.WAVE
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def gen_cmd(args: argparse.Namespace) -> int:
|
|
27
|
+
"""Execute the arbiter command."""
|
|
28
|
+
|
|
29
|
+
with args.output.open("wb") as out_fd:
|
|
30
|
+
print(out_fd)
|
|
31
|
+
|
|
32
|
+
return 0
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def add_gen_cmd(parser: argparse.ArgumentParser) -> CommandFunction:
|
|
36
|
+
"""Add gen-command arguments to its parser."""
|
|
37
|
+
|
|
38
|
+
parser.add_argument(
|
|
39
|
+
"-o",
|
|
40
|
+
"--output",
|
|
41
|
+
type=Path,
|
|
42
|
+
default=f"{PKG_NAME}.{DEFAULT_FORMAT}",
|
|
43
|
+
help="output file to write",
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
return gen_cmd
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# =====================================
|
|
2
|
+
# generator=datazen
|
|
3
|
+
# version=3.1.4
|
|
4
|
+
# hash=281a9fdcd0c2f153d07ec1a8acb71936
|
|
5
|
+
# =====================================
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
This package's command-line entry-point (boilerplate).
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# built-in
|
|
12
|
+
import argparse
|
|
13
|
+
import os
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
import sys
|
|
16
|
+
from typing import List
|
|
17
|
+
|
|
18
|
+
# third-party
|
|
19
|
+
from vcorelib.logging import init_logging, logging_args
|
|
20
|
+
|
|
21
|
+
# internal
|
|
22
|
+
from quasimoto import DESCRIPTION, VERSION
|
|
23
|
+
from quasimoto.app import add_app_args, entry
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def main(argv: List[str] = None) -> int:
|
|
27
|
+
"""Program entry-point."""
|
|
28
|
+
|
|
29
|
+
result = 0
|
|
30
|
+
|
|
31
|
+
# fall back on command-line arguments
|
|
32
|
+
command_args = sys.argv
|
|
33
|
+
if argv is not None:
|
|
34
|
+
command_args = argv
|
|
35
|
+
|
|
36
|
+
# initialize argument parsing
|
|
37
|
+
parser = argparse.ArgumentParser(description=DESCRIPTION)
|
|
38
|
+
parser.add_argument(
|
|
39
|
+
"--version",
|
|
40
|
+
action="version",
|
|
41
|
+
version=f"%(prog)s {VERSION}",
|
|
42
|
+
)
|
|
43
|
+
logging_args(parser)
|
|
44
|
+
parser.add_argument(
|
|
45
|
+
"-C",
|
|
46
|
+
"--dir",
|
|
47
|
+
default=Path.cwd(),
|
|
48
|
+
dest="dir",
|
|
49
|
+
type=Path,
|
|
50
|
+
help="execute from a specific directory",
|
|
51
|
+
)
|
|
52
|
+
starting_dir = Path.cwd()
|
|
53
|
+
|
|
54
|
+
add_app_args(parser)
|
|
55
|
+
|
|
56
|
+
# parse arguments and execute the requested command
|
|
57
|
+
try:
|
|
58
|
+
args = parser.parse_args(command_args[1:])
|
|
59
|
+
args.version = VERSION
|
|
60
|
+
args.dir = args.dir.resolve()
|
|
61
|
+
|
|
62
|
+
# initialize logging
|
|
63
|
+
init_logging(
|
|
64
|
+
args, default_format="%(name)-36s - %(levelname)-6s - %(message)s"
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# change to the specified directory
|
|
68
|
+
os.chdir(args.dir)
|
|
69
|
+
|
|
70
|
+
# run the application
|
|
71
|
+
result = entry(args)
|
|
72
|
+
except SystemExit as exc:
|
|
73
|
+
result = 1
|
|
74
|
+
if exc.code is not None and isinstance(exc.code, int):
|
|
75
|
+
result = exc.code
|
|
76
|
+
|
|
77
|
+
# return to starting dir
|
|
78
|
+
os.chdir(starting_dir)
|
|
79
|
+
|
|
80
|
+
return result
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
vcorelib
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: quasimoto
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A lossless audio generator.
|
|
5
|
+
Home-page: https://github.com/vkottler/quasimoto
|
|
6
|
+
Author: Vaughn Kottler
|
|
7
|
+
Author-email: Vaughn Kottler <vaughnkottler@gmail.com>
|
|
8
|
+
Maintainer-email: Vaughn Kottler <vaughnkottler@gmail.com>
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Operating System :: Unix
|
|
15
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: vcorelib
|
|
21
|
+
Provides-Extra: test
|
|
22
|
+
Requires-Dist: pylint; extra == "test"
|
|
23
|
+
Requires-Dist: flake8; extra == "test"
|
|
24
|
+
Requires-Dist: black; extra == "test"
|
|
25
|
+
Requires-Dist: ruff; extra == "test"
|
|
26
|
+
Requires-Dist: mypy; extra == "test"
|
|
27
|
+
Requires-Dist: isort; extra == "test"
|
|
28
|
+
Requires-Dist: yamllint; extra == "test"
|
|
29
|
+
Requires-Dist: yambs; extra == "test"
|
|
30
|
+
Requires-Dist: vmklib; extra == "test"
|
|
31
|
+
Requires-Dist: sphinx; extra == "test"
|
|
32
|
+
Requires-Dist: sphinx-book-theme; extra == "test"
|
|
33
|
+
Requires-Dist: setuptools-wrapper; extra == "test"
|
|
34
|
+
Requires-Dist: types-setuptools; extra == "test"
|
|
35
|
+
|
|
36
|
+
<!--
|
|
37
|
+
=====================================
|
|
38
|
+
generator=datazen
|
|
39
|
+
version=3.1.4
|
|
40
|
+
hash=32f83dc4656170a9cfc0c52220eb0ead
|
|
41
|
+
=====================================
|
|
42
|
+
-->
|
|
43
|
+
|
|
44
|
+
# quasimoto ([0.1.0](https://pypi.org/project/quasimoto/))
|
|
45
|
+
|
|
46
|
+
[](https://pypi.org/project/quasimoto/)
|
|
47
|
+

|
|
48
|
+
[](https://codecov.io/github/vkottler/quasimoto)
|
|
49
|
+

|
|
50
|
+

|
|
51
|
+
|
|
52
|
+
*A lossless audio generator.*
|
|
53
|
+
|
|
54
|
+
## Documentation
|
|
55
|
+
|
|
56
|
+
### Generated
|
|
57
|
+
|
|
58
|
+
* By [sphinx-apidoc](https://vkottler.github.io/python/sphinx/quasimoto)
|
|
59
|
+
(What's [`sphinx-apidoc`](https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html)?)
|
|
60
|
+
* By [pydoc](https://vkottler.github.io/python/pydoc/quasimoto.html)
|
|
61
|
+
(What's [`pydoc`](https://docs.python.org/3/library/pydoc.html)?)
|
|
62
|
+
|
|
63
|
+
## Python Version Support
|
|
64
|
+
|
|
65
|
+
This package is tested with the following Python minor versions:
|
|
66
|
+
|
|
67
|
+
* [`python3.11`](https://docs.python.org/3.11/)
|
|
68
|
+
* [`python3.12`](https://docs.python.org/3.12/)
|
|
69
|
+
|
|
70
|
+
## Platform Support
|
|
71
|
+
|
|
72
|
+
This package is tested on the following platforms:
|
|
73
|
+
|
|
74
|
+
* `ubuntu-latest`
|
|
75
|
+
* `macos-latest`
|
|
76
|
+
* `windows-latest`
|
|
77
|
+
|
|
78
|
+
# Introduction
|
|
79
|
+
|
|
80
|
+
# Command-line Options
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
$ ./venv3.11/bin/quasimoto -h
|
|
84
|
+
|
|
85
|
+
usage: quasimoto [-h] [--version] [-v] [-q] [--curses] [--no-uvloop] [-C DIR]
|
|
86
|
+
{gen,noop} ...
|
|
87
|
+
|
|
88
|
+
A lossless audio generator.
|
|
89
|
+
|
|
90
|
+
options:
|
|
91
|
+
-h, --help show this help message and exit
|
|
92
|
+
--version show program's version number and exit
|
|
93
|
+
-v, --verbose set to increase logging verbosity
|
|
94
|
+
-q, --quiet set to reduce output
|
|
95
|
+
--curses whether or not to use curses.wrapper when starting
|
|
96
|
+
--no-uvloop whether or not to disable uvloop as event loop driver
|
|
97
|
+
-C DIR, --dir DIR execute from a specific directory
|
|
98
|
+
|
|
99
|
+
commands:
|
|
100
|
+
{gen,noop} set of available commands
|
|
101
|
+
gen generate audio
|
|
102
|
+
noop command stub (does nothing)
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
# Internal Dependency Graph
|
|
107
|
+
|
|
108
|
+
A coarse view of the internal structure and scale of
|
|
109
|
+
`quasimoto`'s source.
|
|
110
|
+
Generated using [pydeps](https://github.com/thebjorn/pydeps) (via
|
|
111
|
+
`mk python-deps`).
|
|
112
|
+
|
|
113
|
+

|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.py
|
|
5
|
+
quasimoto/__init__.py
|
|
6
|
+
quasimoto/__main__.py
|
|
7
|
+
quasimoto/app.py
|
|
8
|
+
quasimoto/dev_requirements.txt
|
|
9
|
+
quasimoto/entry.py
|
|
10
|
+
quasimoto/py.typed
|
|
11
|
+
quasimoto/requirements.txt
|
|
12
|
+
quasimoto.egg-info/PKG-INFO
|
|
13
|
+
quasimoto.egg-info/SOURCES.txt
|
|
14
|
+
quasimoto.egg-info/dependency_links.txt
|
|
15
|
+
quasimoto.egg-info/entry_points.txt
|
|
16
|
+
quasimoto.egg-info/requires.txt
|
|
17
|
+
quasimoto.egg-info/top_level.txt
|
|
18
|
+
quasimoto/commands/__init__.py
|
|
19
|
+
quasimoto/commands/all.py
|
|
20
|
+
quasimoto/commands/gen.py
|
|
21
|
+
tests/test_entry.py
|
|
22
|
+
tests/test_resources.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
quasimoto
|
quasimoto-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# =====================================
|
|
2
|
+
# generator=datazen
|
|
3
|
+
# version=3.1.4
|
|
4
|
+
# hash=372222f3f6b266691437ff06877b630c
|
|
5
|
+
# =====================================
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
quasimoto - Package definition for distribution.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# third-party
|
|
12
|
+
try:
|
|
13
|
+
from setuptools_wrapper.setup import setup
|
|
14
|
+
except (ImportError, ModuleNotFoundError):
|
|
15
|
+
from quasimoto_bootstrap.setup import setup # type: ignore
|
|
16
|
+
|
|
17
|
+
# internal
|
|
18
|
+
from quasimoto import DESCRIPTION, PKG_NAME, VERSION
|
|
19
|
+
|
|
20
|
+
author_info = {
|
|
21
|
+
"name": "Vaughn Kottler",
|
|
22
|
+
"email": "vaughnkottler@gmail.com",
|
|
23
|
+
"username": "vkottler",
|
|
24
|
+
}
|
|
25
|
+
pkg_info = {
|
|
26
|
+
"name": PKG_NAME,
|
|
27
|
+
"slug": PKG_NAME.replace("-", "_"),
|
|
28
|
+
"version": VERSION,
|
|
29
|
+
"description": DESCRIPTION,
|
|
30
|
+
"versions": [
|
|
31
|
+
"3.11",
|
|
32
|
+
"3.12",
|
|
33
|
+
],
|
|
34
|
+
}
|
|
35
|
+
setup(
|
|
36
|
+
pkg_info,
|
|
37
|
+
author_info,
|
|
38
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""
|
|
2
|
+
quasimoto - Test the program's entry-point.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# built-in
|
|
6
|
+
from subprocess import check_output
|
|
7
|
+
from sys import executable
|
|
8
|
+
from unittest.mock import patch
|
|
9
|
+
|
|
10
|
+
# module under test
|
|
11
|
+
from quasimoto import PKG_NAME
|
|
12
|
+
from quasimoto.entry import main as quasimoto_main
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_entry_basic():
|
|
16
|
+
"""Test basic argument parsing."""
|
|
17
|
+
|
|
18
|
+
args = [PKG_NAME, "noop"]
|
|
19
|
+
assert quasimoto_main(args) == 0
|
|
20
|
+
|
|
21
|
+
with patch("quasimoto.entry.entry", side_effect=SystemExit(1)):
|
|
22
|
+
assert quasimoto_main(args) != 0
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def test_package_entry():
|
|
26
|
+
"""Test the command-line entry through the 'python -m' invocation."""
|
|
27
|
+
|
|
28
|
+
check_output([executable, "-m", "quasimoto", "-h"])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Test that we can load test resources.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# internal
|
|
6
|
+
from tests.resources import resource
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def test_resources_basic():
|
|
10
|
+
"""Test that we can locate test data."""
|
|
11
|
+
|
|
12
|
+
assert resource("test.txt").is_file()
|
|
13
|
+
assert resource("test.txt", valid=False).is_file()
|