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

Migrate to conda-build 3. #293

Merged
merged 127 commits into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from 120 commits
Commits
Show all changes
127 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
4e35af8
Add paper to the homepage.
johanneskoester Jul 2, 2018
b0df159
Handle dependency cycles (#313)
mbargull Jul 4, 2018
5800ebe
requirements: update to conda-forge-pinning 2018.07.18
mbargull Jul 18, 2018
9349490
Merge pull request #315 from bioconda/cf-pinning-2018-07-18
bgruening Jul 18, 2018
9e40c85
Merge branch 'master' into cb3-migration
johanneskoester 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
1 change: 1 addition & 0 deletions .circleci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ if [[ ! -d $WORKSPACE/miniconda ]]; then
bash miniconda.sh -b -p $WORKSPACE/miniconda

# step 2: setup channels

conda config --system --add channels defaults
conda config --system --add channels conda-forge
conda config --system --add channels bioconda
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test/.coverage
.coverage
htmlcov/
docs/recipes/

.pytest_cache

# Mac OS Files
.DS_Store
.DS_Store
112 changes: 112 additions & 0 deletions .ropeproject/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# The default ``config.py``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the addition of this file intentional? (Don't mind, don't care, just making sure 😉)

# flake8: noqa


def set_prefs(prefs):
"""This function is called before opening the project"""

# Specify which files and folders to ignore in the project.
# Changes to ignored resources are not added to the history and
# VCSs. Also they are not returned in `Project.get_files()`.
# Note that ``?`` and ``*`` match all characters but slashes.
# '*.pyc': matches 'test.pyc' and 'pkg/test.pyc'
# 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc'
# '.svn': matches 'pkg/.svn' and all of its children
# 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o'
# 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o'
prefs['ignored_resources'] = ['*.pyc', '*~', '.ropeproject',
'.hg', '.svn', '_svn', '.git', '.tox']

# Specifies which files should be considered python files. It is
# useful when you have scripts inside your project. Only files
# ending with ``.py`` are considered to be python files by
# default.
#prefs['python_files'] = ['*.py']

# Custom source folders: By default rope searches the project
# for finding source folders (folders that should be searched
# for finding modules). You can add paths to that list. Note
# that rope guesses project source folders correctly most of the
# time; use this if you have any problems.
# The folders should be relative to project root and use '/' for
# separating folders regardless of the platform rope is running on.
# 'src/my_source_folder' for instance.
#prefs.add('source_folders', 'src')

# You can extend python path for looking up modules
#prefs.add('python_path', '~/python/')

# Should rope save object information or not.
prefs['save_objectdb'] = True
prefs['compress_objectdb'] = False

# If `True`, rope analyzes each module when it is being saved.
prefs['automatic_soa'] = True
# The depth of calls to follow in static object analysis
prefs['soa_followed_calls'] = 0

# If `False` when running modules or unit tests "dynamic object
# analysis" is turned off. This makes them much faster.
prefs['perform_doa'] = True

# Rope can check the validity of its object DB when running.
prefs['validate_objectdb'] = True

# How many undos to hold?
prefs['max_history_items'] = 32

# Shows whether to save history across sessions.
prefs['save_history'] = True
prefs['compress_history'] = False

# Set the number spaces used for indenting. According to
# :PEP:`8`, it is best to use 4 spaces. Since most of rope's
# unit-tests use 4 spaces it is more reliable, too.
prefs['indent_size'] = 4

# Builtin and c-extension modules that are allowed to be imported
# and inspected by rope.
prefs['extension_modules'] = []

# Add all standard c-extensions to extension_modules list.
prefs['import_dynload_stdmods'] = True

# If `True` modules with syntax errors are considered to be empty.
# The default value is `False`; When `False` syntax errors raise
# `rope.base.exceptions.ModuleSyntaxError` exception.
prefs['ignore_syntax_errors'] = False

# If `True`, rope ignores unresolvable imports. Otherwise, they
# appear in the importing namespace.
prefs['ignore_bad_imports'] = False

# If `True`, rope will insert new module imports as
# `from <package> import <module>` by default.
prefs['prefer_module_from_imports'] = False

# If `True`, rope will transform a comma list of imports into
# multiple separate import statements when organizing
# imports.
prefs['split_imports'] = False

# If `True`, rope will remove all top-level import statements and
# reinsert them at the top of the module when making changes.
prefs['pull_imports_to_top'] = True

# If `True`, rope will sort imports alphabetically by module name instead of
# alphabetically by import statement, with from imports after normal
# imports.
prefs['sort_imports_alphabetically'] = False

# Location of implementation of rope.base.oi.type_hinting.interfaces.ITypeHintingFactory
# In general case, you don't have to change this value, unless you're an rope expert.
# Change this value to inject you own implementations of interfaces
# listed in module rope.base.oi.type_hinting.providers.interfaces
# For example, you can add you own providers for Django Models, or disable the search
# type-hinting in a class hierarchy, etc.
prefs['type_hinting_factory'] = 'rope.base.oi.type_hinting.factory.default_type_hinting_factory'


def project_opened(project):
"""This function is called after opening the project"""
# Do whatever you like here!
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include bioconda_utils/bioconda_startup.sh
include bioconda_utils/bioconda_utils-requirements.txt
include bioconda_utils/bioconda_utils-conda_build_config.yaml
include bioconda_utils/config.schema.yaml
include bioconda_utils/channel_order.txt
include bioconda_utils/templates/*
Expand Down
14 changes: 14 additions & 0 deletions bioconda_utils/bioconda_utils-conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Additional bioconda-specific pinnings to use in addition to those specified
# in
# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/master/recipe/conda_build_config.yaml

pin_run_as_build:
htslib:
max_pin: x.x
bamtools:
max_pin: x.x.x

htslib:
- 1.7
bamtools:
- 2.4.1
8 changes: 5 additions & 3 deletions bioconda_utils/bioconda_utils-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
anaconda-client=1.6.*
argh=0.26.*
beautifulsoup4=4.6.*
conda=4.3.33
conda-build=2.1.18
galaxy-lib>=18.5.5,<18.6.0a0
conda=4.5.4
conda-build=3.10.3
galaxy-lib>=18.5.5
jinja2=2.10.*
jsonschema=2.6.*
networkx=1.11
Expand All @@ -21,3 +21,5 @@ colorlog=3.1.*
six=1.11.*
alabaster=0.7.*
git=2.14.*
conda-forge-pinning=2018.05.22
python>=3.6
74 changes: 51 additions & 23 deletions bioconda_utils/bioconductor_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
"grid", "methods", "parallel", "splines", "stats", "stats4",
"tcltk", "tools", "utils"]


# A list of packages, in recipe name format. If a package depends on something
# in this list, then we will add the gcc/llvm build-deps as appropriate to the
# constructed recipe.
GCC_PACKAGES = ['r-rcpp']

HERE = os.path.abspath(os.path.dirname(__file__))


Expand Down Expand Up @@ -594,12 +588,43 @@ def dependencies(self):
else:
dependency_mapping[prefix + name.lower() + version] = name

if (
(prefix + name.lower() in GCC_PACKAGES) or
(self.description.get('needscompilation', 'no') == 'yes') or
(self.description.get('linkingto', None) is not None)
):
self.depends_on_gcc = True
if (
(self.description.get('needscompilation', 'no') == 'yes') or
(self.description.get('linkingto', None) is not None)
):
# Modified from conda_build.skeletons.cran
#
with tarfile.open(self.cached_tarball) as tf:
need_f = any([f.name.lower().endswith(('.f', '.f90', '.f77')) for f in tf])
need_c = True if need_f else \
any([f.name.lower().endswith('.c') for f in tf])
need_cxx = any([f.name.lower().endswith(('.cxx', '.cpp', '.cc', '.c++'))
for f in tf])
need_autotools = any([f.name.lower().endswith('/configure') for f in tf])
need_make = True if any((need_autotools, need_f, need_cxx, need_c)) else \
any([f.name.lower().endswith(('/makefile', '/makevars'))
for f in tf])
else:
need_c = need_cxx = need_f = need_autotools = need_make = False

for name, version in sorted(versions.items()):
if name in ['Rcpp', 'RcppArmadillo']:
need_cxx = True

if need_cxx:
need_c = True

self._cb3_build_reqs = {}
if need_c:
self._cb3_build_reqs['c'] = "{{ compiler('c') }}"
if need_cxx:
self._cb3_build_reqs['cxx'] = "{{ compiler('cxx') }}"
if need_f:
self._cb3_build_reqs['fortran'] = "{{ compiler('fortran') }}"
if need_autotools:
self._cb3_build_reqs['automake'] = 'automake'
if need_make:
self._cb3_build_reqs['make'] = 'make'

# Add R itself
if not specific_r_version:
Expand Down Expand Up @@ -721,7 +746,7 @@ def sub_placeholders(x):
# object and tries to make a shortcut, causing an error in
# decoding unicode. Possible pyaml bug? Anyway, this fixes
# it.
('build', DEPENDENCIES[:]),
('host', DEPENDENCIES[:]),
('run', DEPENDENCIES[:] + additional_run_deps),
)),
),
Expand All @@ -740,21 +765,25 @@ def sub_placeholders(x):
)),
),
))
if self.depends_on_gcc:
d['requirements']['build'].append('GCC_PLACEHOLDER')
d['requirements']['build'].append('LLVM_PLACEHOLDER')

if self._cb3_build_reqs:
d['requirements']['build'] = []
for k, v in self._cb3_build_reqs.items():
d['requirements']['build'].append(k + '_' + "PLACEHOLDER")

rendered = pyaml.dumps(d, width=1e6).decode('utf-8')
rendered = rendered.replace('GCC_PLACEHOLDER', 'gcc # [linux]')
rendered = rendered.replace('LLVM_PLACEHOLDER', 'llvm # [osx]')
rendered = (
'{% set version = "' + self.version + '" %}\n' +
'{% set name = "' + self.package + '" %}\n' +
'{% set bioc = "' + self.bioc_version + '" %}\n\n' +
rendered
)
tmp = tempfile.NamedTemporaryFile(delete=False).name
with open(tmp, 'w') as fout:

for k, v in self._cb3_build_reqs.items():
rendered = rendered.replace(k + '_' + "PLACEHOLDER", v)

tmpdir = tempfile.mkdtemp()
with open(os.path.join(tmpdir, 'meta.yaml'), 'w') as fout:
fout.write(rendered)
return fout.name

Expand Down Expand Up @@ -856,7 +885,6 @@ def write_recipe(package, recipe_dir, config, force=False, bioc_version=None,
`seen_dependencies`. Only has an effect if `recursive=True`.
"""
config = utils.load_config(config)
env = list(utils.EnvMatrix(config['env_matrix']))[0]
proj = BioCProjectPage(package, bioc_version, pkg_version)
logger.info('Making recipe for: {}'.format(package))

Expand Down Expand Up @@ -895,8 +923,8 @@ def write_recipe(package, recipe_dir, config, force=False, bioc_version=None,
# *has* changed, then bump the version number.
meta_file = os.path.join(recipe_dir, 'meta.yaml')
if os.path.exists(meta_file):
updated_meta = utils.load_meta(proj.meta_yaml, env)
current_meta = utils.load_meta(meta_file, env)
updated_meta = utils.load_first_metadata(proj.meta_yaml).meta
current_meta = utils.load_first_metadata(meta_file).meta

# pop off the version and build numbers so we can compare the rest of
# the dicts
Expand Down
Loading