Skip to content

refactor: replace irida_samples dict list with a dataclass #199

Description

@georgemarselis-nvi

Replace the irida_samples list-of-dicts with a proper dataclass (or similar typed object).

Currently irida_samples is [ { 'sample_name': str, 'project_id': int, 'r1': str, 'r2': str, 'project_name': str } ] - all string-keyed dict access, no attribute completion, no type safety.

A dataclass like:

@dataclass
class IridaSample:
    sample_name:  str
    project_id:   int
    project_name: str
    r1:           str = ""
    r2:           str = ""

would let _resolve_fastq_paths and _validate_fastq_paths write directly onto the object, eliminate the dict rebuild in the preflight loop, and give attribute access everywhere downstream.

Blocked by: #27 (initial implementation must land first).

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions