audformat 1.4.1__tar.gz → 1.4.3__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.
Files changed (92) hide show
  1. {audformat-1.4.1 → audformat-1.4.3}/.github/workflows/doc.yml +6 -4
  2. {audformat-1.4.1 → audformat-1.4.3}/.github/workflows/linter.yml +5 -3
  3. {audformat-1.4.1 → audformat-1.4.3}/.github/workflows/publish.yml +6 -4
  4. {audformat-1.4.1 → audformat-1.4.3}/.github/workflows/test.yml +14 -10
  5. {audformat-1.4.1 → audformat-1.4.3}/.pre-commit-config.yaml +0 -2
  6. {audformat-1.4.1 → audformat-1.4.3}/CHANGELOG.rst +17 -0
  7. {audformat-1.4.1 → audformat-1.4.3}/PKG-INFO +3 -3
  8. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/conftest.py +2 -7
  9. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/database.py +2 -2
  10. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/table.py +13 -2
  11. {audformat-1.4.1 → audformat-1.4.3}/audformat.egg-info/PKG-INFO +3 -3
  12. {audformat-1.4.1 → audformat-1.4.3}/audformat.egg-info/SOURCES.txt +2 -0
  13. audformat-1.4.3/audformat.egg-info/scm_file_list.json +86 -0
  14. audformat-1.4.3/audformat.egg-info/scm_version.json +8 -0
  15. audformat-1.4.3/audformat.egg-info/top_level.txt +1 -0
  16. {audformat-1.4.1 → audformat-1.4.3}/docs/conf.py +3 -3
  17. {audformat-1.4.1 → audformat-1.4.3}/pyproject.toml +3 -3
  18. {audformat-1.4.1 → audformat-1.4.3}/tests/conftest.py +2 -7
  19. {audformat-1.4.1 → audformat-1.4.3}/tests/test_database.py +18 -0
  20. {audformat-1.4.1 → audformat-1.4.3}/tests/test_table.py +33 -0
  21. audformat-1.4.1/audformat.egg-info/top_level.txt +0 -6
  22. {audformat-1.4.1 → audformat-1.4.3}/.gitignore +0 -0
  23. {audformat-1.4.1 → audformat-1.4.3}/CONTRIBUTING.rst +0 -0
  24. {audformat-1.4.1 → audformat-1.4.3}/LICENSE +0 -0
  25. {audformat-1.4.1 → audformat-1.4.3}/README.rst +0 -0
  26. {audformat-1.4.1 → audformat-1.4.3}/audformat/__init__.py +0 -0
  27. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/__init__.py +0 -0
  28. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/attachment.py +0 -0
  29. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/column.py +0 -0
  30. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/common.py +0 -0
  31. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/define.py +0 -0
  32. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/errors.py +0 -0
  33. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/index.py +0 -0
  34. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/media.py +0 -0
  35. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/rater.py +0 -0
  36. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/scheme.py +0 -0
  37. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/split.py +0 -0
  38. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/testing.py +0 -0
  39. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/typing.py +0 -0
  40. {audformat-1.4.1 → audformat-1.4.3}/audformat/core/utils.py +0 -0
  41. {audformat-1.4.1 → audformat-1.4.3}/audformat/define/__init__.py +0 -0
  42. {audformat-1.4.1 → audformat-1.4.3}/audformat/errors/__init__.py +0 -0
  43. {audformat-1.4.1 → audformat-1.4.3}/audformat/testing/__init__.py +0 -0
  44. {audformat-1.4.1 → audformat-1.4.3}/audformat/utils/__init__.py +0 -0
  45. {audformat-1.4.1 → audformat-1.4.3}/audformat.egg-info/dependency_links.txt +0 -0
  46. {audformat-1.4.1 → audformat-1.4.3}/audformat.egg-info/requires.txt +0 -0
  47. {audformat-1.4.1 → audformat-1.4.3}/benchmarks/benchmark_hash.py +0 -0
  48. {audformat-1.4.1 → audformat-1.4.3}/benchmarks/benchmark_union.py +0 -0
  49. {audformat-1.4.1 → audformat-1.4.3}/docs/accessing-data.rst +0 -0
  50. {audformat-1.4.1 → audformat-1.4.3}/docs/api/audformat.define.rst +0 -0
  51. {audformat-1.4.1 → audformat-1.4.3}/docs/api/audformat.errors.rst +0 -0
  52. {audformat-1.4.1 → audformat-1.4.3}/docs/api/audformat.rst +0 -0
  53. {audformat-1.4.1 → audformat-1.4.3}/docs/api/audformat.testing.rst +0 -0
  54. {audformat-1.4.1 → audformat-1.4.3}/docs/api/audformat.utils.rst +0 -0
  55. {audformat-1.4.1 → audformat-1.4.3}/docs/api-src/audformat.define.rst +0 -0
  56. {audformat-1.4.1 → audformat-1.4.3}/docs/api-src/audformat.errors.rst +0 -0
  57. {audformat-1.4.1 → audformat-1.4.3}/docs/api-src/audformat.rst +0 -0
  58. {audformat-1.4.1 → audformat-1.4.3}/docs/api-src/audformat.testing.rst +0 -0
  59. {audformat-1.4.1 → audformat-1.4.3}/docs/api-src/audformat.utils.rst +0 -0
  60. {audformat-1.4.1 → audformat-1.4.3}/docs/changelog.rst +0 -0
  61. {audformat-1.4.1 → audformat-1.4.3}/docs/combine-tables.rst +0 -0
  62. {audformat-1.4.1 → audformat-1.4.3}/docs/conftest.py +0 -0
  63. {audformat-1.4.1 → audformat-1.4.3}/docs/contributing.rst +0 -0
  64. {audformat-1.4.1 → audformat-1.4.3}/docs/create-database.rst +0 -0
  65. {audformat-1.4.1 → audformat-1.4.3}/docs/data-conventions.rst +0 -0
  66. {audformat-1.4.1 → audformat-1.4.3}/docs/data-example.rst +0 -0
  67. {audformat-1.4.1 → audformat-1.4.3}/docs/data-format.rst +0 -0
  68. {audformat-1.4.1 → audformat-1.4.3}/docs/data-header.rst +0 -0
  69. {audformat-1.4.1 → audformat-1.4.3}/docs/data-introduction.rst +0 -0
  70. {audformat-1.4.1 → audformat-1.4.3}/docs/data-misc-tables.rst +0 -0
  71. {audformat-1.4.1 → audformat-1.4.3}/docs/data-tables.rst +0 -0
  72. {audformat-1.4.1 → audformat-1.4.3}/docs/emodb-example.rst +0 -0
  73. {audformat-1.4.1 → audformat-1.4.3}/docs/genindex.rst +0 -0
  74. {audformat-1.4.1 → audformat-1.4.3}/docs/index.rst +0 -0
  75. {audformat-1.4.1 → audformat-1.4.3}/docs/install.rst +0 -0
  76. {audformat-1.4.1 → audformat-1.4.3}/docs/map-scheme.rst +0 -0
  77. {audformat-1.4.1 → audformat-1.4.3}/docs/pics/audformat-database.dot +0 -0
  78. {audformat-1.4.1 → audformat-1.4.3}/docs/pics/audformat-misc-table.dot +0 -0
  79. {audformat-1.4.1 → audformat-1.4.3}/docs/pics/audformat-table.dot +0 -0
  80. {audformat-1.4.1 → audformat-1.4.3}/docs/update-database.rst +0 -0
  81. {audformat-1.4.1 → audformat-1.4.3}/setup.cfg +0 -0
  82. {audformat-1.4.1 → audformat-1.4.3}/tests/test_attachment.py +0 -0
  83. {audformat-1.4.1 → audformat-1.4.3}/tests/test_column.py +0 -0
  84. {audformat-1.4.1 → audformat-1.4.3}/tests/test_common.py +0 -0
  85. {audformat-1.4.1 → audformat-1.4.3}/tests/test_database_get.py +0 -0
  86. {audformat-1.4.1 → audformat-1.4.3}/tests/test_eq.py +0 -0
  87. {audformat-1.4.1 → audformat-1.4.3}/tests/test_errors.py +0 -0
  88. {audformat-1.4.1 → audformat-1.4.3}/tests/test_index.py +0 -0
  89. {audformat-1.4.1 → audformat-1.4.3}/tests/test_misc_table.py +0 -0
  90. {audformat-1.4.1 → audformat-1.4.3}/tests/test_scheme.py +0 -0
  91. {audformat-1.4.1 → audformat-1.4.3}/tests/test_utils.py +0 -0
  92. {audformat-1.4.1 → audformat-1.4.3}/tests/test_utils_concat.py +0 -0
