Skip to content

Commit 32de76d

Browse files
author
mkudlej
authored
Merge pull request #174 from mdujava/publish
New publishing pipeline with one type fix
2 parents 803d36d + 6d26508 commit 32de76d

File tree

3 files changed

+41
-45
lines changed

3 files changed

+41
-45
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ on:
66
jobs:
77
release:
88
runs-on: ubuntu-latest
9+
environment:
10+
name: pypi
11+
url: https://pypi.org/p/3scale-api
12+
permissions:
13+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
914
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-python@v2
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
1217
with:
1318
python-version: '3.11'
1419
- name: setup
1520
run: pip install wheel
1621
- name: build
1722
run: python setup.py --release-version ${GITHUB_REF#refs/tags/v} sdist bdist_wheel
18-
- name: release
23+
- name: Publish package distributions to PyPI
1924
uses: pypa/gh-action-pypi-publish@release/v1
20-
with:
21-
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,38 @@
1212
VERSION = sys.argv.pop(1)
1313
assert re.match(r"[0-9]+\.[0-9]+\.[0-9]+", VERSION), "Version definition required as first arg"
1414

15-
requirements = ['requests', 'backoff']
15+
requirements = ["requests", "backoff"]
1616

17-
extra_requirements = {
18-
'dev': [
19-
'pytest',
20-
'coverage',
21-
'python-dotenv',
22-
'responses'
17+
extra_requirements = {"dev": ["pytest", "coverage", "python-dotenv", "responses"], "docs": ["sphinx"]}
2318

19+
setup(
20+
name="3scale-api",
21+
version=VERSION,
22+
description="3scale API python client",
23+
author="Peter Stanko",
24+
author_email="[email protected]",
25+
maintainer="Matej Dujava",
26+
maintainer_email="[email protected]",
27+
url="https://github.com/3scale-qe/3scale-api-python",
28+
packages=find_packages(exclude=("tests",)),
29+
long_description=long_description,
30+
long_description_content_type="text/markdown",
31+
include_package_data=True,
32+
install_requires=requirements,
33+
extras_require=extra_requirements,
34+
entry_points={},
35+
classifiers=[
36+
"Operating System :: OS Independent",
37+
"License :: OSI Approved :: Apache Software License",
38+
"Intended Audience :: Developers",
39+
"Topic :: Utilities",
40+
"Programming Language :: Python :: 3",
41+
"Programming Language :: Python :: 3.7",
42+
"Programming Language :: Python :: 3.8",
43+
"Programming Language :: Python :: 3.9",
44+
"Programming Language :: Python :: 3.10",
45+
"Programming Language :: Python :: 3.11",
46+
"Programming Language :: Python :: 3.12",
47+
"Programming Language :: Python :: 3.13",
2448
],
25-
'docs': ['sphinx']
26-
}
27-
28-
setup(name='3scale-api',
29-
version=VERSION,
30-
description='3scale API python client',
31-
author='Peter Stanko',
32-
author_email='[email protected]',
33-
maintainer='Peter Stanko',
34-
url='https://github.com/3scale-qe/3scale-api-python',
35-
packages=find_packages(exclude=("tests",)),
36-
long_description=long_description,
37-
long_description_content_type='text/markdown',
38-
include_package_data=True,
39-
install_requires=requirements,
40-
extras_require=extra_requirements,
41-
entry_points={},
42-
classifiers=[
43-
"Operating System :: OS Independent",
44-
"License :: OSI Approved :: Apache Software License",
45-
'Intended Audience :: Developers',
46-
'Topic :: Utilities',
47-
"Programming Language :: Python :: 3",
48-
'Programming Language :: Python :: 3.7',
49-
'Programming Language :: Python :: 3.8',
50-
'Programming Language :: Python :: 3.9',
51-
'Programming Language :: Python :: 3.10',
52-
'Programming Language :: Python :: 3.11',
53-
'Programming Language :: Python :: 3.12',
54-
'Programming Language :: Python :: 3.13',
55-
],
56-
)
49+
)

threescale_api/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def admin_portal_auth_providers(self) -> resources.AdminPortalAuthProviders:
257257
return self._admin_portal_auth_providers
258258

259259
@property
260-
def policy_registry(self) -> resources.PolicyRegistry:
260+
def policy_registry(self) -> resources.PoliciesRegistry:
261261
return self._policy_registry
262262

263263
@property

0 commit comments

Comments
 (0)