Skip to content

Commit

Permalink
Update BioBlend testing howto
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo authored Jun 16, 2023
1 parent a0af672 commit b4b2928
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,15 @@ Making a new release
3. Update `CHANGELOG.md` .
4. Commit the changes above, push to GitHub, and wait for Continuous Integration (CI) tests to pass.
5. Make a new release through the GitHub interface. A CI job will automatically upload the packages to PyPI.
7. Update the [Bioconda package](https://github.com/bioconda/bioconda-recipes/blob/master/recipes/bioblend/meta.yaml).
7. Check and merge the automatic pull request to update the [Bioconda package](https://github.com/bioconda/bioconda-recipes/blob/master/recipes/bioblend/meta.yaml).

How to run BioBlend tests
-------------------------

1. Clone Galaxy via `git clone https://github.com/galaxyproject/galaxy.git`.
2. Copy the sample Galaxy config file via `cp ~/galaxy/config/galaxy.yml.sample ~/galaxy/config/galaxy.yml`.
3. Open `galaxy/config/galaxy.yml` in an editor, uncomment the `master_api_key` line, set it to a value, and save your change.
4. Start Galaxy by running `./galaxy/run.sh`.
5. In a browser, type `127.0.0.1:8080` to go to the Galaxy server and login by clicking on `Login or Register`.
6. Select User -> Preferences -> Manage API Key. Create a new API key and save the key value.
7. Clone BioBlend via `git clone https://github.com/galaxyproject/bioblend`.
8. Set the following environment variables by running these commands in a terminal. Use the master API key set in step 3, your login email from step 6, and the API key obtained in step 7. Change the Galaxy version and job timeout, if needed.
1. Clone Galaxy to a directory outside of BioBlend source directory via `git clone https://github.com/galaxyproject/galaxy.git`

* `export BIOBLEND_GALAXY_API_KEY=<ApiKey>`
2. Change directory to your BioBlend source and run the tests via `./run_bioblend_tests.sh -g GALAXY_PATH [-r GALAXY_REV] [-e TOX_ENV]` where `GALAXY_PATH` is the directory where the galaxy repository was cloned, `GALAXY_REV` is the branch or commit of Galaxy that you would like to test against (if different from the current state of your galaxy clone), and `TOX_ENV` is used to specify the Python version to use for BioBlend, e.g. `py37` for Python 3.7.

* `export BIOBLEND_GALAXY_MASTER_API_KEY=<MasterApiKey>`
You can also add `2>&1 | tee log.txt` to the command above to contemporarily view the test output and save it to the `log.txt` file.

* `export BIOBLEND_GALAXY_URL=http://127.0.01:8080`

* `export BIOBLEND_GALAXY_USER_EMAIL=<YourLoginEmail>`

* `export BIOBLEND_TEST_JOB_TIMEOUT=100`

* `export GALAXY_VERSION=21.09`

9. Run BioBlend tests via `~/bioblend/run_bioblend_tests.sh -g ~/galaxy -e py39 2>&1 | tee log.txt`.

* Pass your machine's Python version via `-e` flag. E.g. pass `py39` for Python 3.9.

* Re-route stderr to stdout via `2>&1` and `tee` the output so you can both view it and save it to log.txt.
3. If needed, you can temporarily increase the Galaxy job timeout used by BioBlend tests with e.g. `export BIOBLEND_TEST_JOB_TIMEOUT=100`, and re-run the tests.

0 comments on commit b4b2928

Please sign in to comment.