MCPcopy Create free account
hub / github.com/HzaCode/OneCite / _validate_doi

Method _validate_doi

onecite/pipeline/identifier.py:189–192  ·  view source on GitHub ↗

Validate DOI format

(self, doi: str)

Source from the content-addressed store, hash-verified

187 return identified_entry
188
189 def _validate_doi(self, doi: str) -> bool:
190 """Validate DOI format"""
191 doi_pattern = r'^10\.\d{4,}/.+'
192 return bool(re.match(doi_pattern, doi))
193
194 def _is_datacite_doi(self, doi: str) -> bool:
195 """Check if DOI is registered with DataCite (not CrossRef)."""

Callers 2

_extract_doi_from_urlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected