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
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ on:
jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/3scale-api
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: setup
run: pip install wheel
- name: build
run: python setup.py --release-version ${GITHUB_REF#refs/tags/v} sdist bdist_wheel
- name: release
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
71 changes: 32 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,38 @@
VERSION = sys.argv.pop(1)
assert re.match(r"[0-9]+\.[0-9]+\.[0-9]+", VERSION), "Version definition required as first arg"

requirements = ['requests', 'backoff']
requirements = ["requests", "backoff"]

extra_requirements = {
'dev': [
'pytest',
'coverage',
'python-dotenv',
'responses'
extra_requirements = {"dev": ["pytest", "coverage", "python-dotenv", "responses"], "docs": ["sphinx"]}

setup(
name="3scale-api",
version=VERSION,
description="3scale API python client",
author="Peter Stanko",
author_email="stanko@mail.muni.cz",
maintainer="Matej Dujava",
maintainer_email="mdujava@redhat.com",
url="https://github.com/3scale-qe/3scale-api-python",
packages=find_packages(exclude=("tests",)),
long_description=long_description,
long_description_content_type="text/markdown",
include_package_data=True,
install_requires=requirements,
extras_require=extra_requirements,
entry_points={},
classifiers=[
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Topic :: Utilities",
"Programming Language :: Python :: 3",
"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",
],
'docs': ['sphinx']
}

setup(name='3scale-api',
version=VERSION,
description='3scale API python client',
author='Peter Stanko',
author_email='stanko@mail.muni.cz',
maintainer='Peter Stanko',
url='https://github.com/3scale-qe/3scale-api-python',
packages=find_packages(exclude=("tests",)),
long_description=long_description,
long_description_content_type='text/markdown',
include_package_data=True,
install_requires=requirements,
extras_require=extra_requirements,
entry_points={},
classifiers=[
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
'Intended Audience :: Developers',
'Topic :: Utilities',
"Programming Language :: Python :: 3",
'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',
],
)
)
2 changes: 1 addition & 1 deletion threescale_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def admin_portal_auth_providers(self) -> resources.AdminPortalAuthProviders:
return self._admin_portal_auth_providers

@property
def policy_registry(self) -> resources.PolicyRegistry:
def policy_registry(self) -> resources.PoliciesRegistry:
return self._policy_registry

@property
Expand Down
Loading