Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
32c7a50
Fixes: #80
punkrokk Jul 19, 2019
ec9b920
xray build
punkrokk Jul 19, 2019
b4600a3
upload tests to circleci
punkrokk Jul 20, 2019
2171cd9
upload tests to circleci
punkrokk Jul 20, 2019
90a0517
upload tests to circleci
punkrokk Jul 20, 2019
07f6bcb
upload tests to circleci
punkrokk Jul 20, 2019
a62256d
upload tests to circleci
punkrokk Jul 20, 2019
806e89e
upload tests to circleci
punkrokk Jul 20, 2019
c009016
upload tests to circleci
punkrokk Jul 20, 2019
cccc9ad
upload tests to circleci
punkrokk Jul 20, 2019
3f74cce
upload tests to circleci
punkrokk Jul 20, 2019
4eb1c8c
upload tests to circleci
punkrokk Jul 20, 2019
d9a010d
upload tests to circleci
punkrokk Jul 20, 2019
24d8ed2
upload tests to circleci
punkrokk Jul 20, 2019
c80aa6f
upload tests to circleci
punkrokk Jul 20, 2019
30d0761
upload tests to circleci
punkrokk Jul 20, 2019
b83c149
upload tests to circleci
punkrokk Jul 20, 2019
09fd71d
upload tests to circleci
punkrokk Jul 20, 2019
10b088b
upload tests to circleci
punkrokk Jul 20, 2019
1fb9f96
v1.6.0 assign user to alert, Fixes: #82
punkrokk Jul 23, 2019
cfa1147
fix .gitignore for coverage output
punkrokk Jul 23, 2019
1c05571
fix .gitignore for coverage output
punkrokk Jul 23, 2019
83f9a24
fix Pypi link
punkrokk Jul 23, 2019
b01436b
bump urllib to 1.24.3
punkrokk Jul 23, 2019
be3f84e
bump certifi
punkrokk Jul 23, 2019
5ef63ea
update readme
punkrokk Jul 23, 2019
2618d3b
Update examples/01_run_all_api_calls.py
punkrokk Jul 23, 2019
053bae3
update readme
punkrokk Jul 23, 2019
4ab8000
Merge branch '80/fix-create-incident' of https://github.com/Syncurity…
punkrokk Jul 23, 2019
9de66e8
pep8 formatting
punkrokk Jul 23, 2019
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
21 changes: 12 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2

jobs:
build:
working_directory: ~/irflow_sdk_python
# working_directory: ~/irflow_sdk_python
docker:
- image: circleci/python:3.6.5

Expand All @@ -15,7 +15,7 @@ jobs:
- run:
command: |
python3 -m venv venv
source venv/bin/activate
. venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install pytest pytest-cov awscli coverage codacy-coverage
Expand All @@ -28,13 +28,16 @@ jobs:
- run:
working_directory: tests
command: |
source ../venv/bin/activate
aws s3 cp s3://syncurity-ci/test_data.py .
py.test --cov-report xml --cov-config .coveragerc --cov ../
mkdir -p /tmp/artifacts
cp coverage.xml /tmp/artifacts/coverage.xml
source ../venv/bin/activate && \
aws s3 cp s3://syncurity-ci/test_data.py . && \
mkdir test-reports && \
pytest --junitxml=test-reports/junit.xml --cov-report xml --cov-config .coveragerc --cov && \
python-codacy-coverage -r coverage.xml
cp coverage.xml test-reports/coverage.xml


- store_test_results:
path: /tmp/artifacts/coverage.xml
path: tests/test-reports

