theochem / cgrid

C++ version of horton (2.x) grid functionality
GNU General Public License v3.0
4 stars 1 forks source link

conda for both builds #14

Closed matt-chan closed 7 years ago

codecov[bot] commented 7 years ago

Codecov Report

Merging #14 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #14   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines           3      3           
=====================================
  Hits            3      3

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aa62576...f77e42b. Read the comment docs.

matt-chan commented 7 years ago

There's a significant downside to using conda builds for everything. Conda build takes 5min vs 2.5m for an in-place build.

The in-place build is uglier because you have to fiddle with environmental variables and its tied to the project structure (the LD_LIBRARY_PATH is assumed to be in ../debug/${PROJECT_NAME}), but I think it might be better to use it anyways? You can iterate development twice as fast.

@tovrstra should we kill this PR?

tovrstra commented 7 years ago

I'm doing some more experiments and try to clean a few more things. Still, conda build is indeed slower than an in-place build. I guess that is mostly due to the installation of the build environment, which is done twice.

tovrstra commented 7 years ago

After thoroughly trying, it seems fairly hopeless to get this approach to work, let alone make it fast. Getting coverage with gcov to work on a package installed by conda requires so much wrangling, that an in-place build is becoming a more elegant solution.

This is bad news because we should try to mimic the conda build environment closely, e.g. picking up dependencies from the meta.yaml file, without actually installing it. This can be done as follows, not so clean but it should work:

conda render tools/conda.recipe > tools/conda.recipe/rendered.yaml
python -c "import yaml; f= open('tools/conda.recipe/rendered.yaml'); data = yaml.load(f); f.close(); deps = data['requirements']['build'] + data['requirements']['run']; print(' '.join(dep.split()[0] for dep in deps))" | xargs conda install --use-local