about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)Author
6 daysValidate submitted sample ordersFrederick Muriuki Muriithi
Add `is_valid_order`, which checks that a submitted order is a permutation of the file's samples (catching missing, extra and duplicated samples), with tests. Co-authored-by: pi coding agent <pi@pi.dev>
6 daysTest: cover genotype sample order proposalFrederick Muriuki Muriithi
Cover alphabetical fallback, retaining an existing population order, appending missing samples sorted, ignoring existing samples not in the file, and the empty case. Co-authored-by: pi coding agent <pi@pi.dev>
6 daysTest: cover duplicate marker names within a chromosomeFrederick Muriuki Muriithi
Add a fixture and QC test showing that a marker name repeated on the same chromosome is an error, while the same name may appear on different chromosomes. Co-authored-by: pi coding agent <pi@pi.dev>
6 daysTest: cover non-negative numeric position validationFrederick Muriuki Muriithi
Add fixtures and tests for negative and non-numeric cM/Mb values in both orientations, confirm non-negative integers/floats are accepted, and cover job-error extraction for invalid positions. Co-authored-by: pi coding agent <pi@pi.dev>
6 daysTest: cover early validation of headings and data valuesFrederick Muriuki Muriithi
Update fixtures to cover empty/missing-value headings (header row, transposed row labels, marker headings), marker values, metadata values and empty sample values. Add Stage 01 tests for each case and update the job-error extraction expectations. Co-authored-by: pi coding agent <pi@pi.dev>
6 daysTest: cover genotype job error extraction from fixturesFrederick Muriuki Muriithi
Add tests for `job_errors.errors_from_job` using the sample genotype files: collector column-mismatch errors, clean collector output, QC unknown/empty values (untransposed and transposed), non-JSON output, and message-only errors. Co-authored-by: pi coding agent <pi@pi.dev>
6 daysAdd sample genotype files for upload testingFrederick Muriuki Muriithi
Small untransposed/transposed genotype files (clean, with collector errors, with value errors, and with ragged rows) plus one exercising comments and dot-geno directives. Intended for manual checks now and automated tests later. Co-authored-by: pi coding agent <pi@pi.dev>
7 daysTest: cover genotype normalisation and marker sortingFrederick Muriuki Muriithi
Add normalisation tests (comments/directives dropped, transposed files untransposed, ragged/empty rejected) and update the QC sorting tests for the chromosome -> Mb -> cM placeholder order. Drop the obsolete transposed QC test since QC now runs on the canonical file. Co-authored-by: pi coding agent <pi@pi.dev>
7 daysTest: scope the genotype description to pre-matrix commentsFrederick Muriuki Muriithi
Cover comments before and after the header/markers row (untransposed and transposed), the chunk-merge behaviour, and single- vs multi-processed equivalence when a mid-file comment lands in a later chunk. Co-authored-by: pi coding agent <pi@pi.dev>
12 daysAdd Stage 03 genotype value QC and schedule it from Stage 02pi coding agent
- Store the genotype file path and collector config in the collector job metadata so later stages can re-read the file. - Seed `dot_geno_fields.unk` into the Stage 02 missing-value symbols default. - Add `uploader.genotypes.qc` with value checks (empty and unknown symbols) and a placeholder marker-ordering helper (chromosome, cM, Mb) that warns. - Add the `uploader.scripts.genotypes.qc` worker that reads the collector job, runs the checks and exits non-zero when errors are found. - On Stage 02 save, schedule the QC job and record its id for idempotency.
13 daysUnify missing-value symbol parsing in r_qtl.utilspi coding agent
Move `parse_missing_values_symbols` from the genotypes views into `r_qtl.utils` and use it in the genotypes Stage 01 collector config and the phenotypes individual-file uploads, replacing their divergent inline splits with the more robust whitespace/comma parsing. Move the tests to `tests/r_qtl/test_utils.py`.
13 daysTest: cover parsing missing-value symbolspi coding agent
Add tests for splitting a whitespace- and/or comma-separated symbol list into unique, non-empty symbols.
13 daysMove tests to appropriate test package.Frederick Muriuki Muriithi
14 daysTest: cover reading genotype collector jobspi coding agent
Add tests for validating a collector job (type, completion, dataset ownership) and parsing the FileStats from its recorded stdout.
14 daysMove genotype data types into the uploader.genotypes packagepi coding agent
Move `uploader/scripts/genotypes/types.py` to `uploader/genotypes/types.py` so application code can use `FileStats` and friends without importing from `uploader.scripts`. Update the collector script and tests to the new location.
14 daysTest: cover collecting comment lines into the file descriptionpi coding agent
Add tests for cleaning comment lines (strip the comment character and surrounding whitespace), honouring a configured comment character, exposing the description on FileStats, and preserving comment order when merging chunks.
14 daysRe-organise the tests.Frederick Muriuki Muriithi
14 daysTest: cover building the collector job commandpi coding agent
Add tests for translating the collector config into the collector CLI's arguments (log level, file metadata, separator/comment/NA strings and the transposed flag), with the file path as the final argument.
14 daysTest: cover building the genotype collector config from the formpi coding agent
Add tests for mapping the upload form's metadata fields to the statistics collector's config keys, including collector defaults, the transposed checkbox and normalisation of the missing-value strings.
2026-10-22Test: cover resolving uploaded files genericallypi coding agent
Add unit tests for a generic `resolve_uploaded_file` in the uploader.files package: direct multipart and resumable uploads (returning both the path and the original name), hashed vs unhashed saving, and the error cases (missing file, malformed resumable data, wrong field).
2026-10-22Update references to the moved scripts packagepi coding agent
The `scripts` package now lives under `uploader`, so update every reference from `scripts.<...>` to `uploader.scripts.<...>`: Python imports, `-m` command module strings, logging module names, test imports, CLI/gunicorn entry points, lint/guix paths and the WIP documentation. Note: the untracked `run-dev-flask.sh` and `run-dev-gunicorn.sh` helper scripts still need their entry-point module updated manually.
2026-10-15Test: cover the multi-processed statistics collectionpi coding agent
Add pytest unit tests asserting that `file_stats_multiprocessing` produces the same statistics as `file_stats_singlethread` for untransposed and transposed files across a range of chunk sizes, that line errors keep their order, and that `_read_chunks` groups lines correctly including the partial final chunk and empty input.
2026-10-15Test: cover chunk statistics merge helperspi coding agent
Add pytest unit tests for `_merge_chunk_stats` and `_merge_all_chunk_stats`, covering counter summation, symbol union, error ordering, dot-geno field overriding, and the untransposed (concatenate) and transposed (last markers line wins) marker semantics.
2026-10-15Test: cover per-line accumulation and single-threaded statspi coding agent
Add pytest unit tests for the extracted `_accumulate` helper and for `file_stats_singlethread`, covering line-type counting, collection of genotype symbols/markers/dot-geno fields, transposed files, and the ordering of header validation errors before per-line errors.
2026-02-09Update configuration variable name.Frederick Muriuki Muriithi
2025-06-11Fix failing test.Frederick Muriuki Muriithi
2025-06-11Fix issues caught by linter.Frederick Muriuki Muriithi
2025-05-02Mark directories as packages to make modules unique.Frederick Muriuki Muriithi
2025-04-14Implement difference computations.Frederick Muriuki Muriithi
2025-04-14Add tests for new difference computation function.Frederick Muriuki Muriithi
2025-04-14Move test to appropriate package.Frederick Muriuki Muriithi
2025-04-14Rename test module.Frederick Muriuki Muriithi
2025-04-11Write test for computing differences for publications in bulk edits.Frederick Muriuki Muriithi
2025-04-11Setup client for use with tests.Frederick Muriuki Muriithi
2024-10-17Add test for function to compute file hash.Frederick Muriuki Muriithi
2024-10-17Rename test module.Frederick Muriuki Muriithi
2024-07-25Rename module: qc_app --> uploaderFrederick Muriuki Muriithi
2024-06-27Remove unnecessary debugging statements.Frederick Muriuki Muriithi
2024-06-14Commit missing test.Frederick Muriuki Muriithi
2024-06-13Fix tests and issues caught by tests.Frederick Muriuki Muriithi
2024-04-08Fix issues caught by integration tests.Frederick Muriuki Muriithi
2024-02-28tests: test with just the message - don't include markupFrederick Muriuki Muriithi
Markup can, and will change as improvements are made, but the error messages will not change that often, plus that is what we want to actually test for, not the markup.
2024-02-28tests: Update unit tests: remove use of obsoleted functions.Frederick Muriuki Muriithi
2024-02-20Track filename in the errorsFrederick Muriuki Muriithi
R/qtl2 bundles can contain more than one file, of the same type. When errors are encountered in any of the files, we need to be able to inform the user which file it is, in addition to the line and column number.
2024-02-20Generalise fetching of samples/cases/individuals.Frederick Muriuki Muriithi
2024-02-20Read samples from geno file.Frederick Muriuki Muriithi
2024-02-12Build generic decimal places checker.Frederick Muriuki Muriithi
2024-02-12Provide the key for each file listed in the control file.Frederick Muriuki Muriithi
2024-02-08Use error objects rather than plain tuple values.Frederick Muriuki Muriithi
2024-02-06Check that pheno values are numerical and at least 3 decimal placesFrederick Muriuki Muriithi