Pb ratio autocompute - #3
Open
marcodanielepellizzari wants to merge 2 commits into
Open
Conversation
207Pb/206Pb and 208Pb/206Pb are just 207Pb/204Pb and 208Pb/204Pb normalized by 206Pb/204Pb, so only 3 of the 5 Pb ratios are actually independent. Add compute_missing_pb_ratios() to derive whichever of the 5 are missing from the ones present, whenever a row supplies at least 3 (fewer than that isn't enough information; some "redundant" triples still won't resolve everything, and are left as-is rather than guessed). Wired into both the upload preview (services.preview_rows) and the actual import (services.import_rows), so what gets shown before confirming matches what gets saved. The mapping step now also mentions the rule, and the preview table highlights computed cells with a tooltip explaining they were derived rather than read from the file.
A row that supplies some Pb isotope data but can't be completed to all
5 ratios (see the previous compute_missing_pb_ratios commit) is now
excluded from the import entirely, both in the web wizard and the CLI
importer, rather than saved with partial Pb data.
The preview step (before confirming) already reports how many rows
would be discarded this way and highlights them in the sample table.
After a confirmed import, the dataset page shows how many rows were
rejected and offers a CSV download of their original, unmapped data
so the owner can fix and re-upload them; the CLI writes the same CSV
next to the input file instead.
Also fixes an unrelated URL-name collision found while testing this:
workflow/urls.py's DRF router registered its Dataset viewset with
basename="dataset", generating dataset-list/dataset-detail names that
silently shadowed datasets/page_urls.py's HTML views of the same name
-- every redirect("dataset-detail", ...) in the wizard was actually
sending users to the JSON API instead of the dataset page. Renamed to
basename="api-dataset" (unused anywhere else, verified by grep).
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.
No description provided.