@@ -16,7 +16,7 @@ jobs:
16
16
  python-version: [ '3.12' ]
17
17
 
18
18
  steps:
19
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v7
20
20
  with:
21
21
  # Ensure audformat is assigned a version,
22
22
  # so we can install audb as a dependency
@@ -25,18 +25,20 @@ jobs:
25
25
  fetch-tags: true
26
26
 
27
27
  - name: Cache emodb
28
- uses: actions/cache@v4
28
+ uses: actions/cache@v6
29
29
  with:
30
30
  path: emodb-src
31
31
  key: emodb-src
32
32
 
33
33
  - name: Set up Python ${{ matrix.python-version }}
34
- uses: actions/setup-python@v5
34
+ uses: actions/setup-python@v7
35
35
  with:
36
36
  python-version: ${{ matrix.python-version }}
37
37
 
38
38
  - name: Install uv
39
- uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d
39
+ uses: astral-sh/setup-uv@v9.0.0
40
+ with:
41
+ save-cache: false
40
42
 
41
43
  - name: Ubuntu - install graphviz
42
44
  run: |
@@ -12,15 +12,17 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v4
15
+ - uses: actions/checkout@v7
16
16
 
17
17
  - name: Set up Python
18
- uses: actions/setup-python@v5
18
+ uses: actions/setup-python@v7
19
19
  with:
