Job Interface

class korus.database.interface.job.JobInterface(backend: TableBackend, file: FileInterface)[source]

Bases: TableInterface

add_file(job_id: int, file_id: int, channel: int = 0)[source]

Add an audio-file channel to an annotation job.

Args:
job_id: int

The job index

file_id: int

The audiofile index

channel: int

Stereo channel, 0,1,…

get_filedata(job_id: int | list[int]) DataFrame[source]

Returns a Pandas DataFrame with metadata about the audio files associated with the specified job(s).

TODO: add example table with column names to this docstring https://sublime-and-sphinx-guide.readthedocs.io/en/latest/tables.html#csv-files

Args:
job_id: int | list[int]

The job index or indices

Returns:
df: pd.DataFrame

The audiofile metadata.

get_files(job_id: int | list[int]) list[tuple[int, int]][source]

Get the audio-file channels associated with an annotation job or a set of jobs.

Args:
job_id: int | list[int]

The job index or indices

Returns:
: list[tuple[int,int]]

The file IDs and channel numbers.