Skip to content

Commit

Permalink
Merge 409c5a6 into 7aeef3d
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandr committed Dec 1, 2022
2 parents 7aeef3d + 409c5a6 commit 6374e3d
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 259 deletions.
2 changes: 0 additions & 2 deletions pyensembl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from .memory_cache import MemoryCache
from .database import Database
from .download_cache import DownloadCache
from .ensembl_release import EnsemblRelease, cached_release
Expand Down Expand Up @@ -41,7 +40,6 @@

__all__ = [
"__version__",
"MemoryCache",
"DownloadCache",
"Database",
"EnsemblRelease",
Expand Down
1 change: 0 additions & 1 deletion pyensembl/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from functools import wraps


def dump_pickle(obj, filepath):
with open(filepath, "wb") as f:
# use lower protocol for compatibility between Python 2 and Python 3
Expand Down
1 change: 0 additions & 1 deletion pyensembl/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import datacache
from typechecks import require_integer, require_string

from gtfparse import read_gtf, create_missing_features

from .common import memoize
Expand Down
5 changes: 1 addition & 4 deletions pyensembl/genome.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

from serializable import Serializable

from .memory_cache import MemoryCache
from .download_cache import DownloadCache
from .database import Database
from .exon import Exon
Expand Down Expand Up @@ -108,7 +107,6 @@ def __init__(
copy_local_files_to_cache=self.copy_local_files_to_cache,
install_string_function=self.install_string,
cache_directory_path=cache_directory_path)
self.memory_cache = MemoryCache()
self._init_lazy_fields()

@property
Expand Down Expand Up @@ -435,8 +433,7 @@ def __hash__(self):

def clear_cache(self):
"""
Clear any in-memory cached values and short-lived on-disk
materializations from MemoryCache
Clear any in-memory cached values
"""
for maybe_fn in self.__dict__.values():
# clear cache associated with all memoization decorators,
Expand Down
136 changes: 0 additions & 136 deletions pyensembl/memory_cache.py

This file was deleted.

7 changes: 2 additions & 5 deletions pyensembl/sequence_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
from os.path import exists, abspath, split, join
import logging
from collections import Counter

from six.moves import cPickle as pickle
from six import string_types

import pickle
from .common import (load_pickle, dump_pickle)
from .fasta import parse_fasta_dictionary

Expand All @@ -34,7 +31,7 @@ def __init__(
fasta_paths,
cache_directory_path=None):

if isinstance(fasta_paths, string_types):
if type(fasta_paths) is str:
fasta_paths = [fasta_paths]

self.fasta_paths = [abspath(path) for path in fasta_paths]
Expand Down
2 changes: 1 addition & 1 deletion pyensembl/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.1.0'
__version__ = '2.2.0'
9 changes: 3 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
typechecks>=0.0.2
numpy>=1.7
pandas>=0.15
datacache>=1.1.4
memoized-property>=1.0.2
nose>=1.3.3
tinytimer
six>=1.9.0
gtfparse>=1.3.0
serializable
nose>=1.3.3
pylint>=1.4.4
gtfparse>=1.1.0
serializable
13 changes: 4 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
raise RuntimeError('Cannot find version information')

if __name__ == '__main__':
with open("requirements.txt") as f:
requirements = [l.strip() for l in f]

setup(
name=package_name,
version=version,
Expand All @@ -63,15 +66,7 @@
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: Bio-Informatics',
],
install_requires=[
"typechecks>=0.0.2",
"pandas>=0.15",
"datacache>=1.1.4",
"memoized-property>=1.0.2",
"gtfparse>=1.1.0",
"serializable",
"tinytimer",
],
install_requires=requirements,
long_description=readme_markdown,
long_description_content_type='text/markdown',
packages=[package_name],
Expand Down
94 changes: 0 additions & 94 deletions test/test_memory_cache.py

This file was deleted.

0 comments on commit 6374e3d

Please sign in to comment.