Skip to content

Commit

Permalink
Version 1.5 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolstislon authored Apr 1, 2020
1 parent 54608eb commit 796489b
Show file tree
Hide file tree
Showing 41 changed files with 1,531 additions and 454 deletions.
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ venv.bak/

# mypy
.mypy_cache/

# Pycharm
.idea/
/.pypirc
todo.txt
/dev_tools

# Other
Pipfile.lock
/dev_tools
testrail_api/__version__.py
47 changes: 25 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
dist: xenial
language: python
jobs:
include:
- stage: deploy
dist: xenial
python: 3.8
sudo: required
deploy:
provider: pypi
user: $PYPI_USER
password: $PYPI_PASSWORD
skip_cleanup: true
distributions: "twine upload dist/*"
on:
branch: master
repo: tolstislon/testrail-api

python:
- "3.6"
- "3.7"
- "3.8"
install:
- pip install m2r==0.2.1
- pip install twine==3.1.1

- pip install pipenv
- pipenv install pytest==5.4.1
- pipenv install pytest-cov==2.8.1
- pipenv install responses==0.10.12
- pipenv install -e .
script:
- python setup.py bdist_wheel
- pytest tests/unit
deploy:
provider: pypi
user: $PYPI_USER
password: $PYPI_PASSWORD
skip_existing: true
distributions: bdist_wheel --universal
on:
tags: true
repo: tolstislon/testrail-api
python: "3.8"

branches:
only:
- master
notifications:
email:
on_success: never
on_failure: always
8 changes: 7 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
m2r = "==0.2.1"
pytest = "==5.4.1"
pytest-cov = "==2.8.1"
responses = "==0.10.12"
pylint = "==2.4.4"
mypy = "==0.770"
black = "==19.10b0"

[packages]
requests = "==2.23.0"

[requires]
python_version = "3.8"

[pipenv]
allow_prereleases = true
203 changes: 0 additions & 203 deletions Pipfile.lock

This file was deleted.

20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
![PyPI](https://img.shields.io/pypi/v/testrail-api?color=%2301a001&label=version&logo=version)
[![Downloads](https://pepy.tech/badge/testrail-api)](https://github.com/tolstislon/testrail-api)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/testrail-api.svg)
![PyPI - Python Version](https://img.shields.io/badge/TestRail-6.2.1.1005-blue)
[![Build Status](https://travis-ci.com/tolstislon/testrail-api.svg?branch=master)](https://travis-ci.com/tolstislon/testrail-api)

This is a Python wrapper of the TestRail API(v2) according to [the official documentation](http://docs.gurock.com/testrail-api2/start)


### Install
Install
----

```bash
pip install testrail-api
```

##### Support environment variables
* TESTRAIL_URL
* TESTRAIL_EMAIL
* TESTRAIL_PASSWORD

### Example
* `TESTRAIL_URL`
* `TESTRAIL_EMAIL`
* `TESTRAIL_PASSWORD`

Example
----
```python
from datetime import datetime

Expand All @@ -30,7 +30,7 @@ from testrail_api import TestRailAPI
api = TestRailAPI('https://example.testrail.com/', 'example@mail.com', 'password')

# if use environment variables
api = TestRailAPI()
# api = TestRailAPI()


new_milestone = api.milestones.add_milestone(
Expand Down Expand Up @@ -61,3 +61,7 @@ api.runs.close_run(my_test_run['id'])
api.milestones.update_milestone(new_milestone['id'], is_completed=True)
```


Contributing
----
Contributions are very welcome.
25 changes: 15 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
from m2r import parse_from_file
from setuptools import setup, find_packages
from pathlib import Path

import testrail_api
from setuptools import find_packages, setup

readme = Path('.', 'README.md').absolute()
with readme.open('r', encoding='utf-8') as file:
long_description = file.read()

setup(
name='testrail_api',
version=testrail_api.__version__,
packages=find_packages(exclude=('tests', 'dev_tools')),
url=testrail_api.__url__,
license=testrail_api.__license__,
author=testrail_api.__author__,
author_email=testrail_api.__author_email__,
description=testrail_api.__description__,
long_description=parse_from_file('README.md'),
url='https://github.com/tolstislon/testrail-api',
license='MIT License',
author='tolstislon',
author_email='tolstislon@gmail.com',
description='Python wrapper of the TestRail API',
long_description=long_description,
long_description_content_type='text/markdown',
use_scm_version={"write_to": "testrail_api/__version__.py"},
setup_requires=['setuptools_scm'],
install_requires=[
'requests>=2.20.1'
],
Expand Down
Loading

0 comments on commit 796489b

Please sign in to comment.