Skip to content

Commit

Permalink
Merge pull request #437 from peterjc/read_json_stringio_report
Browse files Browse the repository at this point in the history
Passing a string to pd.read_json is deprecated
  • Loading branch information
widdowquinn authored Oct 9, 2024
2 parents 6b8b262 + 42b3c01 commit c5539a4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions docs/api/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

# -- Project information -----------------------------------------------------

project = 'pyani'
copyright = '2019, Author'
author = 'Author'
project = "pyani"
copyright = "2019, Author"
author = "Author"


# -- General configuration ---------------------------------------------------
Expand All @@ -28,38 +28,38 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.todo',
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.todo",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]


# -- Extension configuration -------------------------------------------------
Expand Down
7 changes: 3 additions & 4 deletions pyani/run_sge.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def build_joblist(jobgraph) -> List:
:param jobgraph:
"""
logger = logging.getLogger(__name__)

jobset = set() # type: Set
for job in jobgraph:
jobset = populate_jobset(job, jobset, depth=1)
Expand Down Expand Up @@ -136,8 +136,7 @@ def run_dependency_graph(
logger = logging.getLogger(__name__)

logger.debug("Received jobgraph with %d jobs", len(jobgraph))



jobs_main = [] # Can be run first, before deps
jobs_deps = [] # Depend on the main jobs

Expand Down Expand Up @@ -273,7 +272,7 @@ def submit_safe_jobs(
"""
logger = logging.getLogger(__name__)
logger.debug("Received %s jobs", len(jobs))

# Loop over each job, constructing SGE command-line based on job settings
for job in jobs:
job.out = root_dir / "stdout"
Expand Down
3 changes: 2 additions & 1 deletion pyani/scripts/subcommands/subcmd_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

from argparse import Namespace
from typing import List, NamedTuple
from io import StringIO
from pathlib import Path

import pandas as pd
Expand Down Expand Up @@ -300,7 +301,7 @@ def subcmd_report(args: Namespace) -> int:
]
]:
logger.debug("Writing %s results", matdata.name)
matrix = pd.read_json(matdata.data)
matrix = pd.read_json(StringIO(matdata.data))
# Matrix rows and columns are labelled if there's a label dictionary,
# and take the dataframe index otherwise
matrix = label_results_matrix(matrix, matlabel_dict)
Expand Down

0 comments on commit c5539a4

Please sign in to comment.