Skip to content

Commit

Permalink
Merge pull request #13 from dobizz/main
Browse files Browse the repository at this point in the history
chore: release v0.1.0
  • Loading branch information
dobizz committed Nov 5, 2023
2 parents be57405 + c92215d commit 60a83db
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Bump version

on:
push:
branches: [ "main" ]

jobs:
bump_version:
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
name: "Bump version and create changelog with commitizen"
runs-on: ubuntu-latest

steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"

- id: cz
name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

jobs:
build:

if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
runs-on: ubuntu-latest

strategy:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## 0.1.0 (2023-11-05)

### Feat

- **classes.py**: add retry decorator for _request (#10)
- initial commit (#1)

### Fix

- **bump-version.yml,python-app.yml**: fix missing not operator with if statement (#11)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "pyplayht"
description = "Python wrapper for PlayHT REST API"
authors = [{name = "dobizz", email = "ronnie.code@outlook.com"}]
version = "0.0.0"
version = "0.1.0"
license = {file = "LICENSE"}
requires-python = ">=3.8"
dynamic = ["dependencies"]
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
python-dotenv>=0.20.0
requests>=2.28.2
retry2>=0.9.5
2 changes: 1 addition & 1 deletion src/pyplayht/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.0"
__version__ = "0.1.0"
2 changes: 2 additions & 0 deletions src/pyplayht/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from urllib.parse import urljoin, urlparse, urlunparse

import requests
from retry import retry

from pyplayht.types import VoiceType

Expand Down Expand Up @@ -105,6 +106,7 @@ def download_file(self, uri: str) -> bytes:
response = self._request("GET", new_url)
return response.content

@retry(tries=3, delay=5, backoff=2)
def _request(
self,
method: str,
Expand Down

0 comments on commit 60a83db

Please sign in to comment.