Repository navigation
fix(chemi): send schema bodies from bulk classifier wrappers - #379
Open
seanthimons wants to merge 2 commits into
Open
seanthimons wants to merge 2 commits into
seanthimons wants to merge 2 commits into
Conversation
The amnb_nate, arn_cats, ncc_cats, pfas_atlas and pfas_cats POST services
reject the legacy {chemicals: [{sid}], options} body with HTTP 400. Send
top-level chemicals ({id, smiles} records), smiles and model instead.
Resolve DTXSID, DTXCID and CASRN inputs to SMILES in a pre-request hook and
drop duplicate inputs.
Contributor
📊 Test Coverage ReportCurrent Coverage: 92.24%
Note: Coverage is informational only and does not block merges. The 75% target is a guideline. View detailed coverage reportRun Coverage excludes: R/data.R (documentation-only file) |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
chemi_amnb_nate_bulk("DTXSID7020182")failed with HTTP 400 ('sid' was unexpected). Theclassifier_bodycallback reproduced the legacy{chemicals: [{sid}], options}call, which the amnb_nate, arn_cats, ncc_cats, pfas_atlas and pfas_cats POST services reject (additionalProperties: false). This was ComptoxR's callback, not a Specmill gap.Changes
classifier_bodysends the schema's top-level fields:chemicals({id, smiles}records),smiles(array) andmodel(arn_cats).pre_requesthookresolve_classifier_inputsresolves DTXSID, DTXCID and CASRN values in character input to SMILES withchemi_resolver_lookup_bulk(). The identifier becomes the record id unless the element is named.Verification
generate_specmill.R --checkanddev/check_hook_config.Rpass.test-native_classifier_bodies, the fivetest-contract-chemi_*_bulk, the hook tests andtest-native_service_infopass locally. The full suite was not run locally.