Skip to content

Commit 71dfab2

Browse files
authored
Merge pull request #136 from splitio/development
Development
2 parents e68b84d + cd2f4b2 commit 71dfab2

File tree

162 files changed

+13636
-19780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+13636
-19780
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* Bullet 2
99

1010
## How to test new changes?
11-
*
11+
* python setup.py test to test everythin
12+
* pytest <SPECIFIC_FILE> to test a file in particular (requires pytest, pytest-cov & pytest-mock to be installed)
1213

1314
## Extra Notes
1415
* Bullet 1

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ language: python
22

33
python:
44
- "2.7"
5+
- "3.6"
56

67
services:
78
- redis-server
89

910
install:
10-
- pip install --upgrade setuptools
11-
- pip install redis>=2.6
12-
- pip install jsonpickle>=0.9.3
13-
- pip install uwsgi>=2.0.0
11+
- pip install -U setuptools pip
12+
- pip install -e .[cpphash,redis,uwsgi]
1413

1514
script:
16-
- python setup.py nosetests
15+
- python setup.py test

CHANGES.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
8.0.0 (Apr 24, 2019)
2+
- Full SDK Refactor/rewrite.
3+
- New block until ready behaviour.
4+
- Support for async destroy.
5+
- Dynamic configs.
6+
- Impressions not flushing on destroy bugfix.
7+
- Removed unnecessary dependencies.
8+
- Test suite rewritten.
19
7.0.1 (Mar 8, 2019)
210
- Updated Splits refreshing rate.
311
- Replaced exception log level to error level.

setup.cfg

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ description-file = README.md
88
max-line-length=100
99
exclude=tests/*
1010

11-
[nosetests]
12-
verbosity=1
13-
detailed-errors=1
14-
with-coverage=1
15-
cover-package=splitio
16-
debug=nose.loader
11+
[aliases]
12+
test=pytest
13+
14+
[tool:pytest]
15+
ignore_glob=./splitio/_OLD/*
16+
addopts = --cov=splitio --verbose
17+
python_classes=*Tests
1718

1819
[build_sphinx]
1920
source-dir = doc/source
2021
build-dir = doc/build
2122
all_files = 1
2223

2324
[upload_sphinx]
24-
upload-dir = doc/build/html
25+
upload-dir = doc/build/html

setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
"""Setup module."""
12
#!/usr/bin/env python
23

3-
from setuptools import setup
4+
from setuptools import setup, find_packages
45
from os import path
56
from sys import version_info
67

7-
tests_require = ['flake8', 'nose', 'coverage']
8+
tests_require = ['flake8', 'pytest', 'pytest-mock', 'coverage', 'pytest-cov']
89
install_requires = [
9-
'arrow>=0.7.0',
1010
'requests>=2.9.1',
11+
'pyyaml>=5.1',
1112
'future>=0.15.2',
1213
'docopt>=0.6.2',
1314
]
@@ -33,11 +34,11 @@
3334
tests_require=tests_require,
3435
extras_require={
3536
'test': tests_require,
36-
'redis': ['redis>=2.10.5', 'jsonpickle>=0.9.3'],
37-
'uwsgi': ['uwsgi>=2.0.0', 'jsonpickle>=0.9.3'],
37+
'redis': ['redis>=2.10.5'],
38+
'uwsgi': ['uwsgi>=2.0.0'],
3839
'cpphash': ['mmh3cffi>=0.1.4']
3940
},
40-
setup_requires=['nose'],
41+
setup_requires=['pytest-runner'],
4142
classifiers=[
4243
'Development Status :: 3 - Alpha',
4344
'Environment :: Console',
@@ -47,4 +48,4 @@
4748
'Programming Language :: Python :: 3',
4849
'Topic :: Software Development :: Libraries'
4950
],
50-
packages=['splitio', 'splitio.update_scripts', 'splitio.bin', 'splitio.hashfns'])
51+
packages=find_packages())

splitio/__init__.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,6 @@
11
from __future__ import absolute_import, division, print_function, \
22
unicode_literals
33

4-
from .factories import get_factory # noqa
5-
from .key import Key # noqa
6-
from .version import __version__ # noqa
7-
8-
__all__ = ('api', 'brokers', 'cache', 'clients', 'matchers', 'segments',
9-
'settings', 'splits', 'splitters', 'transformers', 'treatments',
10-
'version', 'factories', 'manager')
11-
12-
13-
# Functions defined to maintain compatibility with previous sdk versions.
14-
# ======================================================================
15-
#
16-
# This functions are not supposed to be used directly, factory method should be
17-
# called instead, but since they were previously exposed, they're re-added here
18-
# as helper function so that if someone was using we don't break their code.
19-
20-
def get_client(apikey, **kwargs):
21-
from .clients import Client
22-
from .brokers import get_self_refreshing_broker
23-
broker = get_self_refreshing_broker(apikey, **kwargs)
24-
return Client(broker)
25-
26-
27-
def get_redis_client(apikey, **kwargs):
28-
from .clients import Client
29-
from .brokers import get_redis_broker
30-
broker = get_redis_broker(apikey, **kwargs)
31-
return Client(broker)
4+
from splitio.client.factory import get_factory
5+
from splitio.client.key import Key
6+
from splitio.version import __version__

0 commit comments

Comments
 (0)