Skip to content

Commit

Permalink
Merge 4835e77 into 4da35ba
Browse files Browse the repository at this point in the history
  • Loading branch information
nyergler committed May 16, 2019
2 parents 4da35ba + 4835e77 commit 6a31505
Show file tree
Hide file tree
Showing 7 changed files with 360 additions and 19 deletions.
8 changes: 8 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[bumpversion]
current_version = 4.0.0
commit = True
tag = True

[bumpversion:file:setup.py]

[bumpversion:file:lob/version.py]
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
dist: xenial
language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
- '3.7'
- 'pypy'
before_install:
- pip install "pip==18.0.0"
- pip install pipenv
install:
- pip install -r requirements.txt
- pipenv install --dev
script:
- nosetests --with-coverage --cover-package=lob
- pipenv run nosetests --with-coverage --cover-package=lob
after_success:
- coveralls
notifications:
Expand Down
21 changes: 21 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = "*"

[dev-packages]
nose = "*"
"flake8" = "*"
coverage = "*"
coveralls = "*"
bumpversion = "*"
setuptools = "*"
twine = "*"

# pin pygments to a version compatible with Python 3.4
pygments = "<2.4.0"

[requires]
269 changes: 269 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 46 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This is the python wrapper for the Lob.com API. See full Lob.com documentation [here](https://lob.com/docs/python). For best results, be sure that you're using [the latest version](https://lob.com/docs/python#version) of the Lob API and the latest version of the python wrapper.

This wrapper supports Python 2.7, 3.4, 3.5, 3.6, pypy, and pypy3 and works in the object oriented style. That is, to make calls you have to call the method on a class and the return types are python objects. To get a `dict` on any object, you can call the `to_dict()` method of the object.
This wrapper supports Python 2.7, 3.4, 3.5, 3.6, 3.7, pypy, and pypy3 and works in the object oriented style. That is, to make calls you have to call the method on a class and the return types are python objects. To get a `dict` on any object, you can call the `to_dict()` method of the object.

## Table of Contents

Expand Down Expand Up @@ -134,12 +134,54 @@ There are simple scripts to demonstrate how to create all the core Lob objects (

## Testing

Install all requirements with `pip install -r requirements.txt`.
lob-python uses [Pipenv](https://docs.pipenv.org/) to manage development environments and dependencies.

You install all the development requirements by running

```shell
$ pipenv install --dev
$ pipenv shell
```

You can run all tests with the command `LOB_API_KEY=YOUR_TEST_API_KEY nosetests` in the main directory.

=======================
```shell
$ nosetests
```

## Making Releases

lob-python includes [bumpversion](https://pypi.org/project/bumpversion/) as a development dependency. This
tool should be used when changing the version number, as it will ensure that it's updated correctly and
consistently.

Running bumpversion will increment the specified version part (`major`, `minor`, `patch`), commit the change,
and tag it.

```shell
$ bumpversion <part>
```

After the version has been bumped, you can push the change and tag.

```shell
$ git push origin head
$ git push origin --tags
```

Finally, create the distribution and push it to PyPI using [twine](https://pypi.org/project/twine/).

```shell
$ python setup.py sdist
...
Writing lob-4.0.0/setup.cfg
Creating tar archive
removing 'lob-4.0.0' (and everything under it)
$ twine upload dist/lob-4.0.0.tar.gz
```

---

Copyright &copy; 2013 Lob.com
Copyright &copy; 2013-2019 Lob.com

Released under the MIT License, which can be found in the repository in `LICENSE.txt`.
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

0 comments on commit 6a31505

Please sign in to comment.