Skip to content
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
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
SHELL := /bin/bash
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PROJECT_NAME = UnleashClient

#-----------------------------------------------------------------------
# Rules of Rules : Grouped rules that _doathing_
#-----------------------------------------------------------------------
test: lint pytest

build: clean generate-requirements build-package upload
precommit: clean generate-requirements

build: clean build-package upload

build-local: clean build-package

#-----------------------------------------------------------------------
# Testing & Linting
#-----------------------------------------------------------------------
lint:
pylint ${PROJECT_NAME} && \
mypy ${PROJECT_NAME};

pytest:
export PYTHONPATH=${ROOT_DIR}: $$PYTHONPATH && \
py.test --cov ${PROJECT_NAME} tests/unit_tests

build-local: clean generate-requirements build-package

#-----------------------------------------------------------------------
# Rules
Expand Down
8 changes: 4 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ verify_ssl = true
name = "pypi"

[packages]
requests = "==2.19.1"
fcache = "==0.4.7"
mmh3 = "==2.5.1"
apscheduler = "==3.5.3"
requests = "*"
fcache = "*"
mmh3 = "*"
apscheduler = "*"

[dev-packages]
mimesis = "*"
Expand Down
214 changes: 57 additions & 157 deletions Pipfile.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# unleash-client-python

