-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from databio/dev
v0.6.1
- Loading branch information
Showing
8 changed files
with
101 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.6.0" | ||
__version__ = "0.6.1" |
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 |
---|---|---|
|
@@ -3,5 +3,5 @@ pyyaml | |
requests | ||
tqdm>=4.38.0 | ||
ubiquerg>=0.5.0 | ||
yacman>=0.6.5 | ||
yacman>=0.6.6 | ||
future |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ pytest>=3.0.7 | |
pytest-remotedata | ||
pyyaml>=5 | ||
ubiquerg>=0.3 | ||
veracitools | ||
veracitools |
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 |
---|---|---|
|
@@ -3,9 +3,9 @@ | |
import os | ||
import pytest | ||
from attmap import PathExAttMap | ||
from refgenconf import RefGenConf, MissingConfigDataError, ConfigNotCompliantError | ||
from refgenconf import RefGenConf, ConfigNotCompliantError | ||
from refgenconf.const import CFG_FOLDER_KEY, CFG_GENOMES_KEY, CFG_SERVERS_KEY, \ | ||
DEFAULT_SERVER | ||
DEFAULT_SERVER, RGC_REQ_KEYS | ||
|
||
__author__ = "Vince Reuter" | ||
__email__ = "[email protected]" | ||
|
@@ -15,12 +15,8 @@ class TestRefGenConf: | |
def test_reads_file(self, cfg_file): | ||
assert isinstance(RefGenConf(cfg_file), RefGenConf) | ||
|
||
@pytest.mark.parametrize("present", [[], [(CFG_FOLDER_KEY, lambda d: d.strpath)]]) | ||
def test_missing_server_key(self, tmpdir, present): | ||
""" Omission of required config items causes expected exception """ | ||
data = {k: f(tmpdir) for k, f in present} | ||
with pytest.raises(MissingConfigDataError): | ||
RefGenConf(entries=data) | ||
def test_creation_of_empty_object_sets_req_attrs(self): | ||
assert all([k in RefGenConf() for k in RGC_REQ_KEYS]) | ||
|
||
def test_genome_folder_is_pwd_if_no_folder_key_and_raw_entries_passed(self, ro_rgc): | ||
data = PathExAttMap({k: v for k, v in ro_rgc.items() if k != CFG_FOLDER_KEY}) | ||
|
@@ -45,12 +41,6 @@ def test_genome_folder_is_value_from_config_file_if_key_present(self, tmpdir_fac | |
assert expected != os.path.dirname(conf_file) | ||
assert expected == rgc[CFG_FOLDER_KEY] | ||
|
||
def test_empty_rgc_is_false(self): | ||
assert bool(RefGenConf(entries={CFG_SERVERS_KEY: DEFAULT_SERVER})) is False | ||
|
||
def test_nonempty_rgc_is_true(self, rgc): | ||
assert bool(rgc) is True | ||
|
||
@pytest.mark.parametrize("genomes", [None, "genomes", 10] + [dt(["mm10", "hg38"]) for dt in [list, set, tuple]]) | ||
def test_illegal_genomes_mapping_type_gets_converted_to_empty_mapping(self, genomes, tmpdir): | ||
rgc = RefGenConf(entries={ | ||
|