20
20
  python-version: '3.12'
21
21
 
22
22
  - name: Install uv
23
- uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d
23
+ uses: astral-sh/setup-uv@v9.0.0
24
+ with:
25
+ save-cache: false
24
26
 
25
27
  - name: Install pre-commit hooks
26
28
  run: uvx pre-commit install --install-hooks
@@ -16,23 +16,25 @@ jobs:
16
16
  group: ${{ github.workflow }}-${{ github.ref }}
17
17
 
18
18
  steps:
19
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v7
20
20
  with:
21
21
  fetch-depth: 2
22
22
 
23
23
  - name: Cache emodb
24
- uses: actions/cache@v4
24
+ uses: actions/cache@v6
25
25
  with:
26
26
  path: emodb-src
27
27
  key: emodb-src
28
28
 
29
29
  - name: Set up Python
30
- uses: actions/setup-python@v5
30
+ uses: actions/setup-python@v7
31
31
  with:
32
32
  python-version: '3.12'
33
33
 
34
34
  - name: Install uv
35
- uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d
35
+ uses: astral-sh/setup-uv@v9.0.0
36
+ with:
37
+ save-cache: false
36
38
 
37
39
 
38
40
  # PyPI package
@@ -15,8 +15,6 @@ jobs:
15
15
  os: [ ubuntu-latest, windows-latest, macOS-latest ]
16
16
  python-version: [ '3.12' ]
17
17
  include:
18
- - os: ubuntu-latest
19
- python-version: '3.10'
20
18
  - os: ubuntu-latest
21
19
  python-version: '3.11'
22
20
  - os: ubuntu-latest
@@ -24,11 +22,13 @@ jobs:
24
22
  - os: ubuntu-latest
25
23
  python-version: '3.14'
26
24
  - os: ubuntu-latest
27
- python-version: '3.10'
25
+ python-version: '3.15'
26
+ - os: ubuntu-latest
27
+ python-version: '3.11'
28
28
  requirements: 'minimum'
29
29
 
30
30
  steps:
31
- - uses: actions/checkout@v4
31
+ - uses: actions/checkout@v7
32
32
  with:
33
33
  # Ensure audformat is assigned a version,
34
34
  # so we can install audb as a dependency
@@ -37,18 +37,22 @@ jobs:
37
37
  fetch-tags: true
38
38
 
39
39
  - name: Cache emodb
40
- uses: actions/cache@v4
40
+ uses: actions/cache@v6
41
41
  with:
42
42
  path: emodb-src
43
43
  key: emodb-src
44
44
 
45
45
  - name: Set up Python ${{ matrix.python-version }}
46
- uses: actions/setup-python@v5
46
+ uses: actions/setup-python@v7
47
47
  with:
48
48
  python-version: ${{ matrix.python-version }}
49
+ allow-prereleases: true
50
+ check-latest: true
49
51
 
