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 #247

Merged
merged 34 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
951d00a
Changelog update
autoreportportal Nov 29, 2024
2d1e5d4
Version update
autoreportportal Nov 29, 2024
39fa31c
Drop Python 3.7 support
HardNorth Nov 29, 2024
41d7843
Fix imports
HardNorth Nov 29, 2024
b444b14
Fix warnings
HardNorth Nov 29, 2024
f49eb08
Refactoring
HardNorth Dec 4, 2024
f223bbe
Types refactoring
HardNorth Dec 4, 2024
41a605e
A try to fix circular import
HardNorth Dec 4, 2024
eb26320
Backward compatibility fix
HardNorth Dec 4, 2024
dd8fb95
Circular dependency fix
HardNorth Dec 4, 2024
6f36bcd
Fix typing
HardNorth Dec 4, 2024
834ff47
`helpers.match_with_asterisks` function
HardNorth Dec 10, 2024
5051fc6
Add more tests
HardNorth Dec 10, 2024
1bfaed0
Rewrite `helpers.match_with_asterisks` function to `match_with_glob_p…
HardNorth Dec 10, 2024
6e51b5c
Rewrite `match_with_glob_pattern` function to `translate_glob_to_rege…
HardNorth Dec 11, 2024
60dfd20
Remove generics from functions
HardNorth Dec 11, 2024
6376b30
Remove redundant condition
HardNorth Dec 11, 2024
960cffe
Documentation correction
HardNorth Dec 11, 2024
bbf711b
Add `normalize_caseless`, `caseless_equal` functions in `helpers` module
HardNorth Dec 11, 2024
fffa3f5
Add new hooks
HardNorth Dec 19, 2024
606879e
Hook configuration adjust
HardNorth Dec 19, 2024
34b9baa
CONTRIBUTING.rst converted to CONTRIBUTING.md, rst lint hook removed
HardNorth Dec 19, 2024
3c1b112
Update dev dependencies
HardNorth Dec 19, 2024
579e0f3
Import fixes
HardNorth Dec 19, 2024
5728cb2
Remove dependencies, since they are not compatible with Python 3.8
HardNorth Dec 19, 2024
22919ea
Import fixes
HardNorth Dec 19, 2024
f32cc8a
Fix code style
HardNorth Dec 19, 2024
372cb0e
Fix tests
HardNorth Dec 19, 2024
fc72fd4
Fix tests
HardNorth Dec 19, 2024
553a46f
Fix tests
HardNorth Dec 19, 2024
9f4fece
Update isort to support black
HardNorth Dec 19, 2024
4312f42
Disable E203 of flake8, since conflict with black
HardNorth Dec 19, 2024
8632c00
Fix flake8
HardNorth Dec 19, 2024
1a85627
Add `uuid` argument to `client.RP.start_test_item` method
HardNorth Dec 19, 2024
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
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[flake8]
ignore = E203, W503, E701
exclude = .git,venv,env
max-line-length = 119
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- '.github/**'
- CHANGELOG.md
- README.md
- CONTRIBUTING.rst
- CONTRIBUTING.md

env:
VERSION_FILE: setup.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
17 changes: 11 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,30 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.0.0
rev: 6.3.0
hooks:
- id: pydocstyle
exclude: |
(?x)^(
tests/.*
)
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: rst-linter
- id: black
args: ['reportportal_client', 'tests']
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 7.1.1
hooks:
- id: flake8
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [Unreleased]
### Added
- `match_pattern` and `translate_glob_to_regex`, `normalize_caseless`, `caseless_equal` functions in `helpers` module, by @HardNorth
- `client.RP.start_test_item` method and all its children now accept `uuid` argument, by @HardNorth
### Removed
- `Python 3.7` support, by @HardNorth

