-
Notifications
You must be signed in to change notification settings - Fork 134
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
Conversation
This will ensure that conda-build 3 is always using the pinnings defined in https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/master/recipe/conda_build_config.yaml By contributing to this list, we can maintain compatibility with conda-forge.
…of the variant matrix and both linux and osx.
* build: rename --prelint to --lint, add --lint-only/--lint-exclude args * requirements: update to conda-build 3.10.9 * build: remove default value for --lint-exclude * requirements: require python >=3.6 * meta.get_section might return None (conda-build 3.10.9 compat) * silence most flake8 nagging * bioconductor: fix missing newline at EOF for post-link.sh * fix typo * use meta.get_value preferably * make flake8 shut up already * meta.get_value only works for path with depth 2 * lint: fix should_not_be_noarch for conda_build >3.10.3 * lint._has_compilers: also check for old compiler packages * lint._get_deps: fix sections being unset on default * docs: use only one job for debugging
@mikecormier could you merge in the latest version of cb3-migration branch? |
Currently get_recipes only support recipes nested up to two deep from the recipe_folder provided. Our application of get_recipes, and potential future uses from others, has recipes nested deeper. This purposed implementation will provide the ability to locate all recipes, no matter how deep, within the user provided recipe_folder.
get_recipes was changed to allow for different levels of recipe nesting. test_depthcheck_get_recipe() will test get_recipes ability to find different levels of nested recipes.
@johanneskoester I have merged the latest updates in the cb3-migration into my branch and all test are passing. This PR is ready to be merge. |
bioconda_utils/utils.py
Outdated
glob.glob(os.path.join(path, "meta.yaml"))) | ||
yield from map(os.path.dirname, | ||
glob.glob(os.path.join(path, "*", "meta.yaml"))) | ||
for newDir in [x for x in glob.glob(path)]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use snake_case for variable names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This [x for x in glob.glob(path)]
can simply be written as glob.glob(path)
.
test/test_utils.py
Outdated
@@ -976,3 +976,98 @@ def test_compiler(): | |||
for i in utils.built_package_paths(v): | |||
assert os.path.exists(i) | |||
ensure_missing(i) | |||
|
|||
|
|||
def test_depthcheck_get_recipe(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather name this test_nested_recipes
?
cb-3migration is merged into master now. Please switch to master as merge target. |
@johanneskoester, |
Looks good to me! |
Currently get_recipes only support recipes nested up to two deep from the recipe_folder provided. Our application of get_recipes, and potential future uses from others, has recipes nested deeper. This purposed implementation will provide the ability to locate all recipes, no matter how deep, within the user provided recipe_folder.