Skip to content

Commit 45b8002

Browse files
authored
Merge pull request #204 from reportportal/develop
Release
2 parents f5cac72 + 1b74f8d commit 45b8002

36 files changed

+690
-1450
lines changed

.github/workflows/release.yml

Lines changed: 108 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
name: Upload Python Package
1+
# Copyright 2022 EPAM Systems
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# https://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
14+
name: Release client
215

316
on:
417
push:
5-
branches: ['master']
18+
branches: [ 'master' ]
619
paths-ignore:
720
- '.github/**'
821
- CHANGELOG.md
9-
- README.rst
22+
- README.md
1023
- CONTRIBUTING.rst
1124

1225
env:
@@ -22,99 +35,95 @@ jobs:
2235
deploy:
2336
runs-on: ubuntu-latest
2437
steps:
25-
- uses: actions/checkout@v2
26-
27-
- name: Generate versions
28-
uses: HardNorth/[email protected]
29-
with:
30-
version-source: file
31-
version-file: ${{ env.VERSION_FILE }}
32-
version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }}
33-
34-
- name: Setup git credentials
35-
uses: oleksiyrudenko/gha-git-credentials@v2
36-
with:
37-
name: 'reportportal.io'
38-
39-
token: ${{ secrets.GITHUB_TOKEN }}
40-
41-
- name: Tagging new version
42-
id: newVersionTag
43-
run: |
44-
git tag -a ${{ env.RELEASE_VERSION }} -m "Release ${{ env.RELEASE_VERSION }}"
45-
git push --tags
46-
47-
- name: Set up Python
48-
uses: actions/setup-python@v1
49-
with:
50-
python-version: '3.6'
51-
52-
- name: Install dependencies
53-
run: |
54-
python -m pip install --upgrade pip
55-
pip install setuptools wheel twine
56-
57-
- name: Build and publish
58-
env:
59-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
60-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
61-
run: |
62-
python setup.py sdist bdist_wheel
63-
twine upload dist/*
64-
65-
- name: Checkout develop branch
66-
uses: actions/checkout@v2
67-
with:
68-
ref: 'develop'
69-
fetch-depth: 0
70-
71-
- name: Update CHANGELOG.md
72-
id: changelogUpdate
73-
run: |
74-
sed '/\[Unreleased\]/q' ${{ env.CHANGE_LOG_FILE }} >> ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }}
75-
sed -E '1,/#?#\s*\[Unreleased\]/d' ${{ env.CHANGE_LOG_FILE }} | sed -E '/#?#\s*\[/q' | \
76-
{ echo -e '\n## [${{ env.RELEASE_VERSION }}]'; sed '$d'; } >> ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }}
77-
grep -E '#?#\s*\[[0-9]' ${{ env.CHANGE_LOG_FILE }} | head -n1 >> ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }}
78-
sed -E '1,/#?#\s*\[[0-9]/d' ${{ env.CHANGE_LOG_FILE }} >> ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }}
79-
rm ${{ env.CHANGE_LOG_FILE }}
80-
mv ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }} ${{ env.CHANGE_LOG_FILE }}
81-
git add ${{ env.CHANGE_LOG_FILE }}
82-
git commit -m "Changelog update"
83-
84-
- name: Read changelog Entry
85-
id: readChangelogEntry
86-
uses: mindsers/[email protected]
87-
with:
88-
version: ${{ env.RELEASE_VERSION }}
89-
path: ./${{ env.CHANGE_LOG_FILE }}
90-
91-
- name: Create Release
92-
id: createRelease
93-
uses: actions/create-release@v1
94-
env:
95-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96-
with:
97-
tag_name: ${{ env.RELEASE_VERSION }}
98-
release_name: Release ${{ env.RELEASE_VERSION }}
99-
body: ${{ steps.readChangelogEntry.outputs.log_entry }}
100-
draft: false
101-
prerelease: false
102-
103-
- name: Merge release branch into develop
104-
id: mergeIntoDevelop
105-
run: |
106-
git merge -m 'Merge master branch into develop after a release' origin/master
107-
git status | (! grep -Fq 'both modified:') || git status | grep -F 'both modified:' \
108-
| { echo -e 'Unable to merge master into develop, merge conflicts:'; (! grep -Eo '[^ ]+$') }
109-
110-
- name: Update version file
111-
id: versionFileUpdate
112-
run: |
113-
export CURRENT_VERSION_VALUE=`echo '${{ env.CURRENT_VERSION }}' | sed -E "s/(.*)/${{ env.VERSION_REPLACE_PATTERN }}/"`
114-
export NEXT_VERSION_VALUE=`echo '${{ env.NEXT_VERSION }}' | sed -E "s/(.*)/${{ env.VERSION_REPLACE_PATTERN }}/"`
115-
sed "s/${CURRENT_VERSION_VALUE}/${NEXT_VERSION_VALUE}/g" ${{ env.VERSION_FILE }} > ${{ env.VERSION_FILE }}${{ env.TMP_SUFFIX }}
116-
rm ${{ env.VERSION_FILE }}
117-
mv ${{ env.VERSION_FILE }}${{ env.TMP_SUFFIX }} ${{ env.VERSION_FILE }}
118-
git add ${{ env.VERSION_FILE }}
119-
git commit -m "Version update"
120-
git push
38+
- name: Checkout repository
39+
uses: actions/checkout@v3
40+
41+
- name: Set up Python
42+
uses: actions/setup-python@v4
43+
with:
44+
python-version: '3.8'
45+
46+
- name: Install dependencies
47+
run: python -m pip install --upgrade pip setuptools wheel
48+
49+
- name: Build package
50+
run: python setup.py sdist bdist_wheel
51+
52+
- name: Publish package
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
with:
55+
user: ${{ secrets.PYPI_USERNAME }}
56+
password: ${{ secrets.PYPI_PASSWORD }}
57+
58+
- name: Generate versions
59+
uses: HardNorth/github-version-generate@v1
60+
with:
61+
version-source: file
62+
version-file: ${{ env.VERSION_FILE }}
63+
version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }}
64+
65+
- name: Setup git credentials
66+
uses: oleksiyrudenko/[email protected]
67+
with:
68+
name: 'reportportal.io'
69+
70+
token: ${{ secrets.GITHUB_TOKEN }}
71+
72+
- name: Tagging new version
73+
id: newVersionTag
74+
run: |
75+
git tag -a ${{ env.RELEASE_VERSION }} -m "Release ${{ env.RELEASE_VERSION }}"
76+
git push --tags
77+
78+
- name: Update CHANGELOG.md
79+
id: changelogUpdate
80+
run: |
81+
sed '/\[Unreleased\]/q' ${{ env.CHANGE_LOG_FILE }} >> ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }}
82+
sed -E '1,/#?#\s*\[Unreleased\]/d' ${{ env.CHANGE_LOG_FILE }} | sed -E '/#?#\s*\[/q' | \
83+
{ echo -e '\n## [${{ env.RELEASE_VERSION }}]'; sed '$d'; } >> ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }}
84+
grep -E '#?#\s*\[[0-9]' ${{ env.CHANGE_LOG_FILE }} | head -n1 >> ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }}
85+
sed -E '1,/#?#\s*\[[0-9]/d' ${{ env.CHANGE_LOG_FILE }} >> ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }}
86+
rm ${{ env.CHANGE_LOG_FILE }}
87+
mv ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }} ${{ env.CHANGE_LOG_FILE }}
88+
git add ${{ env.CHANGE_LOG_FILE }}
89+
git commit -m "Changelog update"
90+
91+
- name: Read changelog Entry
92+
id: readChangelogEntry
93+
uses: mindsers/changelog-reader-action@v2
94+
with:
95+
version: ${{ env.RELEASE_VERSION }}
96+
path: ./${{ env.CHANGE_LOG_FILE }}
97+
98+
- name: Create Release
99+
id: createRelease
100+
uses: ncipollo/release-action@v1
101+
with:
102+
tag: ${{ env.RELEASE_VERSION }}
103+
name: Release ${{ env.RELEASE_VERSION }}
104+
body: ${{ steps.readChangelogEntry.outputs.changes }}
105+
106+
- name: Checkout develop branch
107+
uses: actions/checkout@v3
108+
with:
109+
ref: 'develop'
110+
fetch-depth: 0
111+
112+
- name: Merge release branch into develop
113+
id: mergeIntoDevelop
114+
run: |
115+
git merge -m 'Merge master branch into develop after a release' origin/master
116+
git status | (! grep -Fq 'both modified:') || git status | grep -F 'both modified:' \
117+
| { echo -e 'Unable to merge master into develop, merge conflicts:'; (! grep -Eo '[^ ]+$') }
118+
119+
- name: Update version file
120+
id: versionFileUpdate
121+
run: |
122+
export CURRENT_VERSION_VALUE=`echo '${{ env.CURRENT_VERSION }}' | sed -E "s/(.*)/${{ env.VERSION_REPLACE_PATTERN }}/"`
123+
export NEXT_VERSION_VALUE=`echo '${{ env.NEXT_VERSION }}' | sed -E "s/(.*)/${{ env.VERSION_REPLACE_PATTERN }}/"`
124+
sed "s/${CURRENT_VERSION_VALUE}/${NEXT_VERSION_VALUE}/g" ${{ env.VERSION_FILE }} > ${{ env.VERSION_FILE }}${{ env.TMP_SUFFIX }}
125+
rm ${{ env.VERSION_FILE }}
126+
mv ${{ env.VERSION_FILE }}${{ env.TMP_SUFFIX }} ${{ env.VERSION_FILE }}
127+
git add ${{ env.VERSION_FILE }}
128+
git commit -m 'Version update'
129+
git push

.github/workflows/tests.yml

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,61 @@
1+
# Copyright 2022 EPAM Systems
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# https://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
114
name: Tests
215

316
on:
417
push:
518
branches:
6-
- '*'
7-
- '!master'
19+
- '*'
20+
- '!master'
21+
22+
paths-ignore:
23+
- README.md
24+
- README_TEMPLATE.md
25+
- CHANGELOG.md
26+
827
pull_request:
928
branches:
10-
- 'master'
11-
- 'develop'
29+
- 'master'
30+
- 'develop'
1231

1332
jobs:
1433
build:
15-
runs-on: ubuntu-latest
34+
runs-on: ubuntu-20.04
1635
strategy:
1736
matrix:
18-
python-version: ['2.7', '3.6', '3.7', '3.8', '3.9', '3.10']
37+
python-version: [ '2.7', '3.6', '3.7', '3.8', '3.9', '3.10' ]
1938
steps:
20-
- uses: actions/checkout@v2
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v2
23-
with:
24-
python-version: ${{ matrix.python-version }}
25-
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install tox tox-gh-actions
29-
- name: Test with tox
30-
run: tox
31-
- name: Upload coverage to Codecov
32-
if: matrix.python-version == 3.6 && success()
33-
uses: codecov/codecov-action@v1
34-
with:
35-
files: coverage.xml
36-
flags: unittests
37-
name: codecov-client-reportportal
38-
path_to_write_report: codecov_report.txt
39+
- name: Checkout repository
40+
uses: actions/checkout@v3
41+
42+
- name: Set up Python ${{ matrix.python-version }}
43+
uses: actions/setup-python@v4
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
47+
- name: Install dependencies
48+
run: |
49+
python -m pip install --upgrade pip
50+
pip install tox tox-gh-actions
51+
52+
- name: Test with tox
53+
run: tox
54+
55+
- name: Upload coverage to Codecov
56+
if: matrix.python-version == 3.6 && success()
57+
uses: codecov/codecov-action@v3
58+
with:
59+
files: coverage.xml
60+
flags: unittests
61+
name: codecov-client-reportportal

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ target/
7272
.python-version
7373

7474
# virtualenv
75-
venv/
76-
.venv/
75+
venv*/
76+
?venv*/
7777

