Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly test standalone installation / tests in the CI #496

Closed
fedarko opened this issue Mar 18, 2021 · 2 comments · Fixed by #499
Closed

Explicitly test standalone installation / tests in the CI #496

fedarko opened this issue Mar 18, 2021 · 2 comments · Fixed by #499

Comments

@fedarko
Copy link
Collaborator

fedarko commented Mar 18, 2021

One of the reasons that the bug in #495 slipped through, I think, is that the CI runs all of its tests within a QIIME 2 conda environment -- so if there are installation errors made due to installing Empress into an environment that doesn't have all the QIIME 2 stuff pre-loaded, these errors won't be caught on the CI.

As a quick solution, one way to fix this would be adding a chunk of code (a build? a step? I'm not sure yet...) to the GitHub actions script that creates a new "vanilla" conda environment with just Python installed, and then tests that following the installation instructions in the README (see #495 -- need to install Cython/NumPy first) installs Empress properly. To test this environment, we could just run the couple of standalone-specific tests Empress has set up -- nosetest has ways of only running a handful of tests.

This would be really useful to have in -- since changes within the Python ecosystem at large can be more volatile than those within a QIIME 2 environment, this sort of setup would help keep us safe from Weird Stuff Happening (tm).

@gibsramen
Copy link
Collaborator

I think this would make most sense as a separate GH Actions workflow. Can take a crack at this tomorrow.

@gibsramen
Copy link
Collaborator

gibsramen commented Mar 18, 2021

Currently in tests/python/test_cli.py we're set up to load the qza files through the Artifact API and convert them using transformers. What do we think about changing this to just unzip the files into the the Click isolated filesystem (which we are using anyway) and removing the qiime2 import?

EDIT: make-dev-page.py could also probably be modified the same way.

nwk_tree = Artifact.load(q2_tree_loc).view(TreeNode)
# convert table to .biom
biom_tbl = Artifact.load(q2_table_loc).view(biom.table.Table)
# remove comment rows from sample metadata
sm = pd.read_csv(q2_sm_loc, sep="\t", index_col=0, skiprows=[1])
# convert feature metadata to .tsv
fm = Artifact.load(q2_fm_loc).view(pd.DataFrame)
# convert biplot to skbio OrdinationResults
pcoa = Artifact.load(q2_pcoa_loc).view(OrdinationResults)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants