Skip to content

Commit

Permalink
Added v0.1.5 (#4)
Browse files Browse the repository at this point in the history
* Added fix as per #3 
* Configured circleci for building and publishing
*  Added v0.1.5
  • Loading branch information
anuragithub authored Sep 25, 2020
1 parent 23213e5 commit 5403bc8
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 4 deletions.
89 changes: 89 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Defined anchors for re-usable components
references:
restore_cache: &restore_cache
restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
install_dependencies: &install_dependencies
run:
name: Install Python deps in a venv
command: |
python3 -m venv venv
. venv/bin/activate
python3 -m pip install --upgrade pip
pip install -r requirements.txt
pip install setuptools wheel twine
save_cache: &save_cache
save_cache:
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
paths:
- "venv"
run_unittests: &run_unittests
run:
name: Run unittests
command: |
. venv/bin/activate
python3 -m unittest discover
init_pypirc: &init_pypirc
run:
name: init .pypirc
command: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
build_publish: &build_publish
run:
name: Build and publish
command: |
. venv/bin/activate
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
# Actual jobs
version: 2
jobs:
test_all:
working_directory: ~/pycorr
docker:
- image: circleci/python:3.7.1-stretch
steps:
- checkout
- <<: *restore_cache
- <<: *install_dependencies
- <<: *save_cache
- <<: *run_unittests

pypi_publish:
working_directory: ~/pycorr
docker:
- image: circleci/python:3.7.1-stretch
steps:
- checkout
- <<: *restore_cache
- <<: *install_dependencies
- <<: *save_cache
- <<: *run_unittests
- <<: *init_pypirc
- <<: *build_publish

# defined workflows
workflows:
version: 2
test_dev:
jobs:
- test_all:
filters:
branches:
only:
- develop
publish_master:
jobs:
- pypi_publish:
filters:
branches:
only:
- master




13 changes: 9 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
# -*- coding: utf-8 -*-

from os import path

import os
import sys

from pip._internal.req import parse_requirements
from setuptools import find_packages, setup
from setuptools.command.install import install

VERSION = "0.1.5"

this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()

setup(
name="pycorr",
version="0.1.4",
version=VERSION,
description="Python package for calculating correlation amongst categorical variables",
long_description_content_type="text/markdown",
long_description=long_description,
Expand Down
File renamed without changes.
Empty file added test/__init__.py
Empty file.
File renamed without changes.

0 comments on commit 5403bc8

Please sign in to comment.