[![CircleCI](https://circleci.com/gh/ivanklee86/unleash-client-python.svg?style=svg)](https://circleci.com/gh/ivanklee86/unleash-client-python) [![Coverage Status](https://coveralls.io/repos/github/ivanklee86/unleash-client-python/badge.svg?branch=il%2FI-8_releaseprep)](https://coveralls.io/github/ivanklee86/unleash-client-python?branch=il%2FI-8_releaseprep) [![Maintainability](https://api.codeclimate.com/v1/badges/68f61648a29051aa6c36/maintainability)](https://codeclimate.com/github/ivanklee86/unleash-client-python/maintainability) [![PyPI version](https://badge.fury.io/py/UnleashClient.svg)](https://badge.fury.io/py/UnleashClient) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CircleCI](https://circleci.com/gh/Unleash/unleash-client-python.svg?style=svg)](https://circleci.com/gh/Unleash/unleash-client-python) [![Coverage Status](https://coveralls.io/repos/github/Unleash/unleash-client-python/badge.svg?branch=master)](https://coveralls.io/github/Unleash/unleash-client-python?branch=master) [![PyPI version](https://badge.fury.io/py/UnleashClient.svg)](https://badge.fury.io/py/UnleashClient) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


This is a Python client for [Unleash](https://github.com/unleash/unleash). It implements [Client Specifications 1.0](https://github.com/Unleash/unleash/blob/master/docs/client-specification.md) and checks compliance based on spec in [unleash/client-specifications](https://github.com/Unleash/client-specification)
This is the Python client for [Unleash](https://github.com/unleash/unleash). It implements [Client Specifications 1.0](https://github.com/Unleash/unleash/blob/master/docs/client-specification.md) and checks compliance based on spec in [unleash/client-specifications](https://github.com/Unleash/client-specification)

What it supports:
* Default activation strategies using 32-bit [Murmerhash3](https://en.wikipedia.org/wiki/MurmurHash)
Expand All @@ -13,7 +13,7 @@ What it supports:
* Client periodically fetches feature toggles and stores to on-disk cache
* Client periodically sends metrics to Unleash Server

Check out the project documentation [here](https://ivanklee86.github.io/unleash-client-python/).
Check out the project documentation [here](https://unleash.github.io/unleash-client-python/).

## Installation

Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v1.0.2

General
* unleash-client-python has moved under the general Unleash project!

## v1.0.0
**General**
* Implemented custom strategies.
Expand Down
16 changes: 7 additions & 9 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ Here's just some random notes on the development process.

## Setup
1. `pip install pipenv`
1. `pipenv install --dev`
2. `pipenv --python 3.7`
3. `pipenv install --dev`


## Testing
1. Run tests: `pipenv run test`
1. Run pylint: `pylint UnleashClient`
1. Run mypy: `mypy UnleashCLient`

It's good to run static analysis locally, otherwise CI build will fail!
1. Activate your pipenv: `pipenv shell`
1. Run linting & tests: `make test`

## Release
Land all your PRs. :)
1. Update changelog.md
1. `mkdocs gh-deploy`
1. `bumpversion [major/minor/patch]`
1. `make build`
2. `mkdocs gh-deploy`
3. `bumpversion [major/minor/patch]`
4. `make build`
52 changes: 24 additions & 28 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,63 +1,59 @@
-i https://pypi.org/simple
apipkg==1.5; python_version >= '2.7'
apipkg==1.5
astroid==2.0.4
atomicwrites==1.2.1; python_version != '3.3.*'
atomicwrites==1.2.1
attrs==18.2.0
bleach==3.0.2
bumpversion==0.5.3
certifi==2018.8.24
cffi==1.11.5; python_version != '3.3.*'
certifi==2018.10.15
chardet==3.0.4
click==7.0; python_version >= '2.7'
cmarkgfm==0.4.2; python_version != '3.0.*'
cookies==2.2.1
coverage==4.5.1; python_version != '3.1.*'
click==7.0
coverage==4.5.1
coveralls==1.5.1
docopt==0.6.2
docutils==0.14
execnet==1.5.0; python_version >= '2.7'
flake8==3.5.0
future==0.16.0
execnet==1.5.0
flake8==3.6.0
future==0.17.0
idna==2.7
isort==4.3.4; python_version >= '2.7'
isort==4.3.4
jinja2==2.10
lazy-object-proxy==1.3.1
livereload==2.5.2
markdown==3.0.1; python_version >= '2.7'
markdown==3.0.1
markupsafe==1.0
mccabe==0.6.1
mimesis==2.1.0
mkdocs==1.0.4
more-itertools==4.3.0
mypy-extensions==0.4.1
mypy==0.630
mypy==0.641
pkginfo==1.4.2
pluggy==0.7.1; python_version >= '2.7'
py==1.6.0; python_version != '3.1.*'
pycodestyle==2.3.1
pycparser==2.19; python_version != '3.3.*'
pyflakes==1.6.0
pluggy==0.8.0
py==1.7.0
pycodestyle==2.4.0
pyflakes==2.0.0
pygments==2.2.0
pylint==2.1.1
pytest-cov==2.6.0
pytest-flake8==1.0.2
pytest-forked==0.2; python_version >= '2.7'
pytest-forked==0.2
pytest-html==1.19.0
pytest-metadata==1.7.0; python_version >= '2.7'
pytest-metadata==1.7.0
pytest-rerunfailures==4.2
pytest-runner==4.2
pytest-xdist==1.23.2
pytest==3.8.2
pytest==3.9.2
pyyaml==3.13
readme-renderer==22.0; python_version != '3.0.*'
readme-renderer==23.0
requests-toolbelt==0.8.0
requests==2.19.1
responses==0.9.0
requests==2.20.0
responses==0.10.2
six==1.11.0
tornado==5.1.1; python_version >= '2.7'
tqdm==4.26.0; python_version != '3.0.*'
tornado==5.1.1
tqdm==4.28.1
twine==1.12.1
typed-ast==1.1.0
urllib3==1.23; python_version != '3.3.*'
urllib3==1.24
webencodings==0.5.1
wrapt==1.10.11
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-i https://pypi.org/simple
appdirs==1.4.3
apscheduler==3.5.3
certifi==2018.8.24
certifi==2018.10.15
chardet==3.0.4
fcache==0.4.7
idna==2.7
mmh3==2.5.1
pytz==2018.5
requests==2.19.1
pytz==2018.6
requests==2.20.0
six==1.11.0
tzlocal==1.5.1
urllib3==1.23; python_version != '3.3.*'
urllib3==1.24
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def readme():
description='Python client for the Unleash feature toggle system!',
long_description=readme(),
long_description_content_type="text/markdown",
url='https://github.com/ivanklee86/unleash-client-python',
url='https://github.com/Unleash/unleash-client-python',
packages=find_packages(),
install_requires=["requests==2.19.1",
install_requires=["requests==2.20.0",
"fcache==0.4.7",
"mmh3==2.5.1",
"apscheduler==3.5.3"],
Expand Down