audformat 1.1.4__tar.gz → 1.2.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.
- {audformat-1.1.4 → audformat-1.2.0}/.github/workflows/test.yml +13 -2
- {audformat-1.1.4 → audformat-1.2.0}/CHANGELOG.rst +29 -0
- {audformat-1.1.4 → audformat-1.2.0}/PKG-INFO +5 -5
- {audformat-1.1.4 → audformat-1.2.0}/README.rst +1 -1
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/column.py +1 -1
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/common.py +15 -2
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/database.py +3 -3
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/define.py +3 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/table.py +447 -91
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/utils.py +84 -24
- {audformat-1.1.4 → audformat-1.2.0}/audformat.egg-info/PKG-INFO +5 -5
- {audformat-1.1.4 → audformat-1.2.0}/audformat.egg-info/requires.txt +2 -1
- {audformat-1.1.4 → audformat-1.2.0}/docs/data-format.rst +16 -12
- {audformat-1.1.4 → audformat-1.2.0}/docs/data-introduction.rst +1 -1
- {audformat-1.1.4 → audformat-1.2.0}/pyproject.toml +4 -3
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_column.py +186 -2
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_database.py +24 -5
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_database_get.py +12 -12
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_misc_table.py +204 -13
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_scheme.py +6 -6
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_table.py +365 -15
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_utils.py +78 -2
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_utils_concat.py +5 -5
- {audformat-1.1.4 → audformat-1.2.0}/.github/workflows/doc.yml +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/.github/workflows/linter.yml +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/.github/workflows/publish.yml +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/.gitignore +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/.pre-commit-config.yaml +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/CONTRIBUTING.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/LICENSE +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/__init__.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/__init__.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/attachment.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/conftest.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/errors.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/index.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/media.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/rater.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/scheme.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/split.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/testing.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/core/typing.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/define/__init__.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/errors/__init__.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/testing/__init__.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat/utils/__init__.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat.egg-info/SOURCES.txt +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat.egg-info/dependency_links.txt +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/audformat.egg-info/top_level.txt +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/benchmarks/benchmark_union.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/accessing-data.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api/audformat.define.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api/audformat.errors.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api/audformat.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api/audformat.testing.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api/audformat.utils.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api-src/audformat.define.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api-src/audformat.errors.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api-src/audformat.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api-src/audformat.testing.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/api-src/audformat.utils.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/changelog.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/combine-tables.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/conf.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/contributing.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/create-database.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/data-conventions.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/data-example.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/data-header.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/data-misc-tables.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/data-tables.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/emodb-example.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/genindex.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/index.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/install.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/map-scheme.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/pics/audformat-database.dot +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/pics/audformat-misc-table.dot +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/pics/audformat-table.dot +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/requirements.txt +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/docs/update-database.rst +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/requirements.txt +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/setup.cfg +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/tests/conftest.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/tests/requirements.txt +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_attachment.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_common.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_eq.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_errors.py +0 -0
- {audformat-1.1.4 → audformat-1.2.0}/tests/test_index.py +0 -0
|
@@ -15,12 +15,13 @@ jobs:
|
|
|
15
15
|
os: [ ubuntu-20.04, windows-latest, macOS-latest ]
|
|
16
16
|
python-version: [ '3.10' ]
|
|
17
17
|
include:
|
|
18
|
-
- os: ubuntu-latest
|
|
19
|
-
python-version: '3.8'
|
|
20
18
|
- os: ubuntu-latest
|
|
21
19
|
python-version: '3.9'
|
|
22
20
|
- os: ubuntu-latest
|
|
23
21
|
python-version: '3.11'
|
|
22
|
+
- os: ubuntu-latest
|
|
23
|
+
python-version: '3.9'
|
|
24
|
+
requirements: 'minimum'
|
|
24
25
|
|
|
25
26
|
steps:
|
|
26
27
|
- uses: actions/checkout@v4
|
|
@@ -50,6 +51,16 @@ jobs:
|
|
|
50
51
|
pip install -r requirements.txt
|
|
51
52
|
pip install -r tests/requirements.txt
|
|
52
53
|
|
|
54
|
+
- name: Downgrade to minimum dependencies
|
|
55
|
+
run: |
|
|
56
|
+
pip install "audeer==2.0.0"
|
|
57
|
+
pip install "audiofile==0.4.0"
|
|
58
|
+
pip install "numpy<2.0.0"
|
|
59
|
+
pip install "pandas==2.1.0"
|
|
60
|
+
pip install "pyarrow==10.0.1"
|
|
61
|
+
pip install "pyyaml==5.4.1"
|
|
62
|
+
if: matrix.requirements == 'minimum'
|
|
63
|
+
|
|
53
64
|
- name: Test with pytest
|
|
54
65
|
run: |
|
|
55
66
|
python -m pytest
|
|
@@ -7,6 +7,35 @@ The format is based on `Keep a Changelog`_,
|
|
|
7
7
|
and this project adheres to `Semantic Versioning`_.
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
Version 1.2.0 (2024-06-25)
|
|
11
|
+
--------------------------
|
|
12
|
+
|
|
13
|
+
* Added: expand format specifications
|
|
14
|
+
to allow parquet files
|
|
15
|
+
as table files
|
|
16
|
+
* Added: support for storing tables as parquet files
|
|
17
|
+
by adding ``"parquet"``
|
|
18
|
+
(``audformat.define.TableStorageFormat.PARQUET``)
|
|
19
|
+
as an option
|
|
20
|
+
for the ``storage_format`` argument
|
|
21
|
+
of ``audformat.Table.save()``
|
|
22
|
+
and ``audformat.Database.save()``
|
|
23
|
+
* Added: support for ``numpy>=2.0``
|
|
24
|
+
* Added: mention text files
|
|
25
|
+
as potential media files
|
|
26
|
+
in the documentation
|
|
27
|
+
* Added: mention in the documentation of ``audformat.utils.hash()``
|
|
28
|
+
that column/level names do not influence its hash value
|
|
29
|
+
* Added: warn in the documentation of ``audformat.utils.hash()``
|
|
30
|
+
that the hash of a dataframe or series,
|
|
31
|
+
containing ``"Int64"`` as data type,
|
|
32
|
+
changes with ``pandas>=2.2.0``
|
|
33
|
+
* Fixed: ensure ``"boolean"`` data type
|
|
34
|
+
is always used
|
|
35
|
+
in indices of misc tables
|
|
36
|
+
that store boolean values
|
|
37
|
+
|
|
38
|
+
|
|
10
39
|
Version 1.1.4 (2024-05-15)
|
|
11
40
|
--------------------------
|
|
12
41
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: audformat
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Python implementation of audformat
|
|
5
5
|
Author: BahaEddine Abrougui
|
|
6
6
|
Author-email: Hagen Wierstorf <hwierstorf@audeering.com>, Johannes Wagner <jwagner@audeering.com>
|
|
@@ -41,12 +41,11 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
41
41
|
Classifier: Operating System :: OS Independent
|
|
42
42
|
Classifier: Programming Language :: Python
|
|
43
43
|
Classifier: Programming Language :: Python :: 3
|
|
44
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
45
44
|
Classifier: Programming Language :: Python :: 3.9
|
|
46
45
|
Classifier: Programming Language :: Python :: 3.10
|
|
47
46
|
Classifier: Programming Language :: Python :: 3.11
|
|
48
47
|
Classifier: Topic :: Scientific/Engineering
|
|
49
|
-
Requires-Python: >=3.
|
|
48
|
+
Requires-Python: >=3.9
|
|
50
49
|
Description-Content-Type: text/x-rst
|
|
51
50
|
License-File: LICENSE
|
|
52
51
|
Requires-Dist: audeer>=2.0.0
|
|
@@ -54,8 +53,9 @@ Requires-Dist: audiofile>=0.4.0
|
|
|
54
53
|
Requires-Dist: iso-639
|
|
55
54
|
Requires-Dist: iso3166
|
|
56
55
|
Requires-Dist: oyaml
|
|
56
|
+
Requires-Dist: pandas>=2.1.0
|
|
57
|
+
Requires-Dist: pyarrow>=10.0.1
|
|
57
58
|
Requires-Dist: pyyaml>=5.4.1
|
|
58
|
-
Requires-Dist: pandas>=1.4.1
|
|
59
59
|
|
|
60
60
|
=========
|
|
61
61
|
audformat
|
|
@@ -66,7 +66,7 @@ audformat
|
|
|
66
66
|
Specification and reference implementation of **audformat**.
|
|
67
67
|
|
|
68
68
|
audformat stores media data,
|
|
69
|
-
such as audio or
|
|
69
|
+
such as audio, video, or text
|
|
70
70
|
together with corresponding annotations
|
|
71
71
|
in a pre-defined way.
|
|
72
72
|
This makes it easy to combine or replace databases
|
|
@@ -7,7 +7,7 @@ audformat
|
|
|
7
7
|
Specification and reference implementation of **audformat**.
|
|
8
8
|
|
|
9
9
|
audformat stores media data,
|
|
10
|
-
such as audio or
|
|
10
|
+
such as audio, video, or text
|
|
11
11
|
together with corresponding annotations
|
|
12
12
|
in a pre-defined way.
|
|
13
13
|
This makes it easy to combine or replace databases
|
|
@@ -359,8 +359,21 @@ def to_audformat_dtype(dtype: typing.Union[str, typing.Type]) -> str:
|
|
|
359
359
|
return define.DataType.OBJECT
|
|
360
360
|
|
|
361
361
|
|
|
362
|
-
def to_pandas_dtype(dtype: str) -> str:
|
|
363
|
-
r"""Convert audformat to pandas dtype.
|
|
362
|
+
def to_pandas_dtype(dtype: str) -> typing.Optional[str]:
|
|
363
|
+
r"""Convert audformat to pandas dtype.
|
|
364
|
+
|
|
365
|
+
We use ``"Int64"`` instead of ``"int64"``,
|
|
366
|
+
and ``"boolean"`` instead of ``"bool"``
|
|
367
|
+
to allow for nullable entries,
|
|
368
|
+
e.g. ``[0, 2, <NA>]``.
|
|
369
|
+
|
|
370
|
+
Args:
|
|
371
|
+
dtype: audformat dtype
|
|
372
|
+
|
|
373
|
+
Returns:
|
|
374
|
+
pandas dtype
|
|
375
|
+
|
|
376
|
+
"""
|
|
364
377
|
if dtype == define.DataType.BOOL:
|
|
365
378
|
return "boolean"
|
|
366
379
|
elif dtype == define.DataType.DATE:
|
|
@@ -979,7 +979,7 @@ class Database(HeaderBase):
|
|
|
979
979
|
r"""Save database to disk.
|
|
980
980
|
|
|
981
981
|
Creates a header ``<root>/<name>.yaml``
|
|
982
|
-
and for every table a file ``<root>/<name>.<table-id>.[csv,pkl]``.
|
|
982
|
+
and for every table a file ``<root>/<name>.<table-id>.[csv,parquet,pkl]``.
|
|
983
983
|
|
|
984
984
|
Existing files will be overwritten.
|
|
985
985
|
If ``update_other_formats`` is provided,
|
|
@@ -1383,7 +1383,7 @@ class Database(HeaderBase):
|
|
|
1383
1383
|
r"""Load database from disk.
|
|
1384
1384
|
|
|
1385
1385
|
Expects a header ``<root>/<name>.yaml``
|
|
1386
|
-
and for every table a file ``<root>/<name>.<table-id>.[csv|pkl]``
|
|
1386
|
+
and for every table a file ``<root>/<name>.<table-id>.[csv|parquet|pkl]``
|
|
1387
1387
|
Media files should be located under ``root``.
|
|
1388
1388
|
|
|
1389
1389
|
Args:
|
|
@@ -1409,7 +1409,7 @@ class Database(HeaderBase):
|
|
|
1409
1409
|
Raises:
|
|
1410
1410
|
FileNotFoundError: if the database header file cannot be found
|
|
1411
1411
|
under ``root``
|
|
1412
|
-
RuntimeError: if a CSV table file is newer
|
|
1412
|
+
RuntimeError: if a CSV or PARQUET table file is newer
|
|
1413
1413
|
than the corresponding PKL file
|
|
1414
1414
|
|
|
1415
1415
|
"""
|
|
@@ -337,6 +337,9 @@ class TableStorageFormat(DefineBase):
|
|
|
337
337
|
CSV = "csv"
|
|
338
338
|
"""File extension for tables stored in CSV format."""
|
|
339
339
|
|
|
340
|
+
PARQUET = "parquet"
|
|
341
|
+
"""File extension for tables stored in PARQUET format."""
|
|
342
|
+
|
|
340
343
|
PICKLE = "pkl"
|
|
341
344
|
"""File extension for tables stored in PKL format."""
|
|
342
345
|
|