Skip to content

Commit

Permalink
Initialize tox with actions workflow
Browse files Browse the repository at this point in the history
Add enum34 dependency when python version < 3.4

Remove Python 3.3 from supported versions

Wrap import typing to try statement (+1 squashed commit)
Squashed commits:
[a54ec77] [0.1.0.0] Remove Python 2 support
  • Loading branch information
JoMingyu committed Aug 7, 2020
1 parent dc21607 commit 524af26
Show file tree
Hide file tree
Showing 14 changed files with 184 additions and 186 deletions.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Write result of `google_play_scraper.VERSION`
**Describe the bug**
A description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1.
2.
3.
**Code**
Copy and paste the code that have issue.

```
```

**Expected behavior**
A description of what you expected to happen.
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/push_pr_hook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
python-version: [3.3, 3.4, 3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}

- name: Install pipenv
uses: dschep/install-pipenv-action@v1

- name: Install dependencies
run: pipenv install --dev
- name: Install tox
run: pip install tox tox-gh-actions

- name: Run tests
run: pipenv run nosetests tests
run: tox
17 changes: 9 additions & 8 deletions .github/workflows/scheduled_e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
python-version: [3.3, 3.4, 3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}

- name: Install pipenv
uses: dschep/install-pipenv-action@v1

- name: Install dependencies
run: pipenv install --dev
- name: Install tox
run: pip install tox tox-gh-actions

- name: Run tests
run: pipenv run nosetests tests/e2e_tests
run: tox
4 changes: 4 additions & 0 deletions CHANGES.md → CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@
> `app` feature improvement
- Some calibration logic added to `app` function
- Added `inAppProductPrice` element to `app` function

## v.0.1.0.0
> Remove Python 2 support
- Python 2 is no longer supported since this version.
1 change: 0 additions & 1 deletion CONTRIBUTING.md

This file was deleted.

2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ verify_ssl = true
[dev-packages]
black = "*"
twine = "*"
validators = "*"
nose = "*"
tox = "*"

[packages]

Expand Down
278 changes: 126 additions & 152 deletions Pipfile.lock

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,4 @@ result = reviews_all(
```

## Changes
Change logs are here : [CHANGES.md](./CHANGES.md)

## Contributing
Contributing guides can be found in [CONTRIBUTING.md](./CONTRIBUTING.md).
Change logs are here : [CHANGELOG.md](CHANGELOG.md)
2 changes: 1 addition & 1 deletion google_play_scraper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from .features.app import app
from .features.reviews import reviews, reviews_all

VERSION = __version__ = "0.0.3.2"
VERSION = __version__ = "0.1.0.0"
6 changes: 5 additions & 1 deletion google_play_scraper/features/reviews.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import json
from time import sleep
from typing import Optional, Tuple

try:
from typing import Optional, Tuple
except ImportError:
pass

from google_play_scraper import Sort
from google_play_scraper.constants.element import ElementSpecs
Expand Down
5 changes: 4 additions & 1 deletion google_play_scraper/utils/request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Union
try:
from typing import Union
except ImportError:
pass

from google_play_scraper.exceptions import NotFoundError, ExtraHTTPError

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

setup(
name="google-play-scraper",
python_requires=">=3.4",
version=__version__,
url="https://github.com/JoMingyu/google-play-scraper",
license="MIT",
Expand All @@ -14,11 +15,10 @@
classifiers=[
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Typing :: Typed",
],
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e_tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ def test_e2e_scenario_3(self):
res = app("com.sgn.pandapop.gp")

self.assertEqual(
"https://www.youtube.com/embed/MaCigh28qQk?ps=play&vq=large&rel=0&autohide=1&showinfo=0",
"https://www.youtube.com/embed/pU698vDIHiw?ps=play&vq=large&rel=0&autohide=1&showinfo=0",
res["video"],
)
self.assertEqual(
"https://i.ytimg.com/vi/MaCigh28qQk/hqdefault.jpg", res["videoImage"]
"https://i.ytimg.com/vi/pU698vDIHiw/hqdefault.jpg", res["videoImage"]
)

def test_e2e_scenario_4(self):
Expand Down
15 changes: 15 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tox]
envlist=py33, py34, py35, py36, py37, py38

[gh-actions]
python =
3.3: py33
3.4: py34
3.5: py35
3.6: py36
3.7: py37
3.8: py38

[testenv]
deps=nose
commands=nosetests tests

0 comments on commit 524af26

Please sign in to comment.