Skip to content

Commit

Permalink
Prepared update version v0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Nakama3942 committed Jul 12, 2023
1 parent dc88354 commit 3a6c367
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 28 deletions.
34 changes: 28 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ print(f"{GetAnsiFormat('reset/on')}Test string")
- Added a new argument to `sort_with_save()`, `search_with_save()`, `select_with_save()` and `export_to_csv()`, through which you can set the name of the file where you want to save the modified/exported logs;
- Moved the `text_buffer` module from the src package to the basic package and hid it from `__init__`, since now there is no need to keep the Buffer object separately due to the presence of new methods in the Logger itself, which provide access to all Buffer methods and, partially, simplify and automate the work with the Buffer;
- Added a new `MessageException` thrown by the entry builder (`BasicLogger._assemble_entry()`) if the message length is less than 10 characters;
- Now it is necessary to enter a message (longer than 10 characters), but it is not necessary to enter the name of the arguments.
- Now it is necessary to enter a message (longer than 10 characters), but it is not necessary to enter the name of the arguments;
- Due to the new search, sorting and selection algorithms, the presence of all parts of the entry is required, and therefore all settings that disable the output of any parts of the string have been removed.

#### Deprecated:
- Any references and functionality about status messages are completely cut out from the entire library:
Expand Down Expand Up @@ -620,17 +621,38 @@ print(f"{GetAnsiFormat('reset/on')}Test string")

---

## Web docs update v0.9.3 ()
## Web docs update v0.9.3 (12.07.2023)

#### Bug Fixes:
- Fixed a bug in the line builder in the PLAIN environment when processing the addition of the `#STATUS: ` line - it was simply forgotten to remove the check for the removed condition.

#### Documentation:
- Moved the documentation from the code to the Web docs (now there is no documentation in the code, except for the `simple_logger` module);
- README, APPLYING and DATA have been rewritten;
- Added EXAMPLE;
- README, APPLYING and DATA have been rewritten in INDEX, HOW TO USE and DATA;
- Added EXAMPLE and LICENSE;
- Rewrote the entire CHANGELOG to the new standard;
- Completed Web docs.

#### Enhancements:
- Added `text_buffer` property to `TextBufferType`;
- Added `get_settings` property to `MightyLogger`;
- Replaced the `might()` method with the `might` property in `Logger`.
- Added `settings` and `buffer` properties to `MightyLogger`;
- Replaced the `might()` method with the `might` property in `Logger`;
- Moved modules from `lib_types_collection` package to `src`;
- Arguments `program_name` and `log_environment` in `MightyLogger` are now required;
- Added redefinition of new operators in Text Buffers: `<` and `>`;
- Changed the behavior of old operators:
- `<` adds a string to the end of the file;
- `>` extracts a string at the given number;
- `<<` loads the Buffer from a file;
- `>>` saves the Buffer to a file.

#### Deprecated:
- Removed package `lib_types_collection`.

#### Security:
- `MightyLogger`, `BasicTextBuffer` and `TextBuffer` are now available outside the library again.

#### Performance:
- Part of the checks in the Text Buffer moved from save/load methods to the constructor to immediately detect a mismatch between the type of environment and the type of Buffer, which leads to optimization of saving/loading and eliminating unexpected behavior when it is possible to use the Buffer with the wrong environment.

---
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The library implements the formation of a beautifully formatted colored text, si

- Device name and registered profile, system name, etc. (this data is displayed only once at the beginning of the logging)
- Log entry time
- Log entry status
- Log entry category
- Log entry type
- Entry message

Expand Down
18 changes: 9 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
project = 'Mighty Logger'
copyright = ' Copyright 2023 Kalynovsky Valentin. All rights reserved.'
author = 'Kalynovsky Valentin'
release = 'v0.9.0'
release = 'v0.9.3'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'recommonmark']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo']

templates_path = ['_templates']
exclude_patterns = []

language = 'en'
master_doc = 'index'

source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
# source_suffix = {
# '.rst': 'restructuredtext',
# '.md': 'markdown',
# }

latex_documents = [
(master_doc, 'project_name.tex', 'Project Name Documentation', 'Your Name', 'manual'),
]
# latex_documents = [
# (master_doc, 'project_name.tex', 'Project Name Documentation', 'Your Name', 'manual'),
# ]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The library implements the formation of a beautifully formatted colored text, si

- Device name and registered profile, system name, etc. (this data is displayed only once at the beginning of the logging)
- Log entry time
- Log entry status
- Log entry category
- Log entry type
- Entry message

Expand Down
22 changes: 14 additions & 8 deletions mighty_logger/mighty_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ def __init__(
else:
raise ReCreationException("Logger class object already created")

# ######################################################################################## #
# #
# Property #
# #
# ######################################################################################## #

@property
def settings(self) -> dict:
return self._settings

@property
def buffer(self) -> list:
return self._buffer.text_buffer

# ######################################################################################## #
# #
# Settings #
Expand Down Expand Up @@ -129,14 +143,6 @@ def set_settings(
if global_background is not None:
self._settings['global_background'] = global_background

@property
def settings(self) -> dict:
return self._settings

@property
def buffer(self) -> list:
return self._buffer.text_buffer

# ######################################################################################## #
# #
# Inputter of Logger #
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ build-backend = "setuptools.build_meta"

[project]
name = "mighty_logger"
version = "0.9.2"
version = "0.9.3"
authors = [
{name = "Kalynovsky 'Nakamura Akira' Valentin", email = "nakama3942@gmail.com"},
]
description = "Powerful functional logger"
description = "Mighty functional logger"
readme = "README.md"
license = {text = "Apache License Version 2.0"}
classifiers = [
Expand All @@ -46,7 +46,6 @@ Releases = "https://github.com/Nakama3942/mighty_logger/releases"
packages = [
'mighty_logger',
'mighty_logger.src',
'mighty_logger.src.lib_types_collection',
'mighty_logger.basic',
'mighty_logger.basic.lib_types'
]

0 comments on commit 3a6c367

Please sign in to comment.