50
52
  - name: Install uv
51
- uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d
53
+ uses: astral-sh/setup-uv@v9.0.0
54
+ with:
55
+ save-cache: ${{ matrix.requirements != 'minimum' }}
52
56
 
53
57
  - name: Prepare Ubuntu
54
58
  run: |
@@ -79,8 +83,8 @@ jobs:
79
83
  run: uv run pytest
80
84
 
81
85
  - name: Upload coverage to Codecov
82
- uses: codecov/codecov-action@v4
86
+ uses: codecov/codecov-action@v7
83
87
  with:
84
88
  token: ${{ secrets.CODECOV_TOKEN }}
85
- file: ./coverage.xml
86
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
89
+ files: ./coverage.xml
90
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
@@ -22,5 +22,3 @@ repos:
22
22
  rev: v2.4.1
23
23
  hooks:
24
24
  - id: codespell
25
- additional_dependencies:
26
- - tomli
@@ -7,6 +7,23 @@ The format is based on `Keep a Changelog`_,
7
7
  and this project adheres to `Semantic Versioning`_.
8
8
 
9
9
 
10
+ Version 1.4.3 (2026-10-09)
11
+ --------------------------
12
+
13
+ * Added: support for Python 3.15
14
+ * Changed: load and save header YAML files always with UTF-8
15
+ * Removed: support for Python 3.10
16
+ * Fixed: ensure correct index dtype for ``file`` column
17
+ when creating a table in pandas 3.x
18
+
19
+
20
+ Version 1.4.2 (2026-05-12)
21
+ --------------------------
22
+
23
+ * Changed: exclude ``tests/`` and ``docs/`` folders from the Python package
24
+ * Fixed: ensure ``pandas>=3.0.3`` works with ``audformat``
25
+
26
+
10
27
  Version 1.4.1 (2026-04-13)
11
28
  --------------------------
12
29
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: audformat
3
- Version: 1.4.1
3
+ Version: 1.4.3
4
4
  Summary: Python implementation of audformat
5
5
  Author: Johannes Wagner, BahaEddine Abrougui
6
6
  Author-email: Hagen Wierstorf <hwierstorf@audeering.com>, Christian Geng <cgeng@audeering.com>
@@ -14,13 +14,13 @@ Classifier: Intended Audience :: Developers
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
19
  Classifier: Programming Language :: Python :: 3.13
21
20
  Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3.15
22
22
  Classifier: Topic :: Scientific/Engineering
23
- Requires-Python: >=3.10
23
+ Requires-Python: >=3.11
24
24
  Description-Content-Type: text/x-rst
25
25
  License-File: LICENSE
26
26
  Requires-Dist: audeer>=2.0.0
@@ -1,6 +1,6 @@
1
+ import contextlib
1
2
  from doctest import ELLIPSIS
2
3
  from doctest import NORMALIZE_WHITESPACE
3
- import os
4
4
  import tempfile
5
5
 
6
6
  import numpy as np
@@ -15,19 +15,14 @@ import audiofile
15
15
  @pytest.fixture(scope="package", autouse=True)
16
16
  def prepare_docstring_tests(doctest_namespace):
17
17
  # Prepare files and tmp folder needed in doctests
18
- with tempfile.TemporaryDirectory() as tmp:
18
+ with tempfile.TemporaryDirectory() as tmp, contextlib.chdir(tmp):
19
19
  doctest_namespace["tmp"] = tmp
20
20
 
21
- current_dir = os.getcwd()
22
- os.chdir(tmp)
23
-
24
21
  # audformat.utils.to_filewise_index()
25
22
  audiofile.write("f.wav", np.ones((1, 8000)), 8000)
26
23
 
27
24
  yield
28
25
 
29
- os.chdir(current_dir)
30
-
31
26
 
