Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: v4.0.0 #426

Merged
merged 16 commits into from
Dec 13, 2024
Merged
37 changes: 21 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@ on:
- pull_request

jobs:
build:
runs-on: ubuntu-latest
test:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox


- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "requirements**.txt"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Run tests with coverage
run: |
uv run python -m pytest --cov=googletrans --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
30 changes: 30 additions & 0 deletions .zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"languages": {
"Python": {
"language_servers": ["pyright", "ruff"],
"format_on_save": "on",
"formatter": [
{
"code_actions": {
"source.fixAll.ruff": true,
"source.organizeImports.ruff": true
}
},
{
"language_server": {
"name": "ruff"
}
}
]
}
},
"lsp": {
"ruff": {
"initialization_options": {
"settings": {
"path": "./pyproject.toml"
}
}
}
}
}
16 changes: 0 additions & 16 deletions Pipfile

This file was deleted.

646 changes: 0 additions & 646 deletions Pipfile.lock

This file was deleted.

13 changes: 4 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ implemented Google Translate API. This uses the `Google Translate Ajax
API <https://translate.google.com>`__ to make calls to such methods as
detect and translate.

Compatible with Python 3.6+.
Compatible with Python 3.8+.

For details refer to the `API
Documentation <https://py-googletrans.readthedocs.io/en/latest>`__.
Expand All @@ -24,15 +24,10 @@ Features
- Auto language detection
- Bulk translations
- Customizable service URL
- Async support
- HTTP/2 support

TODO
~~~~

more features are coming soon.

- Proxy support
- Internal session management (for better bulk translations)
- Complete type hints

HTTP/2 support
~~~~~~~~~~~~~~
Expand Down Expand Up @@ -109,7 +104,7 @@ URLs are provided, it then randomly chooses a domain.
Customize service URL to point to standard api
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Considering translate.google.<domain> url services use the webapp requiring a token,
Considering translate.google.<domain> url services use the webapp requiring a token,
you can prefer to use the direct api than does not need any token to process.
It can solve your problems of unstable token providing processes (refer to issue #234)

Expand Down
Loading