Skip to content

Commit cbdb9a3

Browse files
MichaelBarnettMichael Barnett
andauthored
Test pr (#5)
* Removed some text from the tester. Checking testing works. * removed pycache, as well as unused bad db example from removed test. * updated channel defaults for testing env. * Update testing environment to include hmmer. * update env * Update error reporting. * Update error reporting. * remove dbs * Reupload dbs * Updated assert error for when database fails to run to print the whole log to console. Rather than fail printing too large of a assert text. * Update readme for DB release instructions. --------- Co-authored-by: Michael Barnett <ToMichaelBarnett@gmail.com>
1 parent ed7bd5a commit cbdb9a3

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ conda activate commec-dev
3737
From here, you should have an interactive version of the package installed via (`pip -e .`) as well
3838
as the necessary shell dependencies.
3939

40-
Database Release Pipeline
41-
=========================
42-
Explicit Instructions here.
40+
Database Release and Update
41+
===========================
42+
Updating the databases will entail the following steps:
43+
- Ensure git lfs is installed.
44+
- Create a Pull Request for changes into main, triggering unit tests on new database files.
45+
- On successful PR, merge into main.
46+
- Create a Release, which will automatically package commec-dbs lfs into a release zip.
4347

4448
About
4549
=====
@@ -48,4 +52,4 @@ Biosafety Initiative for Science. From 2021-2023, the software and databases wer
4852
team of technical consultants working with the Nuclear Threat Initiative, led by Dr. Nicole Wheeler
4953
of the University of Birmingham, and including contributions from Brittany Rife Magalis of the
5054
University of Louisville and Jennifer Lu of the Center for Computational Biology at Johns Hopkins
51-
University. In 2024, IBBIS became the home of the project.
55+
University. In 2024, IBBIS became the home of the project.

tests/environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ channels:
44
- bioconda
55
- defaults
66
dependencies:
7-
- python >=3.8
7+
- python >=3.10
88
- commec
99
- pytest

tests/test_dbs.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ def test_databases_can_run(input_database, tmp_path):
4141
output_file = tmp_path / "db.out"
4242

4343
screener = handler_class(db_path, fasta_file, str(output_file), force=True)
44-
screener.search()
44+
try:
45+
screener.search()
46+
except RuntimeError:
47+
with open(str(output_file)+".log.tmp",'r', encoding = 'utf-8') as f:
48+
output_text = str(f.read())
49+
print("Error text for database run: ", output_text)
50+
assert False, "Failed to run subprocess: Temporary log output."
51+
4552

4653
with open(output_file,'r', encoding = 'utf-8') as f:
4754
output_text = str(f.read())

0 commit comments

Comments
 (0)