-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into share-magic-wormhole
- Loading branch information
Showing
16 changed files
with
696 additions
and
693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
name: Semantic Release | ||
name: Semantic Release and PyPi Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
@@ -22,3 +24,20 @@ jobs: | |
repository_password: ${{ secrets.PYPI_TOKEN }} | ||
git_committer_name: "OpenAdapt Bot" | ||
git_committer_email: "[email protected]" | ||
|
||
publish: | ||
needs: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
- name: Build and publish to PyPI | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,47 @@ | |
|
||
|
||
|
||
## v0.7.1 (2023-08-10) | ||
|
||
### Chore | ||
|
||
* chore: add pypi action and oa-atomacos and oa-pynput packages (#456) ([`a62d7f3`](https://github.com/OpenAdaptAI/OpenAdapt/commit/a62d7f3898438b4716e31695d32120b228f84d21)) | ||
|
||
* chore: suppress identical warnings (#389) | ||
|
||
* chore: suppress identical warnings | ||
|
||
* add max_num_warnings_per_second to limit number of allowed warnings per cond | ||
|
||
* remove MAX_NUM_REPEAT_WARNINGS and check for max num warnings per second in utils.py | ||
|
||
* Update openadapt/config.py | ||
|
||
* address linting errors and set new variable | ||
|
||
* use class for filter_log_messages and track message_timestamps with instance variable | ||
|
||
* create logging.py to replace logging class using namespace | ||
|
||
* test github actions with empty commit | ||
|
||
* replaced variable name with MESSAGES_TO_FILTER | ||
|
||
* Update openadapt/logging.py | ||
|
||
--------- | ||
|
||
Co-authored-by: Richard Abrich <[email protected]> ([`7648210`](https://github.com/OpenAdaptAI/OpenAdapt/commit/764821039e3a03cb4dc3ec80b744f61a48c71461)) | ||
|
||
### Fix | ||
|
||
* fix: pypi direct dependency failure (#459) | ||
|
||
* remove trf from toml and then ran `poetry update` | ||
|
||
* update all neccessary files ([`d638469`](https://github.com/OpenAdaptAI/OpenAdapt/commit/d638469e238eb5fb3d386ca2ad8c64542a10c6c9)) | ||
|
||
|
||
## v0.7.0 (2023-07-28) | ||
|
||
### Feature | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"""Module for log message filtering, excluding strings & limiting warnings.""" | ||
|
||
from collections import defaultdict | ||
import time | ||
|
||
from openadapt import config | ||
|
||
MESSAGE_TIMESTAMPS = defaultdict(list) | ||
|
||
# TODO: move utils.configure_logging to here | ||
|
||
|
||
def filter_log_messages(data: dict) -> bool: | ||
"""Filter log messages based on the defined criteria. | ||
Args: | ||
data: The log message data from a loguru logger. | ||
Returns: | ||
bool: True if the log message should not be ignored, False otherwise. | ||
""" | ||
# TODO: ultimately, we want to fix the underlying issues, but for now, | ||
# we can ignore these messages | ||
for msg in config.MESSAGES_TO_FILTER: | ||
if msg in data["message"]: | ||
if config.MAX_NUM_WARNINGS_PER_SECOND > 0: | ||
current_timestamp = time.time() | ||
MESSAGE_TIMESTAMPS[msg].append(current_timestamp) | ||
timestamps = MESSAGE_TIMESTAMPS[msg] | ||
|
||
# Remove timestamps older than 1 second | ||
timestamps = [ | ||
ts | ||
for ts in timestamps | ||
if current_timestamp - ts <= config.WARNING_SUPPRESSION_PERIOD | ||
] | ||
|
||
if len(timestamps) > config.MAX_NUM_WARNINGS_PER_SECOND: | ||
return False | ||
|
||
MESSAGE_TIMESTAMPS[msg] = timestamps | ||
|
||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.