-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update test fixture used to simulate AWS S3 Originally, the s3_setup fixture created in conftest.py was designed to unit test cladetime's ability to pull the correct versionId of S3 objects when provided with a specific date. Thus, the content of the objects was irrelevant. Since then, we've added Cladetime features that also require testing the content of the files on S3. This changeset updates the s3_setup pytest fixture to include realistic metadata, sequence, and ncov_metadata files. Rather than using file content to test the version, we can now check a metadata field called "version". * Don't use moto fixture when directly access URLs via Polar This seems obvious in hindsignt, but for .zst files, the sequence.get_metadata function uses polars to access URLs directly (via scan_csv). Polars uses fsspec to open remote files, so if we pass it a url to a mock, moto-created S3 bucket, it will simply try to access a real S3 bucket (hence the 403 errors) The moto setup works for .xz files, because in that case, the actual file-handling is done by requests, which then feeds the data to polars. * Add more checks to sequence metadata obtained via URL These additional checks do some basic asserts to ensure the schema of the metadata columns used by Cladetime and to ensure completeness/uniqueness of the strain column (which acts, essentially, as a primary key)
- Loading branch information
Showing
10 changed files
with
69 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"schema_version":"v1","nextclade_version":"nextclade 3.8.2","nextclade_dataset_name":"SARS-CoV-2","nextclade_dataset_version":"2024-11-19--14-18-53Z","nextclade_tsv_sha256sum":"1800155490bd925a85fbcb4a46d19c72311a0ed6d1cd58d7d26899673cca83f1","metadata_tsv_sha256sum":"dae40f81f1cef7cb4a246c4ad483d20bda91ed3c79f7bfb81de4f67cd4797156"} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters