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

Remove superfluous logger setup. #431

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions bioconda_utils/bioconductor_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ def write_recipe_recursive(proj, seen_dependencies, recipe_dir, config, force,

def write_recipe(package, recipe_dir, config, force=False, bioc_version=None,
pkg_version=None, versioned=False, recursive=False, seen_dependencies=None,
packages=None, skip_if_in_channels=None):
packages=None, skip_if_in_channels=None, only_datapkgs=False):
"""
Write the meta.yaml and build.sh files. If the package is detected to be
a data package (bsed on the detected URL from Bioconductor), then also
Expand Down Expand Up @@ -922,6 +922,11 @@ def write_recipe(package, recipe_dir, config, force=False, bioc_version=None,
"""
config = utils.load_config(config)
proj = BioCProjectPage(package, bioc_version, pkg_version, packages=packages)

if only_datapkgs and not proj.is_data_package:
logger.info("Skipping non-data package {}".format(proj.package))
return

logger.info('Making recipe for: {}'.format(package))

if seen_dependencies is None:
Expand Down Expand Up @@ -972,7 +977,7 @@ def write_recipe(package, recipe_dir, config, force=False, bioc_version=None,
):
proj.build_number = int(current_build_number) + 1
if 'extra' in current_meta:
exclude = set(['final', 'copy_test_source_files'])
exclude = set(['final', 'copy_test_source_files', 'parent_recipe'])
proj.extra = {x: y for x, y in current_meta['extra'].items() if x not in exclude}

with open(os.path.join(recipe_dir, 'meta.yaml'), 'w') as fout:
Expand Down Expand Up @@ -1002,7 +1007,6 @@ def write_recipe(package, recipe_dir, config, force=False, bioc_version=None,
proj.bioconductor_tarball_url,
bioarchive_url(proj.package, proj.version, proj.bioc_version),
cargoport_url(proj.package, proj.version, proj.bioc_version),
proj.cargoport_url
]
if u is not None
]
Expand Down
7 changes: 5 additions & 2 deletions bioconda_utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,13 @@ def dependent(recipe_folder, config, restrict=False,
@arg('--skip-if-in-channels', nargs='*', help="""When --recursive is used, it will build
*all* recipes. Use this argument to skip recursive building for packages
that already exist in the packages listed here.""")
@arg('--only-datapkgs', action='store_true', help="""Only consider data packages.
To be used in combination with 'update-all-packages'.""")
@enable_logging('debug')
def bioconductor_skeleton(
recipe_folder, config, package, versioned=False, force=False,
pkg_version=None, bioc_version=None, recursive=False,
skip_if_in_channels=['conda-forge', 'bioconda']):
skip_if_in_channels=['conda-forge', 'bioconda'], only_datapkgs=False):
"""
Build a Bioconductor recipe. The recipe will be created in the `recipes`
directory and will be prefixed by "bioconductor-". If `--recursive` is set,
Expand Down Expand Up @@ -710,7 +712,8 @@ def bioconductor_skeleton(
_bioconductor_skeleton.write_recipe(
k, recipe_folder, config, force=True, bioc_version=bioc_version,
pkg_version=v['Version'], versioned=versioned, packages=packages,
skip_if_in_channels=skip_if_in_channels)
skip_if_in_channels=skip_if_in_channels,
only_datapkgs=only_datapkgs)
except:
problems.append(k)
if len(problems):
Expand Down