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 CircleCI continuous integration #19

Merged
merged 2 commits into from
Dec 2, 2016
Merged

Conversation

dhimmel
Copy link
Member

@dhimmel dhimmel commented Dec 2, 2016

The goal of this PR is to have CircleCI automatically run the tests we're implementing in #4, #14, & #17.

@dhimmel
Copy link
Member Author

dhimmel commented Dec 2, 2016

@awm33 our builds are currently failing -- see https://circleci.com/gh/cognoma/cognoml. How do you suggest we proceed?

@dhimmel
Copy link
Member Author

dhimmel commented Dec 2, 2016

@jessept @vasudevanv -- you may also want to look at why our builds are failing. It may have something to do with our setup.py.

@jessept
Copy link
Collaborator

jessept commented Dec 2, 2016

@dhimmel @awm33 @vasudevanv it looks like the circleCI is trying to install using python 2.7. I'm guessing this is the default python. From circleCI site under setup.py:

python setup.py install
zip_safe flag not set; analyzing archive contents...
Installed /home/ubuntu/cognoml/.eggs/pytest_runner-2.9-py2.7.egg

@dhimmel
Copy link
Member Author

dhimmel commented Dec 2, 2016

So should we merge this PR to fix that?

@jessept
Copy link
Collaborator

jessept commented Dec 2, 2016

@dhimmel Yes, I will squash merge this PR. I am going to merge and anticipate seeing another issue for our testing but I want to see if it actually occurs.

@jessept jessept merged commit c1097b8 into cognoma:master Dec 2, 2016
@dhimmel
Copy link
Member Author

dhimmel commented Dec 2, 2016

Getting:

ImportError: No module named 'numpy'

Related to scikit-learn/scikit-learn#4164 (comment)?

@jessept
Copy link
Collaborator

jessept commented Dec 2, 2016

@dhimmel it looks like this is a longstanding issue with conflicting virtual environments.

I was able to replicate the issue on my local machine. I get the same missing numpy issue when I try to run python setup.py install:

File "/Users/jesseprestwood-taylor/miniconda3/lib/python3.5/site-packages/setuptools-20.3-py3.5.egg/setuptools/sandbox.py", line 46, in _execfile
File "/var/folders/gp/xqdgpt850dv9j1hy396f2rz00000gn/T/easy_install-6vtv4hbz/scipy-0.17.1/setup.py", line 265, in
File "/var/folders/gp/xqdgpt850dv9j1hy396f2rz00000gn/T/easy_install-6vtv4hbz/scipy-0.17.1/setup.py", line 253, in setup_package
ImportError: No module named 'numpy'

However, when I activate my virtual environment, I am able to install with no problem:
source activate cognoma-machine-learning
discarding /Users/jesseprestwood-taylor/miniconda3/bin from PATH
prepending /Users/jesseprestwood-taylor/miniconda3/envs/cognoma-machine-learning/bin to PATH
(cognoma-machine-learning)Jesses-MacBook-Air:cognoml jesseprestwood-taylor$ python setup.py install
...
Using /Users/jesseprestwood-taylor/miniconda3/envs/cognoma-machine-learning/lib/python3.5/site-packages
Finished processing dependencies for cognoml==0.1.0
(cognoma-machine-learning)Jesses-MacBook-Air:cognoml jesseprestwood-taylor

@jessept
Copy link
Collaborator

jessept commented Dec 2, 2016

@dhimmel yes it looks related to that. We may have to add numpy explicitly to the virtualenv setup.

@vasudevanv
Copy link
Member

I have had to do this in the past with CircleCI. I used a requirements.txt file with all the dependencies in the virtualenv setup. You will need to add the following to the circle.yml file

dependencies:
pre:
- pip install -r requirements.txt

@dhimmel
Copy link
Member Author

dhimmel commented Dec 2, 2016

@vasudevanv, nice. Want to submit that pull request to add:

dependencies: 
  pre: 
    - "pip install --requirement requirements.txt"

@vasudevanv
Copy link
Member

Sure. Will submit it shortly.

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.

3 participants