audmodel 1.3.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.
- audmodel-1.3.0/.github/workflows/doc.yml +39 -0
- audmodel-1.3.0/.github/workflows/linter.yml +29 -0
- audmodel-1.3.0/.github/workflows/publish.yml +87 -0
- audmodel-1.3.0/.github/workflows/test.yml +57 -0
- audmodel-1.3.0/.gitignore +11 -0
- audmodel-1.3.0/.pre-commit-config.yaml +26 -0
- audmodel-1.3.0/CHANGELOG.rst +283 -0
- audmodel-1.3.0/CONTRIBUTING.rst +125 -0
- audmodel-1.3.0/LICENSE +25 -0
- audmodel-1.3.0/PKG-INFO +58 -0
- audmodel-1.3.0/README.rst +5 -0
- audmodel-1.3.0/audmodel/__init__.py +35 -0
- audmodel-1.3.0/audmodel/core/__init__.py +0 -0
- audmodel-1.3.0/audmodel/core/api.py +1005 -0
- audmodel-1.3.0/audmodel/core/backend.py +625 -0
- audmodel-1.3.0/audmodel/core/config.py +22 -0
- audmodel-1.3.0/audmodel/core/conftest.py +35 -0
- audmodel-1.3.0/audmodel/core/define.py +14 -0
- audmodel-1.3.0/audmodel/core/repository.py +148 -0
- audmodel-1.3.0/audmodel/core/utils.py +87 -0
- audmodel-1.3.0/audmodel.egg-info/PKG-INFO +58 -0
- audmodel-1.3.0/audmodel.egg-info/SOURCES.txt +52 -0
- audmodel-1.3.0/audmodel.egg-info/dependency_links.txt +1 -0
- audmodel-1.3.0/audmodel.egg-info/requires.txt +2 -0
- audmodel-1.3.0/audmodel.egg-info/top_level.txt +2 -0
- audmodel-1.3.0/docs/_static/css/custom.css +78 -0
- audmodel-1.3.0/docs/_templates/autosummary/base.rst +5 -0
- audmodel-1.3.0/docs/_templates/autosummary/class.rst +19 -0
- audmodel-1.3.0/docs/_templates/autosummary/function.rst +5 -0
- audmodel-1.3.0/docs/api-src/audmodel.rst +29 -0
- audmodel-1.3.0/docs/authentication.rst +41 -0
- audmodel-1.3.0/docs/changelog.rst +1 -0
- audmodel-1.3.0/docs/conf.py +93 -0
- audmodel-1.3.0/docs/contributing.rst +1 -0
- audmodel-1.3.0/docs/genindex.rst +2 -0
- audmodel-1.3.0/docs/index.rst +28 -0
- audmodel-1.3.0/docs/installation.rst +11 -0
- audmodel-1.3.0/docs/requirements.txt +8 -0
- audmodel-1.3.0/docs/usage.rst +334 -0
- audmodel-1.3.0/misc/icon.png +0 -0
- audmodel-1.3.0/pyproject.toml +210 -0
- audmodel-1.3.0/requirements.txt +1 -0
- audmodel-1.3.0/setup.cfg +4 -0
- audmodel-1.3.0/tests/__init__.py +0 -0
- audmodel-1.3.0/tests/auvad_stereo.wav +0 -0
- audmodel-1.3.0/tests/conftest.py +133 -0
- audmodel-1.3.0/tests/requirements.txt +4 -0
- audmodel-1.3.0/tests/test_api.py +298 -0
- audmodel-1.3.0/tests/test_default_cache_root.py +12 -0
- audmodel-1.3.0/tests/test_legacy_uid.py +126 -0
- audmodel-1.3.0/tests/test_publish.py +251 -0
- audmodel-1.3.0/tests/test_repository.py +150 -0
- audmodel-1.3.0/tests/test_update.py +76 -0
- audmodel-1.3.0/tests/test_versions.py +37 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, dev ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, dev ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
os: [ ubuntu-latest ]
|
|
16
|
+
python-version: [ '3.10' ]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
|
|
26
|
+
- name: Install package
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
pip install -r requirements.txt
|
|
30
|
+
|
|
31
|
+
# DOCS
|
|
32
|
+
- name: Install docs requirements
|
|
33
|
+
run: pip install -r docs/requirements.txt
|
|
34
|
+
|
|
35
|
+
- name: Test building documentation
|
|
36
|
+
run: python -m sphinx docs/ docs/_build/ -b html -W
|
|
37
|
+
|
|
38
|
+
- name: Check links in documentation
|
|
39
|
+
run: python -m sphinx docs/ docs/_build/ -b linkcheck -W
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Linter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, dev ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, dev ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python 3.10
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.10'
|
|
21
|
+
|
|
22
|
+
- name: Install pre-commit hooks
|
|
23
|
+
run: |
|
|
24
|
+
pip install pre-commit
|
|
25
|
+
pre-commit install --install-hooks
|
|
26
|
+
|
|
27
|
+
- name: Code style check via pre-commit
|
|
28
|
+
run: |
|
|
29
|
+
pre-commit run --all-files
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
deploy:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: release
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
id-token: write
|
|
15
|
+
concurrency:
|
|
16
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 2
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: '3.10'
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
pip install build virtualenv
|
|
32
|
+
|
|
33
|
+
# PyPI package
|
|
34
|
+
- name: Build Python package
|
|
35
|
+
run: python -m build
|
|
36
|
+
|
|
37
|
+
- name: Publish Python package to PyPI
|
|
38
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
39
|
+
|
|
40
|
+
# Remove apt repos that are known to break from time to time
|
|
41
|
+
# See https://github.com/actions/virtual-environments/issues/323
|
|
42
|
+
- name: Remove broken apt repos
|
|
43
|
+
run: |
|
|
44
|
+
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
|
|
45
|
+
|
|
46
|
+
# Documentation
|
|
47
|
+
- name: Install doc dependencies
|
|
48
|
+
run: |
|
|
49
|
+
sudo apt-get install --no-install-recommends --yes libsndfile1 sox
|
|
50
|
+
sudo apt-get install --yes graphviz
|
|
51
|
+
pip install -r requirements.txt
|
|
52
|
+
pip install -r docs/requirements.txt
|
|
53
|
+
|
|
54
|
+
- name: Build documentation
|
|
55
|
+
run: |
|
|
56
|
+
python -m sphinx docs/ docs/_build/ -b html
|
|
57
|
+
|
|
58
|
+
- name: Deploy documentation to Github pages
|
|
59
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
60
|
+
with:
|
|
61
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
62
|
+
publish_dir: ./docs/_build
|
|
63
|
+
|
|
64
|
+
# Github release
|
|
65
|
+
- name: Read CHANGELOG
|
|
66
|
+
id: changelog
|
|
67
|
+
run: |
|
|
68
|
+
# Get bullet points from last CHANGELOG entry
|
|
69
|
+
CHANGELOG=$(git diff -U0 HEAD^ HEAD | grep '^[+][\* ]' | sed 's/\+//')
|
|
70
|
+
echo "Got changelog: $CHANGELOG"
|
|
71
|
+
# Support for multiline, see
|
|
72
|
+
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
|
|
73
|
+
{
|
|
74
|
+
echo 'body<<EOF'
|
|
75
|
+
echo "$CHANGELOG"
|
|
76
|
+
echo EOF
|
|
77
|
+
} >> "$GITHUB_OUTPUT"
|
|
78
|
+
|
|
79
|
+
- name: Create release on Github
|
|
80
|
+
id: create_release
|
|
81
|
+
uses: softprops/action-gh-release@v2
|
|
82
|
+
env:
|
|
83
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
84
|
+
with:
|
|
85
|
+
tag_name: ${{ github.ref }}
|
|
86
|
+
name: Release ${{ github.ref_name }}
|
|
87
|
+
body: ${{ steps.changelog.outputs.body }}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, dev ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, dev ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
include:
|
|
16
|
+
# Different platforms
|
|
17
|
+
- os: ubuntu-latest
|
|
18
|
+
python-version: '3.10'
|
|
19
|
+
- os: macOS-latest
|
|
20
|
+
python-version: '3.10'
|
|
21
|
+
- os: windows-latest
|
|
22
|
+
python-version: '3.10'
|
|
23
|
+
# Other Python versions
|
|
24
|
+
- os: ubuntu-latest
|
|
25
|
+
python-version: '3.9'
|
|
26
|
+
- os: ubuntu-latest
|
|
27
|
+
python-version: '3.11'
|
|
28
|
+
- os: ubuntu-latest
|
|
29
|
+
python-version: '3.12'
|
|
30
|
+
- os: ubuntu-latest
|
|
31
|
+
python-version: '3.13'
|
|
32
|
+
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
37
|
+
uses: actions/setup-python@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: ${{ matrix.python-version }}
|
|
40
|
+
|
|
41
|
+
- name: Install package
|
|
42
|
+
run: |
|
|
43
|
+
python -m pip install --upgrade pip
|
|
44
|
+
pip install -r requirements.txt
|
|
45
|
+
|
|
46
|
+
- name: Install tests requirements
|
|
47
|
+
run: pip install -r tests/requirements.txt
|
|
48
|
+
|
|
49
|
+
- name: Test with pytest
|
|
50
|
+
run: python -m pytest
|
|
51
|
+
|
|
52
|
+
- name: Upload coverage to Codecov
|
|
53
|
+
uses: codecov/codecov-action@v4
|
|
54
|
+
with:
|
|
55
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
56
|
+
file: ./coverage.xml
|
|
57
|
+
if: matrix.os == 'ubuntu-latest'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Configuration of checks run by pre-commit
|
|
2
|
+
#
|
|
3
|
+
# The tests are executed in the CI pipeline,
|
|
4
|
+
# see CONTRIBUTING.rst for further instructions.
|
|
5
|
+
# You can also run the checks directly at the terminal, e.g.
|
|
6
|
+
#
|
|
7
|
+
# $ pre-commit install
|
|
8
|
+
# $ pre-commit run --all-files
|
|
9
|
+
#
|
|
10
|
+
#
|
|
11
|
+
default_language_version:
|
|
12
|
+
python: python3.10
|
|
13
|
+
|
|
14
|
+
repos:
|
|
15
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
16
|
+
rev: v0.7.0
|
|
17
|
+
hooks:
|
|
18
|
+
- id: ruff
|
|
19
|
+
args: [ --fix ]
|
|
20
|
+
- id: ruff-format
|
|
21
|
+
- repo: https://github.com/codespell-project/codespell
|
|
22
|
+
rev: v2.3.0
|
|
23
|
+
hooks:
|
|
24
|
+
- id: codespell
|
|
25
|
+
additional_dependencies:
|
|
26
|
+
- tomli
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
Changelog
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
All notable changes to this project will be documented in this file.
|
|
5
|
+
|
|
6
|
+
The format is based on `Keep a Changelog`_,
|
|
7
|
+
and this project adheres to `Semantic Versioning`_.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Version 1.3.0 (2024-12-11)
|
|
11
|
+
--------------------------
|
|
12
|
+
|
|
13
|
+
* Added: open-source release
|
|
14
|
+
* Added: ``audmodel-internal`` repository
|
|
15
|
+
on S3
|
|
16
|
+
* Added: support for Python 3.11
|
|
17
|
+
* Added: support for Python 3.12 (without Artifactory backend)
|
|
18
|
+
* Added: support for Python 3.13 (without Artifactory backend)
|
|
19
|
+
* Changed: switch to MIT license
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Version 1.2.0 (2024-05-10)
|
|
23
|
+
--------------------------
|
|
24
|
+
|
|
25
|
+
* Added: ``audmodel.Repository``
|
|
26
|
+
to handle repositories for model storage
|
|
27
|
+
* Changed: depend on ``audbackend>=2.0.0``
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
Version 1.1.2 (2024-02-21)
|
|
31
|
+
--------------------------
|
|
32
|
+
|
|
33
|
+
* Fixed: link to repository
|
|
34
|
+
and documentation
|
|
35
|
+
inside the Python package
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Version 1.1.1 (2023-11-13)
|
|
39
|
+
--------------------------
|
|
40
|
+
|
|
41
|
+
* Fixed: ensure ``audmodel.uid()`` returns the same ID
|
|
42
|
+
when ``subgroup`` is ``None`` or ``''``
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
Version 1.1.0 (2023-10-17)
|
|
46
|
+
--------------------------
|
|
47
|
+
|
|
48
|
+
* Added: support for new backend API
|
|
49
|
+
* Changed: depend on ``audbackend>=1.0.0``
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
Version 1.0.7 (2023-01-04)
|
|
53
|
+
--------------------------
|
|
54
|
+
|
|
55
|
+
* Changed: split API documentation into sub-pages
|
|
56
|
+
for each function/class
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Version 1.0.6 (2022-05-05)
|
|
60
|
+
--------------------------
|
|
61
|
+
|
|
62
|
+
* Changed: update naming conventions for publishing a model
|
|
63
|
+
* Changed: add docstring examples for all API functions
|
|
64
|
+
* Fixed: ``audmodel.update_meta()`` does now return the updated metadata
|
|
65
|
+
dictionary
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
Version 1.0.5 (2021-12-30)
|
|
69
|
+
--------------------------
|
|
70
|
+
|
|
71
|
+
* Changed: support Python 3.8 as default version
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
Version 1.0.4 (2021-11-26)
|
|
75
|
+
--------------------------
|
|
76
|
+
|
|
77
|
+
* Added: ``verbose`` argument to functions that interact with the backend
|
|
78
|
+
* Changed: use new sphinx-audeering-theme
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
Version 1.0.3 (2021-09-29)
|
|
82
|
+
--------------------------
|
|
83
|
+
|
|
84
|
+
* Fixed: ``audmodel.load()`` could fail when broken folders
|
|
85
|
+
loaded by older versions of ``audmodel`` were present in the cache
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
Version 1.0.2 (2021-09-14)
|
|
89
|
+
--------------------------
|
|
90
|
+
|
|
91
|
+
* Added: tests for Windows
|
|
92
|
+
* Added: tests for macOS
|
|
93
|
+
* Fixed: folder creation bug under Windows when loading a model
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
Version 1.0.1 (2021-07-23)
|
|
97
|
+
--------------------------
|
|
98
|
+
|
|
99
|
+
* Changed: raise error if meta or parameters cannot be serialized
|
|
100
|
+
* Fixed: clean up files when :func:`audmodel.publish` is interrupted
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
Version 1.0.0 (2021-07-20)
|
|
104
|
+
--------------------------
|
|
105
|
+
|
|
106
|
+
* Added: :func:`audmodel.header`
|
|
107
|
+
* Added: :func:`audmodel.meta`
|
|
108
|
+
* Added: :func:`audmodel.legacy_uid`
|
|
109
|
+
* Added: :func:`audmodel.update_meta`
|
|
110
|
+
* Added: argument ``cache_root`` to several functions
|
|
111
|
+
* Added: argument ``type`` to :func:`audmodel.url`
|
|
112
|
+
* Changed: make ``'models-local'`` default repository
|
|
113
|
+
* Changed: shorter model ID format, e.g. ``'5fbbaf38-3.0.0'``
|
|
114
|
+
* Changed: support for different backends
|
|
115
|
+
* Deprecated: ``private`` in :func:`audmodel.publish`
|
|
116
|
+
* Deprecated: ``root`` in :func:`audmodel.load`
|
|
117
|
+
* Removed: ``audmodel.lookup_table()``
|
|
118
|
+
* Removed: ``audmodel.remove()``
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
Version 0.10.0 (2021-04-06)
|
|
122
|
+
---------------------------
|
|
123
|
+
|
|
124
|
+
* Changed: use audfactory>=1.0.0
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
Version 0.9.1 (2021-01-26)
|
|
128
|
+
--------------------------
|
|
129
|
+
|
|
130
|
+
* Fixed: allow for newer versions of ``audfactory``
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
Version 0.9.0 (2021-01-25)
|
|
134
|
+
--------------------------
|
|
135
|
+
|
|
136
|
+
* Added: :func:`audmodel.date`
|
|
137
|
+
* Added: :func:`audmodel.author`
|
|
138
|
+
* Added: :func:`audmodel.exists`
|
|
139
|
+
* Changed: include the repository name in the folders created in cache
|
|
140
|
+
* Changed: :func:`audmodel.url` raises now ``ConnectionError``
|
|
141
|
+
instead of ``RuntimeError`` if Artifactory is offline
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
Version 0.8.0 (2020-09-14)
|
|
145
|
+
--------------------------
|
|
146
|
+
|
|
147
|
+
.. note:: With this version it becomes possible
|
|
148
|
+
to load models only by their unique id.
|
|
149
|
+
This introduces several breaking changes.
|
|
150
|
+
For more details see the following
|
|
151
|
+
`issue <https://gitlab.audeering.com/tools/audmodel/-/merge_requests/41>`_.
|
|
152
|
+
|
|
153
|
+
* Added:
|
|
154
|
+
|
|
155
|
+
* :meth:`audmodel.default_cache_root`
|
|
156
|
+
* :meth:`audmodel.name`
|
|
157
|
+
* :meth:`audmodel.parameters`
|
|
158
|
+
* :meth:`audmodel.subgroup`
|
|
159
|
+
* :meth:`audmodel.uid`
|
|
160
|
+
* :meth:`audmodel.url`
|
|
161
|
+
* :meth:`audmodel.version`
|
|
162
|
+
|
|
163
|
+
* Changed:
|
|
164
|
+
|
|
165
|
+
* :meth:`audmodel.latest_version`
|
|
166
|
+
* :meth:`audmodel.load`
|
|
167
|
+
* :meth:`audmodel.remove`
|
|
168
|
+
* :meth:`audmodel.versions`
|
|
169
|
+
|
|
170
|
+
* Removed:
|
|
171
|
+
|
|
172
|
+
* ``audmodel.create_lookup_table``
|
|
173
|
+
* ``audmodel.delete_lookup_table``
|
|
174
|
+
* ``audmodel.extend_params``
|
|
175
|
+
* ``audmodel.get_*``
|
|
176
|
+
* ``audmodel.load_by_id``
|
|
177
|
+
* ``audmodel.Parameter``
|
|
178
|
+
* ``audmodel.Parameters``
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
Version 0.6.1 (2020-07-01)
|
|
182
|
+
--------------------------
|
|
183
|
+
|
|
184
|
+
* Fixed: :func:`audmodel.versions` where not using the correct lookup table name
|
|
185
|
+
and was broken
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
Version 0.6.0 (2020-06-22)
|
|
189
|
+
--------------------------
|
|
190
|
+
|
|
191
|
+
* Added: :class:`audmodel.Parameter` and :class:`audmodel.Parameters`
|
|
192
|
+
* Changed: ``unittest-public-local`` repository for unit testing
|
|
193
|
+
* Changed: replace ``Lookup`` class with :class:`audfactory.Lookup`
|
|
194
|
+
* Removed: remove ``aumodel.interface`` module
|
|
195
|
+
* Removed: dependencies to ``audiofile``, ``audsp``, ``numpy``, ``pandas``
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
Version 0.5.2 (2020-04-24)
|
|
199
|
+
--------------------------
|
|
200
|
+
|
|
201
|
+
* Added: :class:`audmodel.interface.ProcessWithContext`
|
|
202
|
+
* Changed: :meth:`audmodel.load` prints more informative error message
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
Version 0.5.1 (2020-04-23)
|
|
206
|
+
--------------------------
|
|
207
|
+
|
|
208
|
+
* Fixed: :meth:`audmodel.interface.Process.process_signal` uses correct
|
|
209
|
+
sampling rate after resampling
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
Version 0.5.0 (2020-04-23)
|
|
213
|
+
--------------------------
|
|
214
|
+
|
|
215
|
+
* Added: :class:`audmodel.interface.Segment`
|
|
216
|
+
* Added: :meth:`audmodel.get_model_url`
|
|
217
|
+
* Changed: renamed interface class `Generic` to :class:`audmodel.interface.Process`
|
|
218
|
+
* Changed: :meth:`audmodel.publish` returns the model's uid instead of url
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
Version 0.4.1 (2020-04-20)
|
|
222
|
+
--------------------------
|
|
223
|
+
|
|
224
|
+
* Added: :meth:`audmodel.extend_params` and :meth:`audmodel.get_params`
|
|
225
|
+
* Fixed: return type of :meth:`audmodel.interface.Generic.read_audio`
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
Version 0.4.0 (2020-04-16)
|
|
229
|
+
--------------------------
|
|
230
|
+
|
|
231
|
+
* Added: :class:`audmodel.interface.Generic`
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
Version 0.3.3 (2020-03-18)
|
|
235
|
+
--------------------------
|
|
236
|
+
|
|
237
|
+
* Added: verbose flag
|
|
238
|
+
* Added: publish models under a subgroup
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
Version 0.3.2 (2020-03-10)
|
|
242
|
+
--------------------------
|
|
243
|
+
|
|
244
|
+
* Changed: :class:`audmodel.config` now member of :mod:`audmodel`
|
|
245
|
+
* Fixed: url of tutorial notebook
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
Version 0.3.1 (2020-02-27)
|
|
249
|
+
--------------------------
|
|
250
|
+
|
|
251
|
+
* Changed: update documentation
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
Version 0.3.0 (2020-02-27)
|
|
255
|
+
--------------------------
|
|
256
|
+
|
|
257
|
+
* Added: Sphinx documentation
|
|
258
|
+
* Added: Jupyter tutorial
|
|
259
|
+
* Changed: request (latest) version(s) for specific parameters (see
|
|
260
|
+
:func:`audmodel.version` and :func:`audmodel.latest_version`)
|
|
261
|
+
* Changed: running tests in parallel
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
Version 0.2.0 (2020-02-25)
|
|
265
|
+
--------------------------
|
|
266
|
+
|
|
267
|
+
* Added: unit tests with full code coverage
|
|
268
|
+
* Added: :func:`audmodel.delete_lookup_table`
|
|
269
|
+
* Added: :func:`audmodel.get_default_cache_root`
|
|
270
|
+
* Added: :func:`audmodel.latest_version`
|
|
271
|
+
* Added: :func:`audmodel.versions`
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
Version 0.1.0 (2020-02-24)
|
|
275
|
+
--------------------------
|
|
276
|
+
|
|
277
|
+
* Added: initial release
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
.. _Keep a Changelog:
|
|
281
|
+
https://keepachangelog.com/en/1.0.0/
|
|
282
|
+
.. _Semantic Versioning:
|
|
283
|
+
https://semver.org/spec/v2.0.0.html
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Contributing
|
|
2
|
+
============
|
|
3
|
+
|
|
4
|
+
If you would like to add new functionality fell free to create a `merge
|
|
5
|
+
request`_ . If you find errors, omissions, inconsistencies or other things
|
|
6
|
+
that need improvement, please create an issue_.
|
|
7
|
+
Contributions are always welcome!
|
|
8
|
+
|
|
9
|
+
.. _issue: https://gitlab.audeering.com/tools/audmodel/issues/new?issue%5BD=
|
|
10
|
+
.. _merge request: https://gitlab.audeering.com/tools/audmodel/merge_requests/new
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
Development Installation
|
|
14
|
+
------------------------
|
|
15
|
+
|
|
16
|
+
Instead of pip-installing the latest release from PyPI, you should get the
|
|
17
|
+
newest development version from Gitlab_::
|
|
18
|
+
|
|
19
|
+
git clone git@srv-app-01.audeering.local:tools/audmodel.git
|
|
20
|
+
cd audmodel
|
|
21
|
+
# Use virtual environment
|
|
22
|
+
pip install -r requirements.txt
|
|
23
|
+
|
|
24
|
+
.. _Gitlab: https://gitlab.audeering.com/tools/audmodel
|
|
25
|
+
|
|
26
|
+
This way, your installation always stays up-to-date, even if you pull new
|
|
27
|
+
changes from the Gitlab repository.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
Coding Convention
|
|
31
|
+
-----------------
|
|
32
|
+
|
|
33
|
+
We follow the PEP8_ convention for Python code
|
|
34
|
+
and use ruff_ as a linter and code formatter.
|
|
35
|
+
In addition,
|
|
36
|
+
we check for common spelling errors with codespell_.
|
|
37
|
+
Both tools and possible exceptions
|
|
38
|
+
are defined in :file:`pyproject.toml`.
|
|
39
|
+
|
|
40
|
+
The checks are executed in the CI using `pre-commit`_.
|
|
41
|
+
You can enable those checks locally by executing::
|
|
42
|
+
|
|
43
|
+
pip install pre-commit # consider system wide installation
|
|
44
|
+
pre-commit install
|
|
45
|
+
pre-commit run --all-files
|
|
46
|
+
|
|
47
|
+
Afterwards ruff_ and codespell_ are executed
|
|
48
|
+
every time you create a commit.
|
|
49
|
+
|
|
50
|
+
You can also install ruff_ and codespell_
|
|
51
|
+
and call it directly::
|
|
52
|
+
|
|
53
|
+
pip install ruff codespell # consider system wide installation
|
|
54
|
+
ruff check --fix . # lint all Python files, and fix any fixable errors
|
|
55
|
+
ruff format . # format code of all Python files
|
|
56
|
+
codespell
|
|
57
|
+
|
|
58
|
+
It can be restricted to specific folders::
|
|
59
|
+
|
|
60
|
+
ruff check audfoo/ tests/
|
|
61
|
+
codespell audfoo/ tests/
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
.. _codespell: https://github.com/codespell-project/codespell/
|
|
65
|
+
.. _PEP8: http://www.python.org/dev/peps/pep-0008/
|
|
66
|
+
.. _pre-commit: https://pre-commit.com
|
|
67
|
+
.. _ruff: https://beta.ruff.rs
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
Building the Documentation
|
|
71
|
+
--------------------------
|
|
72
|
+
|
|
73
|
+
If you make changes to the documentation,
|
|
74
|
+
you can re-create the HTML pages using Sphinx_.
|
|
75
|
+
You can install it and a few other necessary packages with::
|
|
76
|
+
|
|
77
|
+
pip install -r docs/requirements.txt
|
|
78
|
+
|
|
79
|
+
To create the HTML pages, use::
|
|
80
|
+
|
|
81
|
+
python -m sphinx docs/ build/sphinx/html -b html
|
|
82
|
+
|
|
83
|
+
The generated files will be available
|
|
84
|
+
in the directory :file:`build/sphinx/html/`.
|
|
85
|
+
|
|
86
|
+
It is also possible to automatically check if all links are still valid::
|
|
87
|
+
|
|
88
|
+
python -m sphinx docs/ build/sphinx/html -b linkcheck
|
|
89
|
+
|
|
90
|
+
.. _Sphinx: https://www.sphinx-doc.org
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
Running the Tests
|
|
94
|
+
-----------------
|
|
95
|
+
|
|
96
|
+
You'll need pytest_ for that.
|
|
97
|
+
It can be installed with::
|
|
98
|
+
|
|
99
|
+
pip install -r tests/requirements.txt
|
|
100
|
+
|
|
101
|
+
To execute the tests, simply run::
|
|
102
|
+
|
|
103
|
+
pytest tests/
|
|
104
|
+
|
|
105
|
+
To run the tests on the Gitlab CI server,
|
|
106
|
+
contributors have to make sure
|
|
107
|
+
they have an existing ``artifactory-tokenizer`` repository
|
|
108
|
+
as described in the `Artifactory tokenizer documentation`_.
|
|
109
|
+
|
|
110
|
+
.. _pytest: https://pytest.org/
|
|
111
|
+
.. _Artifactory tokenizer documentation: https://gitlab.audeering.com/devops/artifactory/tree/master/token
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Creating a New Release
|
|
115
|
+
----------------------
|
|
116
|
+
|
|
117
|
+
New releases are made using the following steps:
|
|
118
|
+
|
|
119
|
+
#. Update ``CHANGELOG.rst``
|
|
120
|
+
#. Commit those changes as "Release X.Y.Z"
|
|
121
|
+
#. Create an (annotated) tag with ``git tag -a vX.Y.Z``
|
|
122
|
+
#. Make sure you have an `artifactory-tokenizer`_ project
|
|
123
|
+
#. Push the commit and the tag to Gitlab
|
|
124
|
+
|
|
125
|
+
.. _artifactory-tokenizer: https://gitlab.audeering.com/devops/artifactory/tree/master/token
|
audmodel-1.3.0/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019-present audEERING GmbH and Contributors
|
|
4
|
+
|
|
5
|
+
Authors:
|
|
6
|
+
Hagen Wierstorf
|
|
7
|
+
Johannes Wagner
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|