Skip to content

Commit 0455d39

Browse files
authored
Merge pull request #8 from Galarzaa90/dev
v1.1.0
2 parents 84df1bb + e5908a8 commit 0455d39

29 files changed

+835
-180
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cache: pip
1010
install:
1111
- pip install -U -r requirements.txt
1212
- pip install -U setuptools wheel
13-
- pip install coverage
13+
- pip install coverage codecov
1414
- pip install -U Sphinx
1515

1616
before_script:
@@ -29,6 +29,7 @@ after_script:
2929
- coverage report
3030
- coverage xml
3131
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
32+
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then codecov; fi
3233

3334
deploy:
3435
provider: pages

CHANGELOG.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

CHANGELOG.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
=========
2+
Changelog
3+
=========
4+
5+
.. _v1.1.0:
6+
7+
1.1.0 (2019-01-09)
8+
==================
9+
10+
- Parsing Highscores from Tibia.com and TibiaData.
11+
- Some strings from TibiaData had unpredictable trailing whitespaces,
12+
all leading and trailing whitespaces are removed.
13+
- Added type hints to many variables and methods.
14+
15+
.. _v1.0.0:
16+
17+
1.0.0 (2018-12-23)
18+
==================
19+
20+
- Added support for TibiaData JSON parsing. To have interoperability
21+
between Tibia.com and TibiaData.
22+
- Added support for parsing Houses, House lists, World and World list
23+
- Added support for many missing attributes in Character and Guilds.
24+
- All objects are now serializable to JSON strings.
25+
26+
.. _v0.1.0:
27+
28+
0.1.0 (2018-08-17)
29+
==================
30+
31+
Initial release:
32+
33+
- Parses content from tibia.com
34+
35+
- Character pages
36+
- Guild pages
37+
- Guild list pages
38+
39+
- Parses content into JSON format strings.
40+
- Parses content into Python objects.

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include requirements.txt
22
include README.md
3-
include CHANGELOG.md
3+
include CHANGELOG.rst
44
include LICENSE

docs/api.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Enumerations are provided for various values in order to avoid depending on stri
2020
:members:
2121
:undoc-members:
2222

23+
.. autoclass:: Category
24+
:members:
25+
:undoc-members:
26+
2327
.. autoclass:: HouseStatus
2428
:members:
2529
:undoc-members:
@@ -40,6 +44,12 @@ Enumerations are provided for various values in order to avoid depending on stri
4044
:members:
4145
:undoc-members:
4246

47+
.. autoclass:: VocationFilter
48+
:members:
49+
:undoc-members:
50+
51+
.. automethod:: VocationFilter.from_name
52+
4353
.. autoclass:: WorldLocation
4454
:members:
4555
:undoc-members:
@@ -61,6 +71,12 @@ Guild
6171
:members:
6272
:inherited-members:
6373

74+
Highscores
75+
----------
76+
.. autoclass:: Highscores
77+
:members:
78+
:inherited-members:
79+
6480
House
6581
-----
6682
.. autoclass:: House
@@ -120,6 +136,12 @@ CharacterHouse
120136
:members:
121137
:inherited-members:
122138

139+
ExpHighscoresEntry
140+
-------------------------
141+
.. autoclass:: ExpHighscoresEntry
142+
:members:
143+
:inherited-members:
144+
123145
Death
124146
-----
125147
.. autoclass:: Death
@@ -150,12 +172,25 @@ GuildMembership
150172
:members:
151173
:inherited-members:
152174

175+
176+
HighscoresEntry
177+
---------------
178+
.. autoclass:: HighscoresEntry
179+
:members:
180+
:inherited-members:
181+
153182
Killer
154183
------
155184
.. autoclass:: Killer
156185
:members:
157186
:inherited-members:
158187

188+
LoyaltyHighscoresEntry
189+
----------------------
190+
.. autoclass:: LoyaltyHighscoresEntry
191+
:members:
192+
:inherited-members:
193+
159194
OnlineCharacter
160195
---------------
161196
.. autoclass:: OnlineCharacter

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../CHANGELOG.rst

docs/conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,12 @@ def setup(app):
9696
# documentation.
9797
#
9898
html_theme_options = {
99-
'github_user': 'galarzaa90',
99+
'github_user': 'Galarzaa90',
100100
'github_repo': 'tibia.py',
101-
'github_type': 'star'
101+
'github_type': 'star',
102+
'fixed_sidebar': True,
103+
'travis_button': True,
104+
'donate_url': 'https://beerpay.io/Galarzaa90/tibia.py'
102105
}
103106

104107
# Add any paths that contain custom static files (such as style sheets) here,

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Indices and tables
3232

3333
intro
3434
api
35+
changelog
3536

3637
* :ref:`genindex`
3738
* :ref:`search`

setup.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ def get_version(package):
1414
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
1515

1616

17+
version = get_version("tibiapy")
18+
if version.endswith(('a', 'b', 'rc')):
19+
# append version identifier based on commit count
20+
try:
21+
import subprocess
22+
p = subprocess.Popen(['git', 'rev-list', '--count', 'HEAD'],
23+
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
24+
out, err = p.communicate()
25+
if out:
26+
version += out.decode('utf-8').strip()
27+
p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'],
28+
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
29+
out, err = p.communicate()
30+
if out:
31+
version += '+g' + out.decode('utf-8').strip()
32+
except Exception:
33+
pass
34+
1735
with open('requirements.txt') as f:
1836
requirements = f.read().splitlines()
1937

@@ -33,7 +51,7 @@ def get_version(package):
3351

3452
setup(
3553
name='tibia.py',
36-
version=get_version("tibiapy"),
54+
version=version,
3755
author='Galarzaa90',
3856
author_email="allan.galarza@gmail.com",
3957
url='https://github.com/Galarzaa90/tibia.py',

tests/resources/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ exist.
5454
- [tibiadata_list.json](house/tibiadata_list.json) - A house list on TibiaData.
5555
- [tibiadata_list_not_found.json](house/tibiadata_list_not_found.json) - The TibiaData response for a house list that
5656
doesn't exist.
57+
58+
## Highscores resources
59+
- [tibiacom_full.txt](highscores/tibiacom_full.txt) - The content of a correct highscore's pagem
60+
- [tibiacom_empty.txt](highscores/tibiacom_empty.txt) - The content of the highscores page of a nonexistent world.
61+
- [tibiacom_experience.txt](highscores/tibiacom_experience.txt) - The content of an experience highscores page.
62+
- [tibiacom_loyalty.txt](highscores/tibiacom_loyalty.txt) - The content of a loyalty highscores page.
63+
- [tibiadata_full.json](highscores/tibiadata_full.json) - A highscores response from TibiaData.
64+
- [tibiadata_empty.json](highscores/tibiadata_empty.json) - A highscores response from TibiaData of a nonexistent world.
65+
- [tibiadata_experience.json](highscores/tibiadata_experience.json) - A response containing experience highscores from
66+
TibiaData.
67+
- [tibiadata_loyalty.json](highscores/tibiadata_loyalty.json) - A response containing loyalty highscores from TibiaData.
5768

5869
## World resources
5970
- [tibiacom_online.txt](world/tibiacom_online.txt) - An online world on Tibia.com.

0 commit comments

Comments
 (0)