Skip to content

Commit

Permalink
added lru_cache based caching for reading cff data from disk during t…
Browse files Browse the repository at this point in the history
…ests
  • Loading branch information
jspaaks committed Sep 5, 2023
1 parent f0d5986 commit a685f48
Show file tree
Hide file tree
Showing 856 changed files with 1,712 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/a/test_apalike_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.apalike import ApalikeObject
from tests.lib.contracts.apalike import Contract


@lru_cache
def apalike_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/a/test_bibtex_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.bibtex import BibtexObject
from tests.lib.contracts.bibtex import Contract


@lru_cache
def bibtex_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/a/test_codemeta_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.codemeta import CodemetaObject
from tests.lib.contracts.codemeta import Contract


@lru_cache
def codemeta_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/a/test_endnote_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.endnote import EndnoteObject
from tests.lib.contracts.endnote import Contract


@lru_cache
def endnote_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/a/test_ris_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.ris import RisObject
from tests.lib.contracts.ris import Contract


@lru_cache
def ris_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/a/test_schemaorg_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.schemaorg import SchemaorgObject
from tests.lib.contracts.schemaorg import Contract


@lru_cache
def schemaorg_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/a/test_zenodo_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.zenodo import ZenodoObject
from tests.lib.contracts.zenodo import Contract


@lru_cache
def zenodo_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/b/test_apalike_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.apalike import ApalikeObject
from tests.lib.contracts.apalike import Contract


@lru_cache
def apalike_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/b/test_bibtex_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.bibtex import BibtexObject
from tests.lib.contracts.bibtex import Contract


@lru_cache
def bibtex_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/b/test_codemeta_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.codemeta import CodemetaObject
from tests.lib.contracts.codemeta import Contract


@lru_cache
def codemeta_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/b/test_endnote_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.endnote import EndnoteObject
from tests.lib.contracts.endnote import Contract


@lru_cache
def endnote_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/b/test_ris_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.ris import RisObject
from tests.lib.contracts.ris import Contract


@lru_cache
def ris_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/b/test_schemaorg_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.schemaorg import SchemaorgObject
from tests.lib.contracts.schemaorg import Contract


@lru_cache
def schemaorg_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/b/test_zenodo_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.zenodo import ZenodoObject
from tests.lib.contracts.zenodo import Contract


@lru_cache
def zenodo_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/c/test_apalike_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.apalike import ApalikeObject
from tests.lib.contracts.apalike import Contract


@lru_cache
def apalike_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/c/test_bibtex_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.bibtex import BibtexObject
from tests.lib.contracts.bibtex import Contract


@lru_cache
def bibtex_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/c/test_codemeta_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.codemeta import CodemetaObject
from tests.lib.contracts.codemeta import Contract


@lru_cache
def codemeta_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/c/test_endnote_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.endnote import EndnoteObject
from tests.lib.contracts.endnote import Contract


@lru_cache
def endnote_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/c/test_ris_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.ris import RisObject
from tests.lib.contracts.ris import Contract


@lru_cache
def ris_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/c/test_schemaorg_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.schemaorg import SchemaorgObject
from tests.lib.contracts.schemaorg import Contract


@lru_cache
def schemaorg_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/c/test_zenodo_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.zenodo import ZenodoObject
from tests.lib.contracts.zenodo import Contract


@lru_cache
def zenodo_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/d/test_apalike_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.apalike import ApalikeObject
from tests.lib.contracts.apalike import Contract


@lru_cache
def apalike_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/d/test_bibtex_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.bibtex import BibtexObject
from tests.lib.contracts.bibtex import Contract


@lru_cache
def bibtex_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/d/test_codemeta_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.codemeta import CodemetaObject
from tests.lib.contracts.codemeta import Contract


@lru_cache
def codemeta_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/d/test_endnote_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.endnote import EndnoteObject
from tests.lib.contracts.endnote import Contract


@lru_cache
def endnote_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/d/test_ris_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.ris import RisObject
from tests.lib.contracts.ris import Contract


@lru_cache
def ris_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/d/test_schemaorg_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.schemaorg import SchemaorgObject
from tests.lib.contracts.schemaorg import Contract


@lru_cache
def schemaorg_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/d/test_zenodo_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.zenodo import ZenodoObject
from tests.lib.contracts.zenodo import Contract


@lru_cache
def zenodo_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/e/test_apalike_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.apalike import ApalikeObject
from tests.lib.contracts.apalike import Contract


@lru_cache
def apalike_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/cff_1_0_3/e/test_bibtex_object.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_0_x.bibtex import BibtexObject
from tests.lib.contracts.bibtex import Contract


@lru_cache
def bibtex_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
Expand Down
Loading

0 comments on commit a685f48

Please sign in to comment.