Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nested recipe check to get_recipes #308

Merged
merged 138 commits into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
a6e402a
Pin to conda-build 3.
johanneskoester Apr 23, 2018
12f128e
Depend on latest conda-forge-pinning package.
johanneskoester Apr 23, 2018
66c1a4c
Try downgrading to last minor release of conda.
johanneskoester Apr 23, 2018
9d6636c
Try using conda 4.3.
johanneskoester Apr 23, 2018
6ee9510
Try 4.5.0
johanneskoester Apr 23, 2018
63f809f
Handle UnableToParse
johanneskoester Apr 23, 2018
3664db1
Remove galaxy-lib version restriction.
johanneskoester Apr 24, 2018
20d58eb
adapt to conda 4.5
johanneskoester Apr 24, 2018
14aafd2
use get_output_file_paths instead of get_output_file_path
johanneskoester Apr 24, 2018
76035ea
Merge branch 'cb3-migration' of github.com:bioconda/bioconda-utils in…
johanneskoester Apr 24, 2018
c847294
Merge branch 'master' into cb3-migration
johanneskoester Apr 24, 2018
f6b5669
Add lint for deprecated numpy spec.
johanneskoester Apr 24, 2018
0d7d1cc
Document new lint.
johanneskoester Apr 24, 2018
55e1e14
register lint.
johanneskoester Apr 24, 2018
82abcf7
fix tests
johanneskoester Apr 24, 2018
3384875
fix lint
johanneskoester Apr 24, 2018
38aaf26
adapt test cases and remove obsolete ones.
johanneskoester Apr 24, 2018
07eb371
Remove env_matrix.
johanneskoester Apr 25, 2018
de2e4a2
fix typo
johanneskoester Apr 25, 2018
6014495
fixes and further cleanup
johanneskoester Apr 25, 2018
9a4a3d9
fixes
johanneskoester Apr 25, 2018
312f982
Fixes.
johanneskoester Apr 25, 2018
06fa571
fix typo
johanneskoester Apr 26, 2018
742e61d
fixes
johanneskoester Apr 26, 2018
2aaf71e
fixes
johanneskoester Apr 26, 2018
d888281
fixes.
johanneskoester Apr 26, 2018
7d97668
fix DAG
johanneskoester Apr 26, 2018
be141e0
Linting now uses fully rendered recipes, and checks all combinations …
johanneskoester Apr 26, 2018
660dc84
fix conda execution in docker
johanneskoester Apr 26, 2018
b3e2eda
fix argument
johanneskoester Apr 26, 2018
7934506
fixes.
johanneskoester Apr 26, 2018
a2aa8e1
Adapt numpy x.x lint to new multi-metadata strategy.
johanneskoester Apr 30, 2018
26132ed
properly render metadata when finding built package paths.
johanneskoester Apr 30, 2018
7aa4a7c
fixes.
johanneskoester Apr 30, 2018
69b0123
fixes
johanneskoester Apr 30, 2018
2102ad0
fix test for rendering sandboxing
daler May 1, 2018
ff204fe
disable skip-existing
daler May 1, 2018
3e1533a
Use same build args for the copying as for building.
johanneskoester May 2, 2018
3cd0ff6
add test for conda-forge pinning
daler May 4, 2018
c6ed119
add ability to have separate bioconda pins
daler May 5, 2018
31bd484
pep8
daler May 5, 2018
8139e77
add some more docs on testing
daler May 5, 2018
788f6d5
add bioconda conda_build_config.yaml
daler May 5, 2018
cfa4060
add first metadata fix
daler May 5, 2018
04543f3
update tests for load_first_metadata
daler May 5, 2018
526e48d
first pass of cb3 migration docs
daler May 5, 2018
ed371bd
port bioconductor_skeleton to use cb3 compilers; improve detection
daler May 5, 2018
9473f74
update bioconductor_skeleton test
daler May 5, 2018
02e89ae
more cb3 docs
daler May 5, 2018
3f57264
add anaconda to channels
daler May 5, 2018
4494c42
add anaconda channel to circleci setup
daler May 5, 2018
2b97c0b
short-circuit filtering if skipped
daler May 5, 2018
0969bce
fix text to only check names
daler May 5, 2018
a3441ea
add test for when CI=true
daler May 5, 2018
a704232
add extra checks that built pkgs exist
daler May 6, 2018
2da3a20
add test for cb3 outputs
daler May 6, 2018
08562bf
clean up cb3 output test; typos
daler May 6, 2018
9a3a9d8
utils.Progress: remove unnecessary sleep
mbargull May 6, 2018
6a86254
pkg_test: use --involucro-path to prevent download in galaxy-lib
mbargull May 6, 2018
71f52fa
remove anaconda channel
daler May 7, 2018
7999eec
simplify htslib in test
daler May 7, 2018
71b6b0c
add compiler test
daler May 7, 2018
ce67dff
fix htslib max pin
daler May 7, 2018
d6ea7a1
update docs to reflect run_exports
daler May 7, 2018
b2c82d9
Merge branch 'master' into cb3-migration
daler May 7, 2018
d374363
Update cb3.rst
kyleabeauchamp May 8, 2018
232e160
Merge pull request #297 from kyleabeauchamp/patch-1
daler May 9, 2018
ea608fb
Merge branch 'master' into cb3-migration
johanneskoester May 13, 2018
c9ec48b
update docs
daler May 13, 2018
fd7bfee
add lint functions for compilers and fn
daler May 13, 2018
3ec7681
add linting docs
daler May 13, 2018
80d25c7
bring back the noarch lint docs
daler May 13, 2018
7079bb3
render with finalize=False where possible
mbargull May 16, 2018
0ae67ab
rename load_conda_config to load_conda_build_config
mbargull May 16, 2018
884e757
use conda.exports (public API)
mbargull May 16, 2018
91639b8
pin conda-forge-pinning, update conda/conda-build pins
mbargull May 16, 2018
77b4f84
lint: handle if source is a list
mbargull May 16, 2018
7002683
adjust tests
mbargull May 16, 2018
a089bd0
show test durations
mbargull May 16, 2018
b6121dc
lint: use decorator instead explicit loops
mbargull May 16, 2018
8f026ad
lint: fix decorator, pass through __name__ for registry
mbargull May 16, 2018
933a954
lint: fix decorator, pass through __name__ for registry (2)
mbargull May 16, 2018
03960fe
run long-running tests separately
mbargull May 16, 2018
4686605
Merge branch 'master' into cb3-migration
johanneskoester May 22, 2018
b122120
docker_utils: use base image acc. to BIOCONDA_UTILS_TAG
mbargull May 25, 2018
b738ca5
Remove a priori filtering. Instead filter when each recipe is conside…
johanneskoester May 25, 2018
5ea1d5e
Naming.
johanneskoester May 25, 2018
325f0f2
Skip filter tests for now.
johanneskoester May 25, 2018
d3530ad
Disable DAG generation.
johanneskoester May 25, 2018
26ec23c
Activate DAG calculation again (we cannot avoid it because we need th…
johanneskoester May 25, 2018
668ec38
Fast loading of metadata for DAG.
johanneskoester May 25, 2018
a6dabe3
Only use host dependencies when building DAG.
johanneskoester May 26, 2018
2fb47ea
get_package_paths returns tuple
daler May 26, 2018
6072d39
utils.get_package_paths: only return paths
mbargull May 26, 2018
62f1d52
requirements: update conda, conda-build, conda-forge-pinning
mbargull May 26, 2018
9821159
use bypass_env_check=True when we use non-finalized renderings
mbargull May 26, 2018
62efbd5
requirements: use conda-build=3.10.3 for now
mbargull May 26, 2018
66497f2
test_utils: disable the remaining filter_recipes test
mbargull May 26, 2018
c074b13
Abort building if build strings in repo are divergent
mbargull May 29, 2018
4085e6a
fix previous commit: add Python's redundant colon
mbargull May 29, 2018
b002ec0
fix generate_docs.py
mbargull May 29, 2018
b4917aa
fix another typo
mbargull May 29, 2018
69a1f35
support linting just before building
daler Jun 2, 2018
ec47a17
sort recipes for linting
daler Jun 2, 2018
77d673b
better noarch detection
daler Jun 2, 2018
7a0c70b
Merge branch 'cb3-migration' of github.com:bioconda/bioconda-utils in…
daler Jun 2, 2018
0302291
default df
daler Jun 2, 2018
7d35d0b
be clear which recipe the problem is on
daler Jun 2, 2018
b2fb765
add back in debug info on linting
daler Jun 2, 2018
b6763c5
more generic check for compilers
daler Jun 2, 2018
41f39c0
add conda_build_config files consistently
mbargull Jun 3, 2018
e0603ec
fix previous commit
mbargull Jun 3, 2018
190ff4f
fix previous commit again
mbargull Jun 3, 2018
9fdbc8f
fix mulled upload: iterate over all generated images.
johanneskoester Jun 14, 2018
6c45c87
build: fix collecting mulled_images
mbargull Jun 19, 2018
3ab8023
requirements: require python >=3.6
mbargull Jun 21, 2018
d4701c6
build: skip builds early based on num of existing builds in channel
mbargull Jun 23, 2018
99782c2
build: topo-sort connected components before merging
mbargull Jun 24, 2018
e033e47
docs: handle extra.notes being a list
mbargull Jun 24, 2018
44565d0
build: handle UnsatisfiableError
mbargull Jun 24, 2018
86fc487
fix import
mbargull Jun 24, 2018
4f6b405
[WIP] update to conda-build 3.10.9 (#312)
mbargull Jun 26, 2018
f510b55
Add nested recipe check to get_recipes
mikecormier May 30, 2018
8026834
Add test for new get_recipes deep nesting check
mikecormier May 31, 2018
58f6626
Update test_utils.py
mikecormier Jun 1, 2018
38cea4f
update test_depthcheck_get_recipe
mikecormier Jun 11, 2018
cf0ddc8
update test_depthcheck_get_recipe
mikecormier Jun 11, 2018
7f2f1ac
Update test_utils.py
mikecormier Jun 11, 2018
b0d5b5a
Update test_utils.py
mikecormier Jun 11, 2018
c4fac8a
Update test_utils.py
mikecormier Jun 11, 2018
375cc21
update test_depthcheck_get_recipe
mikecormier Jun 11, 2018
29029a1
Re-test with circle ci
mikecormier Jun 22, 2018
f621609
Update utils.py
mikecormier Jun 26, 2018
7c309f0
Update test_utils.py
mikecormier Jun 27, 2018
e0903e1
Update test_utils.py
mikecormier Jun 27, 2018
7b35514
Update test_utils.py
mikecormier Jul 19, 2018
68f98e6
Update utils.py
mikecormier Jul 19, 2018
f252e6a
Merge branch 'master' into patch-1
mikecormier Jul 19, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bioconda_utils/build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import subprocess as sp
from itertools import chain
from collections import defaultdict, namedtuple
import os
import logging
Expand Down Expand Up @@ -371,6 +372,7 @@ def build_recipes(
# merge subdags of the selected chunk
subdag = dag.subgraph(chunks[subdag_i])


recipes = [recipe
for package in subdag
for recipe in name2recipes[package]]
Expand Down
9 changes: 5 additions & 4 deletions bioconda_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ def get_deps(meta, sec):
return []
return [dep.split()[0] for dep in deps if dep]


def get_inner_deps(dependencies):
dependencies = list(dependencies)
for dep in dependencies:
Expand Down Expand Up @@ -537,10 +538,10 @@ def get_recipes(recipe_folder, package="*"):
logger.debug(
"get_recipes(%s, package='%s'): %s", recipe_folder, package, p)
path = os.path.join(recipe_folder, p)
yield from map(os.path.dirname,
glob.glob(os.path.join(path, "meta.yaml")))
yield from map(os.path.dirname,
glob.glob(os.path.join(path, "*", "meta.yaml")))
for new_dir in glob.glob(path):
for dir_path,dir_names,file_names in os.walk(new_dir):
if "meta.yaml" in file_names:
yield dir_path


def get_latest_recipes(recipe_folder, config, package="*"):
Expand Down
93 changes: 93 additions & 0 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,3 +976,96 @@ def test_compiler():
for i in utils.built_package_paths(v):
assert os.path.exists(i)
ensure_missing(i)

def test_nested_recipes():
"""
Test get_recipes ability to identify different nesting depths of recipes
"""
r = Recipes(

"""
shallow:
meta.yaml: |
package:
name: shallow
version: "0.1"
build.sh: |
#!/bin/bash
echo "Shallow Created"
pwd
normal/normal:
meta.yaml: |
package:
name: normal
version: "0.1"
build:
skip: true
requirements:
build:
- python 3.6
build.sh: |
#!/bin/bash
echo "Testing build.sh through python"
python -h
deep/deep/deep:
meta.yaml: |
package:
name: deep
version: "0.1"
requirements:
build:
- python
run:
- python
build.sh: |
#!/bin/bash
## Empty script
deeper/deeper/deeper/deeper:
meta.yaml: |
package:
name: deeper
version: "0.1"
F/I/V/E/deep:
meta.yaml: |
package:
name: fivedeep
version: "0.1"
requirements:
build:
- python 3.6
run:
- python 3.6
S/I/X/De/e/ep:
meta.yaml: |
package:
name: ep
version: "0.1"
S/E/V/E/N/D/eep:
meta.yaml: |
package:
name: eep
version: "0.1"
T/W/E/N/T/Y/N/E/S/T/D/I/R/E/C/T/O/R/Y/DEEP:
meta.yaml: |
package:
name: twentydeep
version: "0.1"
""", from_string=True)
r.write_recipes()

build_results = build.build_recipes(
r.basedir,
config={},
packages="*",
testonly=False,
force=False,
mulled_test=False,
)
assert build_results

assert len(list(utils.get_recipes(r.basedir))) == 8

for k, v in r.recipe_dirs.items():
for i in utils.built_package_paths(v):
assert os.path.exists(i)
ensure_missing(i)