Skip to content

Commit

Permalink
Merge pull request #37 from sansible/GITHUB-19-merge-to-original
Browse files Browse the repository at this point in the history
Updates to work with the latest NR changes
  • Loading branch information
travistruett authored Apr 2, 2019
2 parents 37be56b + f05072f commit 6eac5dd
Show file tree
Hide file tree
Showing 22 changed files with 2,637 additions and 331 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4

[*.py]
indent_style = space
indent_size = 4
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ htmlcov/

# Python egg metadata, regenerated from source files by setuptools.
/*.egg-info
/*.egg
/*.eggs

# Virtualenv
env/
venv/
.venv/

# OSX
.DS_Store
Expand Down
23 changes: 15 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
sudo: false
---

sudo: required
dist: xenial

language: python
python:
- '2.7'
- '3.3'
- '3.4'
install:
- pip install coveralls nose flake8
- python setup.py install
- '3.6'
- '3.7'

branches:
only:
- develop
- master

script:
- flake8 .
- python setup.py nosetests
- make test

after_success:
coveralls
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
PATH := $(PWD)/.venv/bin:$(shell printenv PATH)
SHELL := env PATH=$(PATH) /bin/bash
VENV_DIR=.venv

.PHONY: clean
## Destroy docker instances, remove virtualenv, molecule temp, .pyc files
clean:
rm -rf .venv

.PHONY: deps
## Create virtualenv, install dependencies
deps:
test -d ${VENV_DIR} || virtualenv ${VENV_DIR}
${VENV_DIR}/bin/pip install -r requirements/main.txt
virtualenv --relocatable ${VENV_DIR}
python setup.py install

.PHONY: help
help:
@awk -v skip=1 \
'/^##/ { sub(/^[#[:blank:]]*/, "", $$0); doc_h=$$0; doc=""; skip=0; next } \
skip { next } \
/^#/ { doc=doc "\n" substr($$0, 2); next } \
/:/ { sub(/:.*/, "", $$0); \
printf "\033[34m%-30s\033[0m\033[1m%s\033[0m %s\n\n", $$0, doc_h, doc; skip=1 }' \
$(MAKEFILE_LIST)

.PHONY: test
## Run tests
test: deps
flake8 newrelic_api
python setup.py nosetests
4 changes: 4 additions & 0 deletions newrelic_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
from .version import __version__

from .alert_policies import AlertPolicies
from .alert_conditions import AlertConditions
from .alert_conditions_infra import AlertConditionsInfra
from .alert_conditions_nrql import AlertConditionsNRQL
from .applications import Applications
from .application_hosts import ApplicationHosts
from .application_instances import ApplicationInstances
from .components import Components
from .dashboards import Dashboards
from .key_transactions import KeyTransactions
from .notification_channels import NotificationChannels
from .plugins import Plugins
Expand Down
Loading

0 comments on commit 6eac5dd

Please sign in to comment.