-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix history check in blastn function * rename main directory variable * path job cleaned up * path refactoring in blaster * refactor blaster module file name * clean config dict blaster assets * test cases quality assessment * path fix and type output for asset * refactor status file names * refactor file names viewer asset * remove all use of pyspark * update readme to remove openjdk dependency * fix paths and typo * attempt to test temp dir * change flake flag for complexity * ran flake and black
- Loading branch information
1 parent
723373b
commit 2f03727
Showing
39 changed files
with
196,848 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,59 @@ | ||
# import os | ||
# import warnings | ||
import pytest | ||
# from pyspark.sql import SparkSession | ||
#import logging | ||
|
||
#logger = logging.getLogger(__name__) | ||
|
||
|
||
@pytest.fixture | ||
def mock_env_ncbi_connect(monkeypatch): | ||
monkeypatch.setenv("EMAIL", "[email protected]") | ||
monkeypatch.setenv("API_KEY", "jhd6hdz778ahjeahj8889") | ||
|
||
|
||
@pytest.fixture | ||
def mock_env_ncbi_download_pos(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/ncbi_download/positive") | ||
|
||
monkeypatch.setenv("DATA_DIR", "test/fixtures/ncbi_download/positive") | ||
|
||
@pytest.fixture | ||
def mock_env_ncbi_download_neg(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/ncbi_download/negative") | ||
|
||
monkeypatch.setenv("DATA_DIR", "test/fixtures/ncbi_download/negative") | ||
|
||
@pytest.fixture | ||
def mock_env_ncbi_count(monkeypatch): | ||
monkeypatch.setenv("DATABASE", "nuccore") | ||
monkeypatch.setenv("KEYWORD", "Bacillus subtilis strain P9_B1") | ||
|
||
|
||
@pytest.fixture | ||
def mock_env_ncbi_fetch(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/ncbi_download/fetch") | ||
|
||
monkeypatch.setenv("DATA_DIR", "test/fixtures/ncbi_download/fetch") | ||
|
||
@pytest.fixture | ||
def mock_env_sequence_check(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/assets_testing_folder/sequence_quality") | ||
monkeypatch.setenv("DATA_DIR", "test/fixtures/assets_testing_folder/sequence_quality") | ||
|
||
@pytest.fixture | ||
def mock_env_sequence_check_with_history(monkeypatch): | ||
monkeypatch.setenv("DATA_DIR", "test/fixtures/assets_testing_folder/sequence_quality_with_history") | ||
|
||
@pytest.fixture | ||
def mock_env_phagy_dir_blasting(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/assets_testing_folder/blasting") | ||
monkeypatch.setenv("DATA_DIR", "test/fixtures/assets_testing_folder/blasting") | ||
|
||
@pytest.fixture | ||
def mock_env_phagy_dir_blasting_with_history(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/assets_testing_folder/blasting_with_history") | ||
monkeypatch.setenv("DATA_DIR", "test/fixtures/assets_testing_folder/blasting_with_history") | ||
|
||
@pytest.fixture | ||
def mock_env_phagy_dir_transform(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/assets_testing_folder/transform") | ||
monkeypatch.setenv("DATA_DIR", "test/fixtures/assets_testing_folder/transform") | ||
monkeypatch.setenv("FILE_SYSTEM", "fs") | ||
|
||
@pytest.fixture | ||
def mock_env_phagy_dir_transform_step3(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/assets_testing_folder/transform_3") | ||
monkeypatch.setenv("DATA_DIR", "test/fixtures/assets_testing_folder/transform_3") | ||
|
||
@pytest.fixture | ||
def mock_env_phagy_dir_synteny(monkeypatch): | ||
monkeypatch.setenv("PHAGY_DIRECTORY", "test/fixtures/assets_testing_folder/synteny") | ||
monkeypatch.setenv("DATA_DIR", "test/fixtures/assets_testing_folder/synteny") | ||
monkeypatch.setenv("SEQUENCE_FILE", "sequences.csv") | ||
# @pytest.fixture(scope="session") | ||
# def spark(): | ||
# try: | ||
# #logger = logging.getLogger("py4j") | ||
# #ogger.setLevel(logging.ERROR) | ||
# spark_session = SparkSession.builder.config( | ||
# "spark.driver.memory", "2g" | ||
# ).getOrCreate() | ||
# yield spark_session | ||
# except: | ||
# pass | ||
# finally: | ||
# spark_session.stop() | ||
|
||
@pytest.fixture | ||
def mock_env_phagy_dir_none(monkeypatch): | ||
monkeypatch.delenv("DATA_DIR", raising=False) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.