32
27
  parsers = [
33
28
  DocTestParser(optionflags=ELLIPSIS + NORMALIZE_WHITESPACE),
@@ -1024,7 +1024,7 @@ class Database(HeaderBase):
1024
1024
 
1025
1025
  ext = ".yaml"
1026
1026
  header_path = os.path.join(root, name + ext)
1027
- with open(header_path, "w") as fp:
1027
+ with open(header_path, "w", encoding="utf-8") as fp:
1028
1028
  self.dump(fp, indent=indent)
1029
1029
 
1030
1030
  if not header_only:
@@ -1437,7 +1437,7 @@ class Database(HeaderBase):
1437
1437
  if not os.path.exists(path):
1438
1438
  raise FileNotFoundError(path)
1439
1439
 
1440
- with open(path) as fp:
1440
+ with open(path, encoding="utf-8") as fp:
1441
1441
  header = yaml.load(fp, Loader=Loader)
1442
1442
  db = Database.load_header_from_yaml(header)
1443
1443
 
@@ -1966,12 +1966,23 @@ def _assert_table_index(
1966
1966
  )
1967
1967
 
1968
1968
 
1969
+ def _is_correct_string_dtype(dtype) -> bool:
1970
+ r"""Return whether the dtype matches the desired string dtype."""
1971
+ if dtype == "string":
1972
+ na_value = getattr(dtype, "na_value", None)
1973
+ # If pd.StringDtype has the na_value attribute (pandas 3.x)
1974
+ # it must be set to pd.NA
1975
+ return na_value is None or na_value is pd.NA
1976
+ return False
1977
+
1978
+
1969
1979
  def _maybe_convert_dtype_to_string(
1970
1980
  index: pd.Index,
1971
1981
  ) -> pd.Index:
1972
1982
  r"""Possibly set dtype of file level to 'string'."""
1973
- if (is_filewise_index(index) and index.dtype == "object") or (
1974
- is_segmented_index(index) and index.dtypes[define.IndexField.FILE] == "object"
1983
+ if (is_filewise_index(index) and not _is_correct_string_dtype(index.dtype)) or (
1984
+ is_segmented_index(index)
1985
+ and not _is_correct_string_dtype(index.dtypes[define.IndexField.FILE])
1975
1986
  ):
1976
1987
  index = utils.set_index_dtypes(
1977
1988
  index,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: audformat
3
- Version: 1.4.1
3
+ Version: 1.4.3
4
4
  Summary: Python implementation of audformat
5
5
  Author: Johannes Wagner, BahaEddine Abrougui
6
6
  Author-email: Hagen Wierstorf <hwierstorf@audeering.com>, Christian Geng <cgeng@audeering.com>
@@ -14,13 +14,13 @@ Classifier: Intended Audience :: Developers
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
19
  Classifier: Programming Language :: Python :: 3.13
21
20
  Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3.15
22
22
  Classifier: Topic :: Scientific/Engineering
23
- Requires-Python: >=3.10
23
+ Requires-Python: >=3.11
24
24
  Description-Content-Type: text/x-rst
25
25
  License-File: LICENSE
26
26
  Requires-Dist: audeer>=2.0.0
@@ -14,6 +14,8 @@ audformat.egg-info/PKG-INFO
14
14
  audformat.egg-info/SOURCES.txt
15
15
  audformat.egg-info/dependency_links.txt
16
16
  audformat.egg-info/requires.txt
17
+ audformat.egg-info/scm_file_list.json
18
+ audformat.egg-info/scm_version.json
17
19
  audformat.egg-info/top_level.txt
18
20
  audformat/core/__init__.py
19
21
  audformat/core/attachment.py
@@ -0,0 +1,86 @@
1
+ {
2
+ "files": [
3
+ ".github/workflows/doc.yml",
4
+ ".github/workflows/linter.yml",
5
+ ".github/workflows/publish.yml",
6
+ ".github/workflows/test.yml",
7
+ ".gitignore",
8
+ ".pre-commit-config.yaml",
9
+ "CHANGELOG.rst",
10
+ "CONTRIBUTING.rst",
11
+ "LICENSE",
12
+ "README.rst",
13
+ "audformat/__init__.py",
14
+ "audformat/core/__init__.py",
15
+ "audformat/core/attachment.py",
16
+ "audformat/core/column.py",
17
+ "audformat/core/common.py",
18
+ "audformat/core/conftest.py",
19
+ "audformat/core/database.py",
20
+ "audformat/core/define.py",
21
+ "audformat/core/errors.py",
22
+ "audformat/core/index.py",
23
+ "audformat/core/media.py",
24
+ "audformat/core/rater.py",
25
+ "audformat/core/scheme.py",
26
+ "audformat/core/split.py",
27
+ "audformat/core/table.py",
28
+ "audformat/core/testing.py",
29
+ "audformat/core/typing.py",
30
+ "audformat/core/utils.py",
31
+ "audformat/define/__init__.py",
32
+ "audformat/errors/__init__.py",
33
+ "audformat/testing/__init__.py",
34
+ "audformat/utils/__init__.py",
35
+ "benchmarks/benchmark_hash.py",
36
+ "benchmarks/benchmark_union.py",
37
+ "docs/accessing-data.rst",
38
+ "docs/api-src/audformat.define.rst",
39
+ "docs/api-src/audformat.errors.rst",
40
+ "docs/api-src/audformat.rst",
41
+ "docs/api-src/audformat.testing.rst",
42
+ "docs/api-src/audformat.utils.rst",
43
+ "docs/api/audformat.define.rst",
44
+ "docs/api/audformat.errors.rst",
45
+ "docs/api/audformat.rst",
46
+ "docs/api/audformat.testing.rst",
47
+ "docs/api/audformat.utils.rst",
48
+ "docs/changelog.rst",
49
+ "docs/combine-tables.rst",
50
+ "docs/conf.py",
51
+ "docs/conftest.py",
52
+ "docs/contributing.rst",
53
+ "docs/create-database.rst",
54
+ "docs/data-conventions.rst",
55
+ "docs/data-example.rst",
56
+ "docs/data-format.rst",
57
+ "docs/data-header.rst",
58
+ "docs/data-introduction.rst",
59
+ "docs/data-misc-tables.rst",
60
+ "docs/data-tables.rst",
61
+ "docs/emodb-example.rst",
62
+ "docs/genindex.rst",
63
+ "docs/index.rst",
64
+ "docs/install.rst",
65
+ "docs/map-scheme.rst",
66
+ "docs/pics/audformat-database.dot",
67
+ "docs/pics/audformat-misc-table.dot",
68
+ "docs/pics/audformat-table.dot",
69
+ "docs/update-database.rst",
70
+ "pyproject.toml",
71
+ "tests/conftest.py",
72
+ "tests/test_attachment.py",
73
+ "tests/test_column.py",
74
+ "tests/test_common.py",
75
+ "tests/test_database.py",
76
+ "tests/test_database_get.py",
77
+ "tests/test_eq.py",
78
+ "tests/test_errors.py",
79
+ "tests/test_index.py",
80
+ "tests/test_misc_table.py",
81
+ "tests/test_scheme.py",
82
+ "tests/test_table.py",
83
+ "tests/test_utils.py",
84
+ "tests/test_utils_concat.py"
85
+ ]
86
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "1.4.3",
3
+ "distance": 0,
4
+ "node": "geb2df689d7a59fcf2ae515c9061c5558e4853bcf",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-10-09"
8
+ }
@@ -0,0 +1 @@
1
+ audformat
@@ -1,11 +1,11 @@
1
1
  from datetime import date
2
-
3
- import toml
2
+ import tomllib
4
3
 
5
4
  import audeer
6
5
 
7
6
 
8
- config = toml.load(audeer.path("..", "pyproject.toml"))
7
+ with open(audeer.path("..", "pyproject.toml"), "rb") as fp:
8
+ config = tomllib.load(fp)
9
9
 
10
10
 
11
11
  # Project -----------------------------------------------------------------
@@ -24,14 +24,14 @@ classifiers = [
24
24
  'Operating System :: OS Independent',
25
25
  'Programming Language :: Python',
26
26
  'Programming Language :: Python :: 3',
27
- 'Programming Language :: Python :: 3.10',
28
27
  'Programming Language :: Python :: 3.11',
29
28
  'Programming Language :: Python :: 3.12',
30
29
  'Programming Language :: Python :: 3.13',
31
30
  'Programming Language :: Python :: 3.14',
31
+ 'Programming Language :: Python :: 3.15',
32
32
  'Topic :: Scientific/Engineering',
33
33
  ]
34
- requires-python = '>=3.10'
34
+ requires-python = '>=3.11'
35
35
  dependencies = [
36
36
  'audeer >=2.0.0',
37
37
  'audiofile >=0.4.0',
@@ -72,7 +72,6 @@ dev = [
72
72
  'sphinx-copybutton',
73
73
  'sphinxcontrib-katex',
74
74
  'sybil',
75
- 'toml',
76
75
  ]
77
76
 
78
77
 
@@ -229,6 +228,7 @@ convention = 'google'
229
228
  #
230
229
  # Find all (sub-)modules of the Python package
231
230
  [tool.setuptools.packages.find]
231
+ include = ['audformat*']
232
232
 
233
233
  # ----- setuptools_scm ----------------------------------------------------
234
234
  #
@@ -1,4 +1,4 @@
1
- import os
1
+ import contextlib
2
2
  import tempfile
3
3
 
4
4
  import pandas as pd
@@ -21,10 +21,7 @@ pytest.FILE_DUR = pd.to_timedelta("1s")
21
21
  def prepare_tests():
22
22
  # Prepare files used in tests
23
23
  # and set a temporary working directory
24
- with tempfile.TemporaryDirectory() as tmp:
25
- current_dir = os.getcwd()
26
- os.chdir(tmp)
27
-
24
+ with tempfile.TemporaryDirectory() as tmp, contextlib.chdir(tmp):
28
25
  pytest.DB.save(pytest.DB_ROOT)
29
26
 
30
27
  audformat.testing.create_audio_files(
@@ -37,5 +34,3 @@ def prepare_tests():
37
34
  )
38
35
 
39
36
  yield
40
-
41
- os.chdir(current_dir)
@@ -1,5 +1,6 @@
1
1
  import datetime
2
2
  import filecmp
3
+ import locale
3
4
  import os
4
5
  import re
5
6
 
@@ -427,6 +428,23 @@ def test_load(tmpdir):
427
428
  assert list(db.schemes) == ["misc", "scheme1", "scheme2", "scheme3"]
428
429
 
429
430
 
431
+ def test_load_ascii_locale(tmpdir):
432
+ # Test loading a database containing a non-ascii character
433
+ # when not using utf-8 locale
434
+ db = audformat.testing.create_db(minimal=True)
435
+ db.description = "Non-ascii description: äöü"
436
+ db.save(tmpdir)
437
+
438
+ old_locale = locale.getlocale(locale.LC_CTYPE)
439
+ try:
440
+ locale.setlocale(locale.LC_CTYPE, "C")
441
+ db_loaded = audformat.Database.load(tmpdir)
442
+ finally:
443
+ locale.setlocale(locale.LC_CTYPE, old_locale)
444
+
445
+ assert db_loaded.description == db.description
446
+
447
+
430
448
  @pytest.mark.parametrize("load_data", [(True, False)])
431
449
  def test_load_with_misc_table_as_scheme_labels(tmpdir, load_data):
432
450
  """Test loading database when regular table uses scheme with misc table labels.
@@ -2538,3 +2538,36 @@ def test_zero_columns(tmpdir, storage_format):
2538
2538
  db[table_id].df.index,
2539
2539
  )
2540
2540
  assert db_loaded[table_id].df.shape == db[table_id].df.shape
2541
+
2542
+
2543
+ @pytest.mark.parametrize(
2544
+ "index, expected_index",
2545
+ [
2546
+ # filewise index with str dtype
2547
+ (
2548
+ pd.Index(["f1.wav", "f2.wav"], dtype="str", name="file"),
2549
+ audformat.filewise_index(["f1.wav", "f2.wav"]),
2550
+ ),
2551
+ # segmented index with str dtype
2552
+ (
2553
+ audformat.utils.set_index_dtypes(
2554
+ pd.MultiIndex.from_arrays(
2555
+ [
2556
+ ["f1.wav"],
2557
+ [pd.Timedelta(0).as_unit("ns")],
2558
+ [pd.Timedelta(4, unit="s").as_unit("ns")],
2559
+ ],
2560
+ names=["file", "start", "end"],
2561
+ ),
2562
+ {"file": "str"},
2563
+ ),
2564
+ audformat.segmented_index(files=["f1.wav"], starts=[0.0], ends=[4.0]),
2565
+ ),
2566
+ ],
2567
+ )
2568
+ def test_create_table_dtype(index, expected_index):
2569
+ # Check that the index of the created table
2570
+ # has the correct dtype
2571
+ # https://github.com/audeering/audformat/issues/544
2572
+ table = audformat.Table(index=index)
2573
+ pd.testing.assert_index_equal(table.index, expected_index)
@@ -1,6 +0,0 @@
1
- audformat
2
- benchmarks
3
- dist
4
- docs
5
- emodb-src
6
- tests
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes