Skip to content

Commit 5403bc8

Browse files
authored
Added v0.1.5 (#4)
* Added fix as per #3 * Configured circleci for building and publishing * Added v0.1.5
1 parent 23213e5 commit 5403bc8

File tree

5 files changed

+98
-4
lines changed

5 files changed

+98
-4
lines changed

.circleci/config.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Defined anchors for re-usable components
2+
references:
3+
restore_cache: &restore_cache
4+
restore_cache:
5+
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
6+
install_dependencies: &install_dependencies
7+
run:
8+
name: Install Python deps in a venv
9+
command: |
10+
python3 -m venv venv
11+
. venv/bin/activate
12+
python3 -m pip install --upgrade pip
13+
pip install -r requirements.txt
14+
pip install setuptools wheel twine
15+
save_cache: &save_cache
16+
save_cache:
17+
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
18+
paths:
19+
- "venv"
20+
run_unittests: &run_unittests
21+
run:
22+
name: Run unittests
23+
command: |
24+
. venv/bin/activate
25+
python3 -m unittest discover
26+
init_pypirc: &init_pypirc
27+
run:
28+
name: init .pypirc
29+
command: |
30+
echo -e "[pypi]" >> ~/.pypirc
31+
echo -e "username = __token__" >> ~/.pypirc
32+
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
33+
build_publish: &build_publish
34+
run:
35+
name: Build and publish
36+
command: |
37+
. venv/bin/activate
38+
python3 setup.py sdist bdist_wheel
39+
python3 -m twine upload dist/*
40+
41+
42+
# Actual jobs
43+
version: 2
44+
jobs:
45+
test_all:
46+
working_directory: ~/pycorr
47+
docker:
48+
- image: circleci/python:3.7.1-stretch
49+
steps:
50+
- checkout
51+
- <<: *restore_cache
52+
- <<: *install_dependencies
53+
- <<: *save_cache
54+
- <<: *run_unittests
55+
56+
pypi_publish:
57+
working_directory: ~/pycorr
58+
docker:
59+
- image: circleci/python:3.7.1-stretch
60+
steps:
61+
- checkout
62+
- <<: *restore_cache
63+
- <<: *install_dependencies
64+
- <<: *save_cache
65+
- <<: *run_unittests
66+
- <<: *init_pypirc
67+
- <<: *build_publish
68+
69+
# defined workflows
70+
workflows:
71+
version: 2
72+
test_dev:
73+
jobs:
74+
- test_all:
75+
filters:
76+
branches:
77+
only:
78+
- develop
79+
publish_master:
80+
jobs:
81+
- pypi_publish:
82+
filters:
83+
branches:
84+
only:
85+
- master
86+
87+
88+
89+

setup.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
# -*- coding: utf-8 -*-
22

3-
from os import path
3+
4+
import os
5+
import sys
46

57
from pip._internal.req import parse_requirements
68
from setuptools import find_packages, setup
9+
from setuptools.command.install import install
10+
11+
VERSION = "0.1.5"
712

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

1217
setup(
1318
name="pycorr",
14-
version="0.1.4",
19+
version=VERSION,
1520
description="Python package for calculating correlation amongst categorical variables",
1621
long_description_content_type="text/markdown",
1722
long_description=long_description,
File renamed without changes.

test/__init__.py

Whitespace-only changes.
File renamed without changes.

0 commit comments

Comments
 (0)