Skip to content

Commit

Permalink
Merge pull request #539 from ptth222/doi-regex-fix
Browse files Browse the repository at this point in the history
Update defaults.py
  • Loading branch information
terazus authored Mar 7, 2024
2 parents 4bb3e83 + 2275ee9 commit e5f6fd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion isatools/isatab/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def pbar(x):
_RX_I_FILE_NAME = compile(r'i_(.*?)\.txt')
_RX_DATA = compile(r'data\[(.*?)\]')
_RX_COMMENT = compile(r'Comment\[(.*?)\]')
_RX_DOI = compile(r'(10[.][0-9]{4,}(?:[.][0-9]+)*/(?:(?![%"#? ])\\S)+)')
_RX_DOI = compile(r'10.\d{4,9}/[-._;()/:a-z0-9A-Z]+')
_RX_PMID = compile(r'[0-9]{8}')
_RX_PMCID = compile(r'PMC[0-9]{8}')
_RX_CHARACTERISTICS = compile(r'Characteristics\[(.*?)\]')
Expand Down
4 changes: 2 additions & 2 deletions tests/isatab/validate/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_b_ii_s_3(self):
data_path = path.join(path.dirname(path.abspath(__file__)), '..', '..', 'data', 'tab', 'BII-S-3')
with open(path.join(data_path, 'i_gilbert.txt'), 'r') as data_file:
r = validate(fp=data_file, config_dir=self.default_conf, origin="")
self.assertEqual(len(r['warnings']), 12)
self.assertEqual(len(r['warnings']), 10)

def test_mtbls267(self):
data_path = path.join(path.dirname(path.abspath(__file__)), '..', '..', 'data', 'tab', 'MTBLS267-partial')
Expand Down Expand Up @@ -82,7 +82,7 @@ def is_investigation(investigation_df):
data_path = path.join(path.dirname(path.abspath(__file__)), '..', '..', 'data', 'tab', 'BII-S-3')
with open(path.join(data_path, 'i_gilbert.txt'), 'r') as data_file:
r = validate(data_file, rules=rules)
self.assertEqual(len(r['warnings']), 12)
self.assertEqual(len(r['warnings']), 10)

rule = '12000'
expected_error = {
Expand Down

0 comments on commit e5f6fd2

Please sign in to comment.