Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions docs/changelogs/1.2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Bug Fixes

:octicons-issue-opened-24: Issue Ref | :fontawesome-solid-thumbtack: Summary | :material-message-text: Description
-|-|-
[No Ref] | Fix duplicated log message in OneCode Cloud environment | From times to times, logger event would be propagated back to the root Logger and therefore be printed twice.


## Enhancements

:octicons-issue-opened-24: Issue Ref | :fontawesome-solid-thumbtack: Summary | :material-message-text: Description
-|-|-


## New Features

:octicons-issue-opened-24: Issue Ref | :fontawesome-solid-thumbtack: Summary | :material-message-text: Description
-|-|-


## :warning: Breaking changes

None
2 changes: 1 addition & 1 deletion docs/reference/cli/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
[INFO] - |OneCode|.check.py:52 - ✅ argparse
[INFO] - |OneCode|.check.py:52 - ✅ importlib
[INFO] - |OneCode|.check.py:52 - ✅ json
[INFO] - |OneCode|.check.py:52 - ✅ onecode (1.2.0)
[INFO] - |OneCode|.check.py:52 - ✅ onecode (1.2.1)
[INFO] - |OneCode|.check.py:52 - ✅ os
```

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ nav:
- Project: reference/base/project.md
- FAQs: faq.md
- Changelogs:
- 1.2.1: changelogs/1.2.1.md
- 1.2.0: changelogs/1.2.0.md
- 1.1.0: changelogs/1.1.0.md
- 1.0.0: changelogs/1.0.0.md
Expand Down
2 changes: 1 addition & 1 deletion onecode/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2023-2024 DeepLime <contact@deeplime.io>
# SPDX-License-Identifier: MIT

__version__ = "1.2.0"
__version__ = "1.2.1"


from .base import *
Expand Down
5 changes: 4 additions & 1 deletion onecode/base/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ def reset(

handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(ColoredFormatter(Project().get_config(ConfigOption.LOGGER_COLOR)))
logging.getLogger(Env.ONECODE_LOGGER_NAME).addHandler(handler)

base_logger = logging.getLogger(Env.ONECODE_LOGGER_NAME)
base_logger.addHandler(handler)
base_logger.propagate = False
self.set_level(logging.INFO)

@check_type
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "onecode"
version = "1.2.0"
version = "1.2.1"
description = "Python skeleton and library for OneCode projects"
readme = "README.md"
authors = ["DeepLime <contact@deeplime.io>"]
Expand Down
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import os

import pytest
Expand All @@ -11,6 +12,8 @@ def clear_project():
del os.environ[Env.ONECODE_PROJECT_DATA]
Project().reset()
Logger().reset()
logger = logging.getLogger(Env.ONECODE_LOGGER_NAME)
logger.propagate = True
Project().mode = Mode.EXECUTE


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cli/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_check_modules():
'msg': None
}

assert modules['onecode']['version'].split('.dev')[0] == "1.2.0"
assert modules['onecode']['version'].split('.dev')[0] == "1.2.1"
assert modules['onecode']['in_env'] is True
assert modules['onecode']['builtin'] is False
assert modules['onecode']['dist_name'] == 'onecode'
Expand Down