Skip to content

Commit

Permalink
Merge branch 'develop' into rp-client-async
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Sep 25, 2023
2 parents 7aee6eb + 7f25d4b commit 9f84968
Show file tree
Hide file tree
Showing 23 changed files with 105 additions and 103 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Changelog

## [Unreleased]

## [5.4.1]
### Changed
- Unified ReportPortal product naming, by @HardNorth
- `RPClient` internal item stack implementation changed to `LifoQueue` to maintain concurrency better, by @HardNorth
### Removed
- Unused `delayed_assert` dependency, by @HardNorth
Expand Down
27 changes: 13 additions & 14 deletions reportportal_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
"""
Copyright (c) 2022 https://reportportal.io .
# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
"""This package is the base package for ReportPortal client."""

# noinspection PyProtectedMember
from reportportal_client._local import current
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/_local/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""ReportPortal client context storing and retrieving module."""

# Copyright (c) 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""ReportPortal client context storing and retrieving module."""

from threading import local

__INSTANCES = local()
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/aio/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module contains asynchronous implementation of ReportPortal Client."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module contains asynchronous implementation of ReportPortal Client."""

import asyncio
import logging
import ssl
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module contains ReportPortal Client interface and synchronous implementation class."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module contains ReportPortal Client interface and synchronous implementation class."""

import logging
import queue
import sys
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/core/rp_file.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module contains classes representing RP file object."""

# Copyright (c) 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module contains classes representing RP file object."""

import uuid


Expand Down
27 changes: 13 additions & 14 deletions reportportal_client/core/rp_issues.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

"""This module includes classes representing RP issues.
Issues are reported within the test item result PUT call. One issue can be
Expand Down Expand Up @@ -26,20 +39,6 @@
}
"""

# Copyright (c) 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License


class Issue:
"""This class represents an issue that can be attached to test result."""

Expand Down
14 changes: 7 additions & 7 deletions reportportal_client/core/rp_requests.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
"""This module includes classes representing RP API requests.
Detailed information about requests wrapped up in that module
can be found by the following link:
https://github.com/reportportal/documentation/blob/master/src/md/src/DevGuides/reporting.md
"""

# Copyright (c) 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,6 +11,13 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module includes classes representing RP API requests.
Detailed information about requests wrapped up in that module
can be found by the following link:
https://github.com/reportportal/documentation/blob/master/src/md/src/DevGuides/reporting.md
"""

import asyncio
import json as json_converter
import logging
Expand Down
14 changes: 7 additions & 7 deletions reportportal_client/core/rp_responses.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
"""This module contains models for the RP response objects.
Detailed information about responses wrapped up in that module
can be found by the following link:
https://github.com/reportportal/documentation/blob/master/src/md/src/DevGuides/reporting.md
"""

# Copyright (c) 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,6 +11,13 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module contains models for the RP response objects.
Detailed information about responses wrapped up in that module
can be found by the following link:
https://github.com/reportportal/documentation/blob/master/src/md/src/DevGuides/reporting.md
"""

import logging
from json import JSONDecodeError
from typing import Any, Optional, Generator, Mapping, Tuple
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/core/worker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module contains worker that makes non-blocking HTTP requests."""

# Copyright (c) 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module contains worker that makes non-blocking HTTP requests."""

import logging
import queue
import threading
Expand Down
28 changes: 15 additions & 13 deletions reportportal_client/helpers.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
"""This module contains common functions-helpers of the client and agents.
Copyright (c) 2022 https://reportportal.io .
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

"""This module contains common functions-helpers of the client and agents."""

import asyncio
import inspect
import json
Expand Down
12 changes: 6 additions & 6 deletions reportportal_client/logs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

"""ReportPortal logging handling module."""

import logging
Expand Down Expand Up @@ -101,12 +102,11 @@ def __init__(self, level=logging.NOTSET, filter_client_logs=False,
:param level: level of logging
:param filter_client_logs: if True throw away logs emitted by a
ReportPortal client
:param endpoint: ReportPortal endpoint URL, used to filter
out urllib3 logs, mutes ReportPortal HTTP logs if set, optional
parameter
:param ignored_record_names: a tuple of record names which will be
filtered out by the handler (with startswith method)
ReportPortal client
:param endpoint: ReportPortal endpoint URL, used to filter out urllib3 logs, mutes
ReportPortal HTTP logs if set, optional parameter
:param ignored_record_names: a tuple of record names which will be filtered out by the handler
(with startswith method)
"""
super(RPLogHandler, self).__init__(level)
self.filter_client_logs = filter_client_logs
Expand Down
1 change: 1 addition & 0 deletions reportportal_client/logs/batcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

import logging
import threading
from typing import List, Optional, TypeVar, Generic
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/logs/log_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module contains management functionality for processing logs."""

# Copyright (c) 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module contains management functionality for processing logs."""

import logging
import queue
from threading import Lock
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/services/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This package contains different service interfaces."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,3 +10,5 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

"""This package contains different service interfaces."""
4 changes: 2 additions & 2 deletions reportportal_client/services/client_id.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module generates and store unique client ID of an instance."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module generates and store unique client ID of an instance."""

import configparser
import io
import logging
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/services/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module contains constants for the external services."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module contains constants for the external services."""

import base64
import os

Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/services/statistics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module sends statistics events to a statistics service."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module sends statistics events to a statistics service."""

import ssl
import certifi
import logging
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/static/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This package provides common static objects and variables."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,3 +10,5 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

"""This package provides common static objects and variables."""
4 changes: 2 additions & 2 deletions reportportal_client/static/abstract.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module provides base abstract class for RP request objects."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module provides base abstract class for RP request objects."""

from abc import ABCMeta as _ABCMeta, abstractmethod

__all__ = ["AbstractBaseClass", "abstractmethod"]
Expand Down
4 changes: 2 additions & 2 deletions reportportal_client/static/defines.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module provides RP client static objects and variables."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module provides RP client static objects and variables."""

import aenum as enum


Expand Down
3 changes: 1 addition & 2 deletions reportportal_client/static/errors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""This module includes exceptions used by the client."""

# Copyright (c) 2023 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License

"""This module includes exceptions used by the client."""

class RPExceptionBase(Exception):
"""General exception for the package."""
Expand Down
Loading

0 comments on commit 9f84968

Please sign in to comment.