From 6163b4e6f549983ba0a7be9975e765ce55747c95 Mon Sep 17 00:00:00 2001 From: James Addison <55152140+jayaddison@users.noreply.github.com> Date: Thu, 26 Jan 2023 18:51:35 +0000 Subject: [PATCH] Fixup: PR 811: install an upper-bounded version of Jinja2 during documentation build (#812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * BUG: Fixes issue with Pandas >=1.5 Set objects are no longer allowed as an index argument for a DataFrame constructor. Fixes #810 * ENH: Use newer version of node * (Re)install a semver-upper-bounded version of jinja2 package dependency during sphinx documentation build Ref: https://github.com/pallets/jinja/issues/1630 Ref: https://github.com/sphinx-doc/sphinx/issues/10291 * Revert "(Re)install a semver-upper-bounded version of jinja2 package dependency during sphinx documentation build" This reverts commit de26d4dae2dce7fd55c4bd4c8a6ec43406915353. * Specify semver-upper-bounded version of jinja2 package-documentation dependency Follows-on-from commit de26d4dae2dce7fd55c4bd4c8a6ec43406915353. * Fixup: flake8-acceptable formatting for setup.py * Update ChangeLog.md Co-authored-by: Yoshiki Vázquez Baeza --- .github/workflows/main.yml | 2 +- ChangeLog.md | 4 +++- emperor/core.py | 4 ++-- setup.py | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb1fbce0..ea6674c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Node.js enviroment uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 - uses: conda-incubator/setup-miniconda@v2 with: diff --git a/ChangeLog.md b/ChangeLog.md index e7cdb495..a80fbd79 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,7 +6,7 @@ Emperor ChangeLog ### Bug Fixes * Update remote URL to no longer use rawgit. - ([#751(https://github.com/biocore/emperor/issues/751)]). + ([#751](https://github.com/biocore/emperor/issues/751)). ### New Features @@ -16,6 +16,8 @@ Emperor ChangeLog * Pin Sphinx version to be less than 4.0. * Jupyter templates no longer require jQuery to add the CSS headers. +* Fix broken test suite with Pandas >=1.5 ([#810](https://github.com/biocore/emperor/issues/810)). +* Limit jinja2 version for doc dependencies in setup.py. Allowed versions are: `>=2.9` and `<3.1`. # Emperor 1.0.3 (14 Apr 2021) ----------------------------- diff --git a/emperor/core.py b/emperor/core.py index 85477d81..d50cce4f 100644 --- a/emperor/core.py +++ b/emperor/core.py @@ -306,9 +306,9 @@ def _validate_metadata(self, metadata, matrix, ignore_missing_samples, 'are using metadata and coordinates corresponding' ' to the same dataset.' % kind) + # sort the elements so we have a deterministic output + difference = sorted([str(i) for i in difference]) if difference and not ignore_missing_samples: - # sort the elements so we have a deterministic output - difference = sorted([str(i) for i in difference]) # if there's more than 5 missing elements, truncate the list if len(difference) > 5: diff --git a/setup.py b/setup.py index 7bf5a6fa..a6f2a397 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,8 @@ base = ["numpy >= 1.7", "scipy >= 0.17.0", "click", "pandas", "scikit-bio >= 0.4.1", "jinja2 >= 2.9", "future"] -doc = ["Sphinx<4", "sphinx-bootstrap-theme", "numpydoc"] +doc = ["Sphinx<4", "jinja2 >= 2.9, < 3.1", "sphinx-bootstrap-theme", + "numpydoc"] test = ["pep8", "flake8", "nose"] all_deps = base + doc + test