Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ name: Upload Python Package

on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to run from (use "v0" to publish from v0)'
required: false
default: 'main'
release:
types: [published]

Expand All @@ -23,7 +28,14 @@ jobs:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Checkout (release or default)
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@v4
- name: Checkout (manual dispatch branch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
38 changes: 34 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,48 @@ name: phrasetms_client Python package

on:
push:
branches: [ main ]
branches: [ main, v0 ]
pull_request:
branches: [ main ]
branches: [ main, v0 ]

jobs:
build:
build-main:
name: Build (main)
if: |
(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') || (github.ref == 'refs/heads/main')
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["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
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest

build-v0:
name: Build (v0)
if: |
(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'v0') || (github.ref == 'refs/heads/v0')
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
13 changes: 0 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,5 @@ venv/
.python-version
.pytest_cache

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

#Ipython Notebook
.ipynb_checkpoints
25 changes: 0 additions & 25 deletions .gitlab-ci.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .openapi-generator-ignore

This file was deleted.

17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Python client for Phrase TMS.

This Python package was initially automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project.

## Requirements.
## Requirements

Python 3.7+
Python 3.9+

## Installation & Usage

Expand Down
2 changes: 0 additions & 2 deletions docs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


## Documentation for API Endpoints

All URIs are relative to *https://cloud.memsource.com/web*
Expand Down
57 changes: 0 additions & 57 deletions git_push.sh

This file was deleted.

27 changes: 24 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,43 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
repository = "https://github.com/Martin005/phrasetms-python"
keywords = ["Phrase TMS API", "Phrase TMS"]

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.9"

urllib3 = ">= 1.25.3"
python-dateutil = ">=2.8.2"
pydantic = "^1.10.5, <2"
aenum = ">=3.1.11"

[project]
name = "phrasetms_client"
version = "0.3.14"
description = "Phrase TMS API"
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"setuptools >= 21.0.0",
"python-dateutil >= 2.5.3",
"urllib3 >= 1.25.3",
"pydantic >= 2.0.0",
]

[dependency-groups]
dev = [
"pytest >= 7.2.1",
"tox >= 3.9.0",
"flake8 >= 4.0.0",
]

[tool.poetry.dev-dependencies]
pytest = ">=7.2.1"
tox = ">=3.9.0"
Expand All @@ -39,3 +59,4 @@ build-backend = "setuptools.build_meta"

[tool.pylint.'MESSAGES CONTROL']
extension-pkg-whitelist = "pydantic"

3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
python_dateutil >= 2.5.3
setuptools >= 21.0.0
python_dateutil >= 2.5.3
urllib3 >= 1.25.3
pydantic >= 2.0.0
aenum >= 3.1.11
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
# http://pypi.python.org/pypi/setuptools
NAME = "phrasetms-client"
VERSION = "0.3.14"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = ["urllib3 >= 1.25.3", "python-dateutil", "pydantic >= 2.0.0", "aenum"]
PYTHON_REQUIRES = ">=3.9"
REQUIRES = [
"python-dateutil >= 2.5.3",
"urllib3 >= 1.25.3",
"pydantic >= 2.0.0",
]

setup(
name=NAME,
Expand Down
Loading