## [5.5.10]
### Added
- Official `Python 3.13` support, by @HardNorth
### Fixed
- Issue [#244](https://github.com/reportportal/client-Python/issues/244): Client crash on different error responses, by @HardNorth
Expand Down
136 changes: 136 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Contribution

Contributions are highly welcomed and appreciated.

## Contents

- [Feature requests](#feature-requests)
- [Bug reports](#bug-reports)
- [Bug fixes](#bug-fixes)
- [Implement features](#implement-features)
- [Preparing Pull Requests](#preparing-pull-requests)

## Feature requests

We'd also like to hear about your thoughts and suggestions. Feel free to [submit them as issues](https://github.com/reportportal/client-Python/issues) and:

* Explain in detail how they should work.
* Keep the scope as narrow as possible. It will make it easier to implement.

## Bug reports

Report bugs for the client in the [issue tracker](https://github.com/reportportal/client-Python/issues).

If you are reporting a new bug, please include:

* Your operating system name and version.
* Python interpreter version, installed libraries, and reportportal-client version.
* Detailed steps to reproduce the bug.

## Bug fixes

Look through the [GitHub issues for bugs](https://github.com/reportportal/client-Python/labels/bug).

If you are going to fix any of the existing bugs, assign that bug to yourself and specify preliminary milestones. Talk to [contributors](https://github.com/reportportal/client-Python/graphs/contributors) in case you need consultancy regarding implementation.

## Implement features

Look through the [GitHub issues for enhancements](https://github.com/reportportal/client-Python/labels/enhancement).

Talk to [contributors](https://github.com/reportportal/client-Python/graphs/contributors) in case you need consultancy regarding implementation.

## Preparing Pull Requests

What is a "pull request"? It informs the project's core developers about the changes you want to review and merge. Pull requests are stored on [GitHub servers](https://github.com/reportportal/client-Python/pulls). Once you send a pull request, we can discuss its potential modifications and even add more commits to it later on. There's an excellent tutorial on how Pull Requests work in the [GitHub Help Center](https://help.github.com/articles/using-pull-requests/).

Here is a simple overview below:

1. Fork the [reportportal-client GitHub repository](https://github.com/reportportal/client-Python).

2. Clone your fork locally using [git](https://git-scm.com/) and create a branch:

```sh
$ git clone [email protected]:YOUR_GITHUB_USERNAME/client-Python.git
$ cd client-Python
# now, create your own branch off the "master":
$ git checkout -b your-bugfix-branch-name
```

If you need some help with Git, follow this quick start guide: [https://git.wiki.kernel.org/index.php/QuickStart](https://git.wiki.kernel.org/index.php/QuickStart)

3. Install [pre-commit](https://pre-commit.com) and its hook on the client-Python repo:

**Note: pre-commit must be installed as admin, as it will not function otherwise**:

```sh
$ pip install --user pre-commit
$ pre-commit install
```

Afterwards `pre-commit` will run whenever you commit.

[https://pre-commit.com/](https://pre-commit.com/) is a framework for managing and maintaining multi-language pre-commit hooks to ensure code-style and code formatting is consistent.

4. Install tox

Tox is used to run all the tests and will automatically setup virtualenvs to run the tests in. (will implicitly use [http://www.virtualenv.org/en/latest/](http://www.virtualenv.org/en/latest/)):

```sh
$ pip install tox
```

5. Run all the tests

You need to have Python 3.10 available in your system. Now running tests is as simple as issuing this command:

```sh
$ tox -e pep,py310
```

This command will run tests via the "tox" tool against Python 3.10 and also perform code style checks.

6. You can now edit your local working copy and run the tests again as necessary. Please follow PEP-8 recommendations.

You can pass different options to `tox`. For example, to run tests on Python 3.10 and pass options to pytest (e.g. enter pdb on failure) to pytest you can do:

```sh
$ tox -e py310 -- --pdb
```

Or to only run tests in a particular test module on Python 3.10:

```sh
$ tox -e py310 -- tests/test_service.py
```

When committing, `pre-commit` will re-format the files if necessary.

7. If instead of using `tox` you prefer to run the tests directly, then we suggest to create a virtual environment and use an editable install with the `testing` extra:

```sh
$ python3 -m venv .venv
$ source .venv/bin/activate # Linux
$ .venv/Scripts/activate.bat # Windows
$ pip install -e ".[testing]"
```

Afterwards, you can edit the files and run pytest normally:

```sh
$ pytest tests/test_service.py
```

8. Commit and push once your tests pass and you are happy with your change(s):

```sh
$ git commit -m "<commit message>"
$ git push -u
```

9. Finally, submit a pull request through the GitHub website using this data:

head-fork: YOUR_GITHUB_USERNAME/client-Python
compare: your-branch-name

base-fork: reportportal/client-Python
base: master
145 changes: 0 additions & 145 deletions CONTRIBUTING.rst

This file was deleted.

8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ requires = [
"importlib-metadata"
]
build-backend = "setuptools.build_meta"

[tool.isort]
line_length = 119
profile = "black"

[tool.black]
line-length = 119
target-version = ["py310"]
Loading
Loading