diff --git a/docs/requirements.txt b/docs/requirements.txt index 9f026a3..fe79870 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -8,4 +8,3 @@ multiprocess click asciitree pyyaml -simplejson diff --git a/pyproject.toml b/pyproject.toml index 19559be..5f0e97b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,6 @@ dependencies = [ "pyfaidx", "asciitree", "pyyaml", - "simplejson", ] [project.optional-dependencies] diff --git a/src/cooler/api.py b/src/cooler/api.py index e90b54d..fd1f13b 100644 --- a/src/cooler/api.py +++ b/src/cooler/api.py @@ -1,11 +1,11 @@ from __future__ import annotations +import json import os import h5py import numpy as np import pandas as pd -import simplejson as json from pandas.api.types import is_integer_dtype from scipy.sparse import coo_matrix diff --git a/src/cooler/cli/cload.py b/src/cooler/cli/cload.py index ded4b19..d8dba37 100644 --- a/src/cooler/cli/cload.py +++ b/src/cooler/cli/cload.py @@ -1,10 +1,10 @@ +import json import sys import click import h5py import numpy as np import pandas as pd -import simplejson as json from cytoolz import compose from multiprocess import Pool diff --git a/src/cooler/cli/info.py b/src/cooler/cli/info.py index eee5686..8a4f4aa 100644 --- a/src/cooler/cli/info.py +++ b/src/cooler/cli/info.py @@ -1,7 +1,7 @@ +import json import sys import click -import simplejson as json from ..api import Cooler from ..util import attrs_to_jsonable diff --git a/src/cooler/cli/load.py b/src/cooler/cli/load.py index 6717ac4..9f556c3 100644 --- a/src/cooler/cli/load.py +++ b/src/cooler/cli/load.py @@ -1,9 +1,9 @@ +import json import sys import click import numpy as np import pandas as pd -import simplejson as json from ..create import ( BIN_DTYPE, diff --git a/src/cooler/create/_create.py b/src/cooler/create/_create.py index 6de4013..3f704d8 100644 --- a/src/cooler/create/_create.py +++ b/src/cooler/create/_create.py @@ -1,5 +1,6 @@ from __future__ import annotations +import json import os import os.path as op import posixpath @@ -12,7 +13,6 @@ import h5py import numpy as np import pandas as pd -import simplejson as json from .._logging import get_logger from .._typing import Tabular diff --git a/src/cooler/fileops.py b/src/cooler/fileops.py index cdc42f6..00f036e 100644 --- a/src/cooler/fileops.py +++ b/src/cooler/fileops.py @@ -1,21 +1,14 @@ from __future__ import annotations -import os - # from textwrap import dedent +import json +import os import warnings from collections.abc import Callable from datetime import datetime from numbers import Number from typing import Any, Literal -import simplejson as json - -try: - from simplejson import JSONDecodeError -except ImportError: - JSONDecodeError = ValueError # PY35+ - import h5py import numpy as np from asciitree import BoxStyle, LeftAligned @@ -56,7 +49,7 @@ def decode_attr_value( except ValueError: try: o = json.loads(obj) - except JSONDecodeError: + except ValueError: o = obj else: o = obj diff --git a/tests/test_cli_ingest.py b/tests/test_cli_ingest.py index ab43469..875f4db 100644 --- a/tests/test_cli_ingest.py +++ b/tests/test_cli_ingest.py @@ -1,4 +1,5 @@ # from io import StringIO +import json import os.path as op import tempfile from glob import glob @@ -6,7 +7,6 @@ import numpy as np import pandas as pd import pytest -import simplejson as json # from _common import cooler_cmp from click.testing import CliRunner