- store_artifacts:
path: /tmp/artifacts
path: tests/test-reports
18 changes: 18 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[flake8]
max-line-length = 100
# L102 - apache license header
enable-extensions = L101,L102
ignore = E128,E402,E722,W504
exclude=*.egg/*,build,dist

# Configuration for flake8-copyright extension
copyright-check = True
copyright-min-file-size = 1

# Settings for flake8-license
license-type = apache

# NOTE: This requires flake8 >= 3.0.0 to work correctly.
# If old version is used (< 3.0.0), it will select all the errors and it wont ignore ones
# listed above as part of ignore list
select = E,F,W,C,L
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,8 @@ Temporary Items
.irflow_integrationsrc
/.irf_integrations.rc

# Coverage output
.coverage
tests/.coverage
tests/coverage.xml

31 changes: 31 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[MESSAGES CONTROL]
# C0111 Missing docstring
# I0011 Warning locally suppressed using disable-msg
# I0012 Warning locally suppressed using disable-msg
# W0704 Except doesn't do anything Used when an except clause does nothing but "pass" and there is no "else" clause
# W0142 Used * or * magic* Used when a function or method is called using *args or **kwargs to dispatch arguments.
# W0212 Access to a protected member %s of a client class
# W0232 Class has no __init__ method Used when a class has no __init__ method, neither its parent classes.
# W0613 Unused argument %r Used when a function or method argument is not used.
# W0702 No exception's type specified Used when an except clause doesn't specify exceptions type to catch.
# R0201 Method could be a function
# W0614 Unused import XYZ from wildcard import
# R0914 Too many local variables
# R0912 Too many branches
# R0915 Too many statements
# R0913 Too many arguments
# R0904 Too many public methods
# E0211: Method has no argument
# E1128: Assigning to function call which only returns None Used when an assignment is done on a function call but the inferred function returns nothing but None.
# E1129: Context manager ‘%s’ doesn’t implement __enter__ and __exit__. Used when an instance in a with statement doesn’t implement the context manager protocol(__enter__/__exit__).
disable=C0103,C0111,I0011,I0012,W0704,W0142,W0212,W0232,W0613,W0702,R0201,W0614,R0914,R0912,R0915,R0913,R0904,R0801,not-context-manager,assignment-from-none

[TYPECHECK]
# Note: This modules are manipulated during the runtime so we can't detect all the properties during
# static analysis
ignored-modules=distutils,eventlet.green.subprocess,six,six.moves

[FORMAT]
max-line-length=100
max-module-lines=1000
indent-string=' '
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![PyPI3](https://img.shields.io/badge/pypi-1.5.10-blue.svg)](https://pypi.org/project/irflow-client/)
[![Documentation Status](https://readthedocs.com/projects/syncurity-irflow-sdk-python/badge/?version=latest)](https://syncurity-irflow-sdk-python.readthedocs-hosted.com/en/latest/?badge=latest)
![PyPI1](https://img.shields.io/badge/python-2.7+-brightgreen.svg)
[![PyPI version](https://badge.fury.io/py/irflow-client.svg)](https://badge.fury.io/py/irflow-client)![PyPI1](https://img.shields.io/badge/python-2.7+-brightgreen.svg)
![PyPI2](https://img.shields.io/badge/python-3.6+-brightgreen.svg)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/47bf392599fb4d27931d4d1225e37835)](https://www.codacy.com?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Syncurity/irflow-sdk-python&amp;utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/47bf392599fb4d27931d4d1225e37835)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=Syncurity/irflow-sdk-python&utm_campaign=Badge_Coverage)
Expand All @@ -11,34 +9,47 @@

## A python client for Syncurity IR-Flow REST API

logger.info: Python2 support will be removed at the beginning of January 2020.

### Documentation
View our documentation [here](https://syncurity-irflow-sdk-python.readthedocs-hosted.com/en/latest/)

### API Documentation
See the API functions [here](https://syncurity-irflow-sdk-python.readthedocs-hosted.com/en/latest/class.html#class)

### Installation To Use in Production
Python2: `pip install irflow_client`
Python3: `pip3 install irflow_client`
`pip install irflow_client`

### Installation in Edit Mode for Development
Python2: `pip install -e .`
Python3: `pip3 install -e .`

### Upgrade
Python2: `pip install irflow_client --upgrade`
Python3: `pip3 install irflow_client --upgrade`
`pip install irflow_client --upgrade`


### Build from source / install extra packages
Clone the repo:
` git clone [email protected]:Syncurity/irflow-sdk-python.git`

For building docs locally:

- use edit mode
For running tests:
```bash
1. Clone the repo:

git clone [email protected]:Syncurity/irflow-sdk-python.git

2. Install all requirements:

cd <project directory>
pip install .
pip install -r requirements-dev.txt

3. Run tests
pytest

For running tests: (not implemented yet)
`sudo pip install irflow_client -e . tests`
4. Run tests with coverage
# With Coverage
cd tests
py.test --cov-report xml --cov-config .coveragerc --cov ../
```

### Contribute
Pull requests are always appreciated
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ irflow-sdk-python changelog
* v1.5.8 Fix python_requires for pip 18.0+
* v1.5.9 Update URLLib for https://nvd.nist.gov/vuln/detail/CVE-2019-11324
* v1.5.10 Fix py2 compatibility
* v1.5.11 Fixed Create Incident to not require incident fields
* v1.6.0 Added the Assign User to Alert Endpoint
* Python2 support will be deprecated at the end of 2019
* Bump certifi to 2019.6.16
* Bump urllib3>=1.24.3 (CVE-2019-9740)
Loading