Skip to content

Commit 4adf80f

Browse files
authored
Merge pull request #18 from Kronopt/master
V2 API and python3 support
2 parents bb72105 + e6cee23 commit 4adf80f

23 files changed

Lines changed: 2782 additions & 837 deletions

.circleci/config.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Config file for automatic testing at circleci.com
2+
3+
version: 2
4+
5+
jobs:
6+
py27_tests:
7+
docker:
8+
- image: circleci/python:2.7.15
9+
steps:
10+
- checkout
11+
- run:
12+
command: |
13+
pip install -r requirements.txt --user
14+
python -m unittest tests.test_pykemon
15+
16+
py36_tests:
17+
docker:
18+
- image: circleci/python:3.6.6
19+
steps:
20+
- checkout
21+
- run:
22+
command: |
23+
pip install -r requirements.txt --user
24+
python -m unittest tests.test_pykemon
25+
26+
py37_tests:
27+
docker:
28+
- image: circleci/python:3.7.0
29+
steps:
30+
- checkout
31+
- run:
32+
command: |
33+
pip install -r requirements.txt --user
34+
python -m unittest tests.test_pykemon
35+
36+
workflows:
37+
version: 2
38+
run_tests:
39+
jobs:
40+
- py27_tests
41+
- py36_tests
42+
- py37_tests

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@ docs/_build
4444

4545
# htmlcov
4646
htmlcov/
47+
48+
# Pycharm
49+
.idea/
50+
51+
# virtual environment
52+
venv/

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ language: python
44

55
python:
66
- "2.7"
7+
- "3.6"
8+
- "3.7"
9+
10+
# Travis still doesn't support Python 3.7 yet, so the following 2 lines are needed
11+
dist: xenial
12+
sudo: true
713

814
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
915
install: pip install -r requirements.txt
1016

1117
# command to run tests, e.g. python setup.py test
12-
script: py.test test
18+
script: python -m unittest tests.test_pykemon

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ Contributors
1111
------------
1212

1313
* Owen Hallett
14+
* Kronopt
1415

1516
Made a commit? Add your name to the list!

CONTRIBUTING.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Types of Contributions
1313
Report Bugs
1414
~~~~~~~~~~~
1515

16-
Report bugs at https://github.com/phalt/pykemon/issues.
16+
Report bugs at https://github.com/PokeAPI/pykemon/issues.
1717

1818
If you are reporting a bug, please include:
1919

@@ -43,7 +43,7 @@ articles, and such.
4343
Submit Feedback
4444
~~~~~~~~~~~~~~~
4545

46-
The best way to send feedback is to file an issue at https://github.com/phalt/pykemon/issues.
46+
The best way to send feedback is to file an issue at https://github.com/PokeAPI/pykemon/issues.
4747

4848
If you are proposing a feature:
4949

@@ -74,13 +74,13 @@ Ready to contribute? Here's how to set up `pykemon` for local development.
7474
7575
Now you can make your changes locally.
7676

77-
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
77+
5. When you're done making changes, check that your changes pass flake8, pep8 and the tests, including testing other Python versions with tox::
7878

79+
$ pep8 pykemon
7980
$ flake8 pykemon tests
80-
$ python setup.py test
8181
$ tox
8282

83-
To get flake8 and tox, just pip install them into your virtualenv.
83+
To get flake8 and tox, just pip install them into your virtualenv.
8484

8585
6. Commit your changes and push your branch to GitHub::
8686

@@ -99,7 +99,7 @@ Before you submit a pull request, check that it meets these guidelines:
9999
2. If the pull request adds functionality, the docs should be updated. Put
100100
your new functionality into a function with a docstring, and add the
101101
feature to the list in README.rst.
102-
3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check
102+
3. The pull request should work for Python 2.7, 3.6, and 3.7. Check
103103
https://travis-ci.org/phalt/pykemon/pull_requests
104104
and make sure that the tests pass for all supported Python versions.
105105

HISTORY.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
History
44
-------
55

6+
0.4.0 (2018-10-11)
7+
++++++++++++++++++
8+
9+
* Removed code from pre-beckett versions
10+
* Removed V1 API support, as it is now deprecated
11+
* Added some tweaks to the beckett package
12+
13+
0.3.0 (2017-10-19)
14+
++++++++++++++++++
15+
16+
* V2 support added
17+
* Added some missing V1 resources
18+
* Removed files related to API 0.1
19+
620
0.2.0 (2016-06-11)
721
++++++++++++++++++
822

@@ -24,5 +38,5 @@ History
2438
++++++++++++++++++
2539

2640
* First release on PyPI.
27-
* All PokeAPI resources fully supported and represented in an object-oriented style.
41+
* All PokeAPI resources fully supported and represented in an object-oriented style
2842
* Easy-to-use API: just one method!

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ lint:
2727
flake8 pykemon tests
2828

2929
test:
30-
py.test tests/
30+
python -m unittest tests.test_pykemon
3131

3232
test-all:
3333
tox

README.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Pykemon
88
.. image:: https://circleci.com/gh/PokeAPI/pykemon.svg?style=svg
99
:target: https://circleci.com/gh/PokeAPI/pykemon
1010

11-
A python wrapper for `PokeAPI <http://pokeapi.co>`_
11+
A python wrapper for `PokeAPI <https://pokeapi.co>`_
1212

1313
* Free software: BSD license
1414
* Documentation: http://pykemon.rtfd.org.
@@ -32,14 +32,13 @@ Even simpler:
3232
.. code-block:: python
3333
3434
>>> import pykemon
35-
>>> client = pykemon.V1Client()
36-
>>> p = client.get_pokemon(uid=1)
37-
[<Pokemon - Bulbasaur>]
35+
>>> client = pykemon.V2Client()
36+
>>> client.get_pokemon(1)[0]
37+
<Pokemon - Bulbasaur>
3838
3939
4040
Features
4141
--------
4242

4343
* Generate Python objects from PokeAPI resources.
44-
4544
* Human-friendly API

docs/installation.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@ Installation
44

55
At the command line::
66

7-
$ easy_install pykemon
8-
9-
Or, if you have virtualenvwrapper installed::
10-
11-
$ mkvirtualenv pykemon
12-
$ pip install pykemon
7+
$ pip install pykemon

docs/pykemon.rst

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,18 @@ pykemon.api module
1212
:undoc-members:
1313
:show-inheritance:
1414

15-
pykemon.exceptions module
16-
-------------------------
15+
pykemon.beckett_tweaks module
16+
--------------------------
1717

18-
.. automodule:: pykemon.exceptions
18+
.. automodule:: pykemon.beckett_tweaks
1919
:members:
2020
:undoc-members:
2121
:show-inheritance:
2222

23-
pykemon.models module
24-
---------------------
23+
pykemon.resourcesV2 module
24+
--------------------------
2525

26-
.. automodule:: pykemon.models
27-
:members:
28-
:undoc-members:
29-
:show-inheritance:
30-
31-
pykemon.request module
32-
----------------------
33-
34-
.. automodule:: pykemon.request
26+
.. automodule:: pykemon.resourcesV2
3527
:members:
3628
:undoc-members:
3729
:show-inheritance:

0 commit comments

Comments
 (0)