From ed183a50fe6757c52770f03f9d10ddf1fef4fabd Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Tue, 8 Oct 2024 15:00:36 +0100
Subject: [PATCH 1/2] Passing a string to pd.read_json is deprecated
This was fixed in subcmd_plot.py during #425
---
pyani/scripts/subcommands/subcmd_report.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyani/scripts/subcommands/subcmd_report.py b/pyani/scripts/subcommands/subcmd_report.py
index f62aecbe..2d6378a1 100644
--- a/pyani/scripts/subcommands/subcmd_report.py
+++ b/pyani/scripts/subcommands/subcmd_report.py
@@ -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
@@ -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)
From 42b3c01929c13fd4e0d1cc0473c5b1be37a25772 Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Tue, 8 Oct 2024 15:05:44 +0100
Subject: [PATCH 2/2] Ran black via pre-commit setup
---
docs/api/conf.py | 22 +++++++++++-----------
pyani/run_sge.py | 7 +++----
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/docs/api/conf.py b/docs/api/conf.py
index fbdccbe5..adfb7c71 100644
--- a/docs/api/conf.py
+++ b/docs/api/conf.py
@@ -17,9 +17,9 @@
# -- Project information -----------------------------------------------------
-project = 'pyani'
-copyright = '2019, Author'
-author = 'Author'
+project = "pyani"
+copyright = "2019, Author"
+author = "Author"
# -- General configuration ---------------------------------------------------
@@ -28,25 +28,25 @@
# 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 -------------------------------------------------
@@ -54,12 +54,12 @@
# 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 -------------------------------------------------
diff --git a/pyani/run_sge.py b/pyani/run_sge.py
index 4473756a..8c14ba05 100644
--- a/pyani/run_sge.py
+++ b/pyani/run_sge.py
@@ -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)
@@ -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
@@ -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"