Skip to content

Commit

Permalink
Merge pull request sequana#24 from cokelaer/fix_from_project
Browse files Browse the repository at this point in the history
Fix from project
  • Loading branch information
cokelaer committed Sep 13, 2021
2 parents a1f03be + 40de309 commit effbcbe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Changelog
========= ====================================================================
Version Description
========= ====================================================================
0.7.1 * Fix the --from-project option
0.7.0 * Set the --wrapper-prefix to point to the sequana-wrappers github
0.6.3 * Fix SequanaConfig file
0.6.2 * Fix script creation to include wrapper and take new snakemake
Expand Down
3 changes: 2 additions & 1 deletion sequana_pipetools/sequana_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def __init__(self, options, name="undefined"):
self.config = None
if "from_project" in dir(options) and options.from_project:
possible_filenames = (
options.from_project, # exact config file path
# from project tries to find a valid config.yaml
#options.from_project, # exact config file path
f"{options.from_project}/{config_name}", # config file in project path
f"{options.from_project}/.sequana/{config_name}", # config file in .sequana dir
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

_MAJOR = 0
_MINOR = 7
_MICRO = 0
_MICRO = 1
version = f"{_MAJOR}.{_MINOR}.{_MICRO}"
release = f"{_MAJOR}.{_MINOR}"

Expand Down
11 changes: 10 additions & 1 deletion tests/snaketools/test_sequana_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from sequana_pipetools import snaketools, Module, SequanaConfig

from urllib.error import URLError

from .. import test_dir


Expand Down Expand Up @@ -121,7 +123,14 @@ def test_copy_requirements(tmpdir):
"setup.py",
"https://raw.githubusercontent.com/sequana/sequana/master/README.rst",
]
cfg.copy_requirements(target=str(tmpdir))

# if not internet connection, catch the URLError
try:
cfg.copy_requirements(target=str(tmpdir))
except URLError:
assert True
except Exception:
assert False

# error
cfg.config.requirements = ["dummy"]
Expand Down

0 comments on commit effbcbe

Please sign in to comment.