7878
# pycharm
7979
.idea/

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
rev: v1.0.1
2121
hooks:
2222
- id: rst-linter
23-
- repo: https://gitlab.com/pycqa/flake8.git
24-
rev: 3.9.0
23+
- repo: https://github.com/pycqa/flake8
24+
rev: 5.0.4
2525
hooks:
2626
- id: flake8

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22

33
## [Unreleased]
44
### Fixed
5+
- Issue [#198](https://github.com/reportportal/client-Python/issues/198): Python 3.8+ logging issue, by @HardNorth
6+
- Issue [#200](https://github.com/reportportal/client-Python/issues/200): max_pool_size not worked without retries setting, by @ericscobell
7+
- Issue [#202](https://github.com/reportportal/client-Python/issues/202): TypeError on request make, by @HardNorth
8+
### Changed
9+
- Statistics service rewrite, by @HardNorth
10+
### Removed
11+
- Deprecated code, `service.py` and `LogManager` in `core` package, by @HardNorth
12+
13+
## [5.2.5]
14+
### Fixed
515
- Issue [#194](https://github.com/reportportal/client-Python/issues/194): logging URL generation, by @HardNorth
6-
- Issue [#195](https://github.com/reportportal/client-Python/issues/195): `None` mode exception
16+
- Issue [#195](https://github.com/reportportal/client-Python/issues/195): `None` mode exception, by @HardNorth
717

818
## [5.2.4]
919
### Changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Python versions](https://img.shields.io/pypi/pyversions/reportportal-client.svg)](https://pypi.org/project/reportportal-client)
55
[![Build Status](https://github.com/reportportal/client-Python/actions/workflows/tests.yml/badge.svg)](https://github.com/reportportal/client-Python/actions/workflows/tests.yml)
66
[![codecov.io](https://codecov.io/gh/reportportal/client-Python/branch/master/graph/badge.svg)](https://codecov.io/gh/reportportal/client-Python)
7-
[![Join Slack chat!](https://reportportal-slack-auto.herokuapp.com/badge.svg)](https://reportportal-slack-auto.herokuapp.com)
7+
[![Join Slack chat!](https://slack.epmrpp.reportportal.io/badge.svg)](https://slack.epmrpp.reportportal.io/)
88
[![stackoverflow](https://img.shields.io/badge/reportportal-stackoverflow-orange.svg?style=flat)](http://stackoverflow.com/questions/tagged/reportportal)
99
[![Build with Love](https://img.shields.io/badge/build%20with-❤%EF%B8%8F%E2%80%8D-lightgrey.svg)](http://reportportal.io?style=flat)
1010

reportportal_client/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
from ._local import current
1818
from .logs import RPLogger, RPLogHandler
19-
from .service import ReportPortalService
19+
from .client import RPClient
2020
from .steps import step
2121

2222
__all__ = [
2323
'current',
2424
'RPLogger',
2525
'RPLogHandler',
26-
'ReportPortalService',
26+
'RPClient',
2727
'step',
2828
]

0 commit comments

Comments
 (0)