Skip to content

Commit

Permalink
use strict mode to manage duplicates with pybtex
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Jul 9, 2021
1 parent 1bb7cf1 commit a10364f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion emmet-core/emmet/core/provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

from monty.json import MontyDecoder
from pybtex.database import BibliographyData, parse_string
from pydantic import BaseModel, EmailStr, Field, validator
from pybtex.errors import set_strict_mode
from pydantic import BaseModel, Field, root_validator, validator

from emmet.core.material_property import PropertyDoc
from emmet.core.mpid import MPID
Expand Down Expand Up @@ -126,6 +127,7 @@ def from_SNLs(
refs = {}
for snl in snls:
try:
set_strict_mode(False)
entries = parse_string(snl["about"]["references"], bib_format="bibtex")
refs.update(entries.entries)
except Exception:
Expand Down

0 comments on commit a10364f

Please sign in to comment.