diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..29758fb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,56 @@ +version: 2 +jobs: + test: + docker: + - image: python:3.5 + working_directory: ~/python-client + steps: + - checkout + + - run: + command: pip install --upgrade pip tox + + - run: + command: | + tox -e lint + tox -e py35 + + pypi_upload: + docker: + - image: circleci/python:3.5 + steps: + - run: + command: tox -e build_pypi + + pypi_upload_rc: + docker: + - image: circleci/python:3.5 + steps: + - run: + command: tox -e build_testpypi + +workflows: + version: 2 + test: + jobs: + - test + pypi_upload: + jobs: + - pypi_upload: + requires: + - test + filters: + tags: + only: + - /^[0-9]+.[0-9]+.[0-9]+$/ + + - pypi_upload_rc: + requires: + - test + filters: + tags: + only: + - /^[0-9]+.[0-9]+.[0-9]+-rc[0-9]+$/ + + + \ No newline at end of file diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 1a85f0d..0000000 --- a/circle.yml +++ /dev/null @@ -1,31 +0,0 @@ -machine: - environment: - COVERALLS_REPO_TOKEN: CUTHCbRbNtBjLFtFG4NSxVeIf1qQN3Zjo - - python: - version: 3.5.0 - -dependencies: - override: - - pip install -r requirements/dev.txt - - pip install tox-pyenv codecov coveralls twine - - pyenv local 2.7.10 3.5.0 - -test: - override: - - tox - - post: - - codecov - - coveralls - -deployment: - release: - tag: /^[0-9]+.[0-9]+.[0-9]+$/ - commands: - - tox -e build_pypi - - releaseCandidate: - tag: /^[0-9]+.[0-9]+.[0-9]+-rc[0-9]+$/ - commands: - - tox -e build_testpypi diff --git a/objectrocket/instances/mongodb.py b/objectrocket/instances/mongodb.py index f0d253a..ebbc17c 100644 --- a/objectrocket/instances/mongodb.py +++ b/objectrocket/instances/mongodb.py @@ -195,7 +195,7 @@ def _compile_new_relic_stats(self, stats_this_second, stats_next_second): first_doc = stats_this_second['aggregate_server_statistics'][subdoc] second_doc = stats_next_second['aggregate_server_statistics'][subdoc] keys = set(first_doc.keys()) | set(second_doc.keys()) - server_statistics_per_second[subdoc] = {key: int(second_doc[key]) - int(first_doc[key]) for key in keys} + server_statistics_per_second[subdoc] = {key: int(second_doc[key]) - int(first_doc[key]) for key in keys if isinstance(first_doc[key], int)} for node1, node2 in zip(stats_this_second['opcounters_per_node'], stats_next_second['opcounters_per_node']): node_opcounters_per_second = {} for repl, members in node2.items(): diff --git a/requirements/dev.txt b/requirements/dev.txt index a4f3ca1..1a78b3b 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,7 +4,7 @@ flake8>=2.1.0 mock>=1.0.1 pytest>=2.5.2 pytest-cov>=1.7.0 -setuptools>=2.1 +setuptools==40.2.0 sphinx_rtd_theme tox>=2.1 wheel>=0.22.0 diff --git a/setup.py b/setup.py index 063f279..567acbf 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import find_packages from setuptools import setup -VERSION = ('0', '4', '9') +VERSION = ('0', '4', '10') __version__ = '.'.join(VERSION) with open('README.md') as f: