forked from snakemake/snakemake
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add gitfile option to make it possible to use local git repos w…
…hen importing modules (snakemake#1376) * feat: add gitfile option to make it possible to use local git repos when importing modules. * refactor: clean up code. * fix: provide path/url when retrieving schema. * style: make black formatting happy. * test: add test cases for using a local git repo * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * Update sourcecache.py * fix: update tests * make black formatting happy * add missing expected-results * fix failing tests * feat: make it possible to use relative repo path * style: make black happy Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
- Loading branch information
1 parent
f0ec73d
commit 1a3b91f
Showing
17 changed files
with
185 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from snakemake.utils import min_version | ||
|
||
min_version("6.1.1") | ||
|
||
configfile: "config.yaml" | ||
|
||
import os | ||
|
||
module_path = os.path.join(os.getcwd(), "repo/module") | ||
|
||
module local_git_module: | ||
snakefile: | ||
gitfile(module_path, path="workflow/Snakefile", tag="v0.0.1") | ||
config: | ||
config | ||
|
||
use rule * from local_git_module as local_git_module_* | ||
|
||
rule all: | ||
input: | ||
"test.txt" |
20 changes: 20 additions & 0 deletions
20
tests/test_module_local_git/Snakefile_main_missing_rule_and_schema
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from snakemake.utils import min_version | ||
import os | ||
|
||
min_version("6.1.1") | ||
|
||
configfile: "config.yaml" | ||
|
||
module_path = os.path.join(os.getcwd(), "repo/module") | ||
|
||
module local_git_module: | ||
snakefile: | ||
gitfile(module_path, path="workflow/Snakefile", tag="main") | ||
config: | ||
config | ||
|
||
use rule * from local_git_module as local_git_module_* | ||
|
||
rule all: | ||
input: | ||
"test.txt" |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from snakemake.utils import min_version | ||
import os | ||
|
||
min_version("6.1.1") | ||
|
||
configfile: "config.yaml" | ||
|
||
module_path = os.path.join(os.getcwd(), "repo/module") | ||
|
||
module local_git_module: | ||
snakefile: | ||
gitfile(module_path, path="workflow/Snakefile", tag="e0.0.1") | ||
config: | ||
config | ||
|
||
use rule * from local_git_module as local_git_module_* | ||
|
||
rule all: | ||
input: | ||
"test.txt" |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from snakemake.utils import min_version | ||
import os | ||
|
||
min_version("6.1.1") | ||
|
||
configfile: "config.yaml" | ||
|
||
module_path = os.path.join(os.getcwd(), "repo/module") | ||
|
||
module local_git_module: | ||
snakefile: | ||
gitfile(module_path, path="workflow/Snakefile", tag="e0.0.2") | ||
config: | ||
config | ||
|
||
use rule * from local_git_module as local_git_module_* | ||
|
||
rule all: | ||
input: | ||
"test.txt" |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from snakemake.utils import min_version | ||
|
||
min_version("6.1.1") | ||
|
||
configfile: "config.yaml" | ||
|
||
module local_git_module: | ||
snakefile: | ||
gitfile("repo/module", path="workflow/Snakefile", tag="v0.0.1") | ||
config: | ||
config | ||
|
||
use rule * from local_git_module as local_git_module_* | ||
|
||
rule all: | ||
input: | ||
"test.txt" |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
samples: samples.tsv | ||
|
||
units: units.tsv |
Empty file.
Empty file.
Empty file.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sample_name alias group platform purity | ||
a a a ILLUMINA |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sample_name unit_name fq1 fq2 sra adapters | ||
a a data/a.1.fq data/a.2.fq |
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