diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..126fa34 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,58 @@ +name: Bug Report +description: Report broken or incorrect behaviour +labels: unconfirmed bug +body: + - type: markdown + attributes: + value: > + Thanks for taking the time to fill out a bug. + Please note that this form is for bugs only! + - type: input + attributes: + label: Summary + description: A simple summary of your bug report + validations: + required: true + - type: textarea + attributes: + label: Reproduction Steps + description: > + What you did to make it happen. + validations: + required: true + - type: textarea + attributes: + label: Minimal Reproducible Code + description: > + A short snippet of code that showcases the bug. + render: python + - type: textarea + attributes: + label: Expected Results + description: > + What did you expect to happen? + validations: + required: true + - type: textarea + attributes: + label: Actual Results + description: > + What actually happened? + validations: + required: true + - type: checkboxes + attributes: + label: Checklist + description: > + Let's make sure you've properly done due diligence when reporting this issue! + options: + - label: I have searched the open issues for duplicates. + required: true + - label: I have shown the entire traceback, if possible. + required: true + - label: I have removed my token from display, if visible. + required: true + - type: textarea + attributes: + label: Additional Context + description: If there is anything else to say, please do so here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..9674e3a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,47 @@ +name: Feature Request +description: Suggest a feature for this library +labels: feature request +body: + - type: input + attributes: + label: Summary + description: > + A short summary of what your feature request is. + validations: + required: true + - type: dropdown + attributes: + multiple: false + label: What is the feature request for? + options: + - The core library + - The documentation + validations: + required: true + - type: textarea + attributes: + label: The Problem + description: > + What problem is your feature trying to solve? + What becomes easier or possible when this feature is implemented? + validations: + required: true + - type: textarea + attributes: + label: The Ideal Solution + description: > + What is your ideal solution to the problem? + What would you like this feature to do? + validations: + required: true + - type: textarea + attributes: + label: The Current Solution + description: > + What is the current solution to the problem, if any? + validations: + required: false + - type: textarea + attributes: + label: Additional Context + description: If there is anything else to say, please do so here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100755 index 0000000..88be1e1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Summary + + + +## Checklist +- [ ] If code changes were made, then they have been tested. + - [ ] I have updated the documentation to reflect the changes. +- [ ] I have thought about how this code may affect other services. + +- [ ] This PR fixes an issue. +- [ ] This PR adds something new (e.g. new method or parameters). +- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed) +- [ ] This PR is **not** a code change (e.g. documentation, README, ...) + +## Reviewer +- [ ] I understand that approving this code, I am also responsible for it going into the codebase. diff --git a/.github/pull_request_template b/.github/pull_request_template deleted file mode 100755 index 0bbb275..0000000 --- a/.github/pull_request_template +++ /dev/null @@ -1,9 +0,0 @@ -## Description - -## Checklist -#### PR Submitter -- [ ] I have thought about how this code may affect other services. -- [ ] This code is better than I found it. - -#### Reviewer -- [ ] I understand that approving this code, I am also responsible for it going into the codebase. diff --git a/README.md b/README.md index 0ba37bf..cc3004e 100755 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ logger.warning("This is a warning example") -# Context Manager Support +# Context Manager Support (slow but if you want immediate, deterministic cleanup for a specific scope) All logger types support context managers for automatic resource cleanup and exception safety: @@ -385,7 +385,7 @@ audit_logger.info("User admin logged in") ``` ## Env Variables (Optional | Production) -.env variables can be used by leaving all options blank when calling the function +The .env variables file can be used by leaving all options blank when calling the function If not specified inside the .env file, it will use the dafault value This is a good approach for production environments, since options can be changed easily ```python diff --git a/pyproject.toml b/pyproject.toml index 8b9deae..10ce02d 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,10 +2,9 @@ requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api" - [tool.poetry] name = "pythonLogs" -version = "4.0.2" +version = "4.0.3" description = "High-performance Python logging library with file rotation and optimized caching for better performance" license = "MIT" readme = "README.md" @@ -31,51 +30,43 @@ classifiers = [ "Natural Language :: English", ] - [tool.poetry.dependencies] python = "^3.10" pydantic = "^2.11.7" pydantic-settings = "^2.10.1" python-dotenv = "^1.1.1" - [tool.poetry.group.test.dependencies] coverage = "^7.9.2" poethepoet = "^0.36.0" psutil = "^7.0.0" pytest = "^8.4.1" +[tool.poe.tasks] +_test = "coverage run -m pytest -v" +_coverage_report = "coverage report" +_coverage_xml = "coverage xml" +tests = ["_test", "_coverage_report", "_coverage_xml"] +test = ["tests"] [tool.poetry.group.test] optional = true - [tool.black] line-length = 120 skip-string-normalization = true - [tool.pytest.ini_options] markers = [ "slow: marks tests as slow (deselect with '-m \"not slow\"')" ] - [tool.coverage.run] omit = [ "tests/*", ] - [tool.coverage.report] exclude_lines = [ "pragma: no cover", ] - - -[tool.poe.tasks] -_test = "coverage run -m pytest -v" -_coverage_report = "coverage report" -_coverage_xml = "coverage xml" -tests = ["_test", "_coverage_report", "_coverage_xml"] -test = ["tests"]