Skip to content

Normalize URL-formatted citations and CURIE attach layers consistently across build and search #622

Closed

Description

@realmarcin

Found during adversarial review of #618.

  1. normalize_reference_key (scripts/gaps/analytics.py) and normalizeRefKey (assets/gaps/search-core.js) normalize DOI: and PMID: prefixes but not https://doi.org/... or https://pubmed.ncbi.nlm.nih.gov/<digits>/ URLs present in the snapshot; GapSearch.normalize() leaves state.ref un-normalized so ?ref=doi:... fails button active/toggle parity in renderRefs; renderRefs drops links when raw_ref contains whitespace after PMID:/DOI: and prefix-truncates long URLs so distinct defense-finder-models / pmc-oa-opendata files display identical labels.
  2. normalize_attach_layer / normalizeAttachLayer split on [#.\[/] before testing CURIE_RE or HTTP URLs, turning dotted CURIE prefixes (obo.go:...) into obo and https://... targets into https:.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions