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

Conversation

mikecormier
Copy link
Member

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.

mbargull and others added 4 commits June 24, 2018 14:25
* 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
@johanneskoester
Copy link
Contributor

@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.
@mikecormier
Copy link
Member Author

@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.

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)]:
Copy link
Contributor

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.

Copy link
Contributor

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).

@@ -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():
Copy link
Contributor

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?

@johanneskoester
Copy link
Contributor

cb-3migration is merged into master now. Please switch to master as merge target.

@mikecormier
Copy link
Member Author

@johanneskoester,
I have made the changes you requested and all test are passing.

@mikecormier mikecormier changed the base branch from cb3-migration to master July 19, 2018 15:12
@johanneskoester
Copy link
Contributor

Looks good to me!

@johanneskoester johanneskoester merged commit 9aa0ef2 into bioconda:master Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants