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 #2

Merged
merged 1 commit into from
Sep 19, 2017
Merged
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
71 changes: 71 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
version: 2

jobs:
build:
docker:
- image: ubuntu:14.04
working_directory: ~/circulate
steps:
- checkout
- run:
name: Install Python Pip JDK
command: |
apt-get update && apt-get install -y python python-pip python-dev software-properties-common git
add-apt-repository -y ppa:openjdk-r/ppa
apt-get update && apt-get install -y openjdk-8-jdk
export JDK_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- run:
name: Private Pypi Config Setup
command: |
echo "[distutils]" >> ~/.pypirc
echo "index-servers = pypi-private" >> ~/.pypirc
echo "[pypi-private]" >> ~/.pypirc
echo "repository=$PYPI_HOST" >> ~/.pypirc
echo "username=$PYPI_USERNAME" >> ~/.pypirc
echo "password=$PYPI_PASSWORD" >> ~/.pypirc
- run:
name: Pre-install Virtual Env
command: |
pip install virtualenv
virtualenv venv
- restore_cache:
key: deps2.7-{{ .Branch }}-{{ checksum "requirements.txt" }}
- run:
name: Install Dependencies
command: |
. venv/bin/activate
export JDK_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
pip install -U pip wheel setuptools
pip install cython
pip install coveralls
pip install -r requirements.txt --extra-index-url $PYPI_HOST
- save_cache:
key: deps2.7-{{ .Branch }}-{{ checksum "requirements.txt" }}
paths:
- "venv"
- run:
name: Test
command: |
. venv/bin/activate
export JDK_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
coverage run --source=. -m unittest discover -v
coverage report
COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN coveralls --verbose
- run:
name: Push To Private Pypi Server
command: |
. venv/bin/activate
python setup.py bdist_wheel upload -r $PYPI_HOST
python setup.py sdist upload -r $PYPI_HOST
- store_artifacts:
path: test-reports/
destination: tr1

workflows:
version: 2
build-and-deploy:
jobs:
- build
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ python:
- "2.7"
install:
- pip install -U pip wheel setuptools
- pip install cython
- pip install -r requirements.txt
- pip install .
- pip install coveralls
- pip install coveralls --quiet
- pip install cython --quiet
- pip install -r requirements.txt --extra-index-url $PYPI_HOST --quiet

script: coverage run --source=. -m unittest discover -v

after_success:
coveralls
coveralls
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
recursive-include emoint/resources/ *
recursive-include emoint/resources/*
include README.md
include requirements.txt
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
--extra-index-url https://seernet-pypi.herokuapp.com/
--extra-index-url $PYPI_HOST
Cython
xgboost
sklearn
pandas
scipy
numpy
jnius
pyjnius
tweetokenize
nltk
nltk
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from setuptools import setup, find_packages
from codecs import open
from os import path
from pip.req import parse_requirements

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

install_reqs = parse_requirements('requirements.txt', session='session')
reqs = [str(ir.req) for ir in install_reqs]

setup(
name='EmoInt',
version='0.1.0',
Expand All @@ -27,11 +31,8 @@
keywords='sentiment emotion affective computing machine learning',
packages=find_packages(),
setup_requires=[
# Setuptools 18.0 properly handles Cython extensions.
'setuptools>=18.0',
'cython',
],
install_requires=[],
install_requires=reqs,
extras_require={},
package_data={
'emoint': ['resources/*', 'resources/NRC-Hashtag-Sentiment-Lexicon-v0.1/*', 'resources/SentiStrength/*',
Expand Down