Add method to get index per split and table type of all tables
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Start by reviewing the audformat.Database.index property and the existing table, split_id, and index_type usage shown in the issue. Determine an API that preserves existing property behavior while supporting split and index-type filtering, then verify that the requested combined index can be obtained without breaking compatibility.
Written by the indexing model from the issue text.
Description
A user might be interested to get the index for all files or segments included in one split.
To get all segments involved in the a split called test you would need to do the following at the moment:
split = 'test'
type = 'segmented'
tables = [t for t in db.tables if db[t].split_id == split]
tables = [t for t in tables if audformat.index_type(db[t].index) == type]
index = audformat.utils.union([db[t].index for t in tables])
We could make this easier by converting the property audformat.Database.index into a method:
index = db.index(split='test', index_type='segmented')
The only problem is that Database.index is a property and we would break the API if we convert it to a method.
If we don't find a way to achieve this, we should maybe not target it or use another name (e.g. filter_index) for the proposed method.
/cc @phtephanx
- Dominant language
- Python
- Stars
- 13
- Forks
- 2
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from audeering/audformat
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
question
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
documentation enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in audeering/audformat
Similar issues
-
bug P1
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Toloka/tolokaforge#1947 ·
Maintainers usually reply within 1 day
-
SageMaker provider: streaming fails with NoStreamDataError on DJL Serving (LMI) endpointsPossibly taken @balajiaru claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
UKGovernmentBEIS/inspect_ai#6127 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
pydot/pydot#601 · 4 comments ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
letsencrypt/cp-cps#361 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100