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

Conda Install #24

Open
JChristopherEllis opened this issue Mar 25, 2021 · 9 comments
Open

Conda Install #24

JChristopherEllis opened this issue Mar 25, 2021 · 9 comments

Comments

@JChristopherEllis
Copy link

Hi,

Several months ago we discussed a new conda install. Is that still in the works?

@sestaton
Copy link
Owner

Hello,

Sorry for the delay on this issue. My job is keeping me busy and it is hard to find time for this project. I will take a look and try to do it this weekend.

Thanks for the comment.

@JChristopherEllis
Copy link
Author

Fantastic, thanks so much.

@fdchevalier
Copy link

Hi @JChristopherEllis and @sestaton,

@sestaton, I made a recipe for installing hmmer2go through conda (see here). I tested it on CentOS 7 and Ubuntu 20.04 (WSL) successfully. The recipe is ready to be submitted to bioconda. However, I wanted to check with you first to make sure this is OK and to know if you want to maintain this or want me to do so (this is pretty low maintenance and fine by me).

@sestaton
Copy link
Owner

This is great @fdchevalier! Thanks for the recipe. I will test it myself and give you some feedback. It terms of maintenance, it might be better put in this repo so I can add a git hook or build script to make a new release, update docker, conda, etc. in one step. That way they all stay in sync on a new release.

@JChristopherEllis
Copy link
Author

JChristopherEllis commented May 26, 2022 via email

@fdchevalier
Copy link

Hi everyone,

Thank you for the feedback!

@sestaton, I totally agree regarding maintenance. This will be more sensible.

I also made some modifications to the recipe today. I added a test section. Running the make test during the building did not work (even when adding the same packages as in the run section, error messages appeared regarding not finding the blib directory from my understanding). I tried to run the perl scripts within the test section also but this failed (for the same reason as during the building). Anyway, I started to copy the test commands in a bash script. However, I did only few and stopped because of the download of the Pfam database. This requires either wget or curl which are not standard tools and need to be installed. One could be a dependency listed in the recipe but I don't think this is a good idea. run_test script can also be written in perl but I am not fluent enough to do that efficiently.

Anyway, let me know if you have any questions or need any help with this.

@sestaton
Copy link
Owner

Thanks again, @fdchevalier.

We do not need to run tests in the containers. Every change made to the code triggers a test matrix to run on a fresh virtual machine. Those should pass because they are tested before being incorporated but sometimes issues arise. Any release with a version number would have passed all the tests.

The tests themselves cannot be run as a plain Perl script. They need to run with the make file or manually with a program called prove like so:

prove -lv t/ 

That will run all the tests but you can specify individual tests to run:

prove -bv t/00-fetchmap.t 

Network tests are skipped by default. You can run the full test suite by setting HMMER2GO_ENV='development'. This should pass in any case and never use wget or curl. Those programs are not used by the main application. There are some older methods in the code that used these for debugging firewall issues but that was experimental. All references to wget or curl could be removed. Only small result files are tested and Pfam is not used.

In the demo section of the wiki you can see an example to run the full process, which does assume Pfam is not on the machine.

@sestaton
Copy link
Owner

@fdchevalier Can you give some guidance on the test setup for the conda recipe? I would like to know we are testing things in an equivalent environment or method. I will add the recipes here and create a pull request to add them to the bioconda repo once it is tested.

@fdchevalier
Copy link

Hi @sestaton,

First, I don't know how familiar you are with running tests when creating a package with a conda recipe. To make sure we are on the same page, here is my understanding of the process. When the package is built, conda performs test if their is a test section in the recipe or if there is a run_test.sh script available. To run the tests, conda creates a dedicated environment, installs the dependencies listed in the run section and runs the commands or the script inside. The tests should therefore be platform independent I guess (as long as the package dependencies can be installed). Does this answer your comment on the "equivalent environment"?

Regarding the tests, they are run only during package building not installation. So if you submit your recipe to the bioconda repo, the repo will build the package and test it. As I mentioned there are two ways to do them:

  • The test section: in this section, we can list the data we need (as I do in the recipe) and the commands that need to be run for testing.
  • The run_test.sh: this script supersedes any commands of the test section of the recipe. You can run any commands in the script. In our case, I replicated some tests made during hmmer2go compilation but had to stop for the reasons mentioned above.

As of note, I actually tried to remove the run script and add prove commands in the test section and run the scripts from the t folder but this failed as described in the previous comments.

If you want me to test your recipe, I would be happy to do so. If you need more info or if I missed something, please let me know.

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

No branches or pull requests

3 participants