Skip to content

Commit

Permalink
TST: fixing test failures from python 3.9 update
Browse files Browse the repository at this point in the history
  • Loading branch information
lizgehret authored Jun 4, 2024
2 parents 0b5c3db + 84b4ab1 commit d112353
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rescript/cross_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def evaluate_fit_classifier(ctx,
# Validate inputs
start = timeit.default_timer()
taxa, seq_ids = _validate_cross_validate_inputs(taxonomy, sequences)
taxa = taxa.loc[seq_ids]
taxa = taxa.loc[list(seq_ids)]
taxonomy = q2.Artifact.import_data('FeatureData[Taxonomy]', taxa)
new_time = _check_time(start, 'Validation')

Expand Down
2 changes: 1 addition & 1 deletion rescript/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def _plot_eval_seqs(results, lengths, palette):

def _visualize(output_dir, results, plot):

pd.set_option('display.max_colwidth', -1)
pd.set_option('display.max_colwidth', None)

# save results
results.to_csv(join(output_dir, 'evaluate_seqs_results.tsv'), sep='\t')
Expand Down
6 changes: 3 additions & 3 deletions rescript/tests/test_cross_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from qiime2.plugins import rescript
import qiime2
import pandas as pd
import pandas.util.testing as pdt
import pandas.testing as pdt

from rescript import cross_validate

Expand All @@ -28,8 +28,8 @@ def setUp(self):

# drop feature C1b because it is missing species level
self.taxa_series = pd.read_csv(
self.get_data_path('derep-taxa.tsv'), sep='\t', index_col=0,
squeeze=True).drop('C1b')
self.get_data_path('derep-taxa.tsv'),
sep='\t', index_col=0).squeeze('columns').drop('C1b')
self.taxa = import_data('FeatureData[Taxonomy]', self.taxa_series)
seqs = import_data(
'FeatureData[Sequence]', self.get_data_path('derep-test.fasta'))
Expand Down
2 changes: 1 addition & 1 deletion rescript/tests/test_derep.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qiime2.plugins import rescript
import qiime2
import pandas as pd
import pandas.util.testing as pdt
import pandas.testing as pdt

from rescript.dereplicate import _backfill_taxonomy
from rescript._utilities import _return_stripped_taxon_rank_list
Expand Down
2 changes: 1 addition & 1 deletion rescript/tests/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import qiime2
import pandas as pd
import numpy as np
import pandas.util.testing as pdt
import pandas.testing as pdt
from q2_types.feature_data import DNAIterator

from rescript import evaluate
Expand Down
2 changes: 1 addition & 1 deletion rescript/tests/test_filter_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import pandas as pd
import qiime2
import pandas.util.testing as pdt
import pandas.testing as pdt
from qiime2.plugin.testing import TestPluginBase
from q2_types.feature_data import DNAIterator
from qiime2.plugins import rescript
Expand Down
2 changes: 1 addition & 1 deletion rescript/tests/test_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import qiime2
import pandas as pd
import numpy as np
import pandas.util.testing as pdt
import pandas.testing as pdt


import_data = qiime2.Artifact.import_data
Expand Down
2 changes: 1 addition & 1 deletion rescript/types/tests/test_types_formats_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ----------------------------------------------------------------------------
import os
import pandas as pd
import pandas.util.testing as pdt
import pandas.testing as pdt
import numpy as np
import tempfile
import pkg_resources
Expand Down

0 comments on commit d112353

Please sign in to comment.