Skip to content

Commit

Permalink
Merge pull request #78 from MEHRSHAD-MIRSHEKARY/refactor/docs-and-build
Browse files Browse the repository at this point in the history
πŸ”¨ πŸ“š Refactor/docs and build
  • Loading branch information
ARYAN-NIKNEZHAD authored Sep 5, 2024
2 parents c5fadd4 + 8d41c70 commit bce3f25
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 6 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
name: Build and Release
runs-on: ubuntu-latest

# This job will only run if the 'test' job from the CI passes
needs: [test]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build package
run: |
poetry build
- name: Publish to PyPI
run: |
poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## Unreleased (2024-09-05)

### πŸš€ CI
- **ci**: Added automated build and release process. ([1a3bb2b](https://github.com/lazarus-org/django_logging/commit/1a3bb2b))
- Added a GitHub Actions workflow for automated build and release.
- Workflow triggers on new tags matching the `v*.*.*` pattern.
- Includes steps to set up Python, install dependencies, and build the package using Poetry.
- Automatically publishes the built package to PyPI using stored PyPI token secrets.
- Ensures the release job only runs after the 'test' job passes successfully.

### βš‘οΈπŸ”¨πŸ“š Refactor
- **docs**: Updated badges in README MarkDown file. ([c82f452](https://github.com/lazarus-org/django_logging/commit/c82f452))
- Added pylint badge to display code quality rating in `README.md`.
- Updated pre-commit badge color.

- **docs**: Updated badges and references in RST docs. ([c82f452](https://github.com/lazarus-org/django_logging/commit/c82f452))
- Added pylint badge to the documentation.
- Updated the settings section in various `.rst` files to reflect recent changes.
- Enhanced documentation for better readability and accuracy.

## v1.0.3 (2024-09-05)
### ✨ Added
- **chore(pyproject)**: Added `python-semantic-release` configuration to automate versioning and releases. (`945c648`)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ The [`django_logging`](https://github.com/lazarus-org/django_logging) is a Djang
![Documentation](https://img.shields.io/readthedocs/django-logging)
![CI Workflow](https://github.com/lazarus-org/django_logging/actions/workflows/ci.yml/badge.svg)
![Supported Python versions](https://img.shields.io/pypi/pyversions/dj-logging)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=yellow)](https://github.com/pre-commit/pre-commit)
![Supported Django versions](https://img.shields.io/pypi/djversions/dj-logging)
![Last Commit](https://img.shields.io/github/last-commit/lazarus-org/django_logging)
![Languages](https://img.shields.io/github/languages/top/lazarus-org/django_logging)
![Open Issues](https://img.shields.io/github/issues/lazarus-org/django_logging)
[![codecov](https://codecov.io/gh/ARYAN-NIKNEZHAD/django_logging/branch/main/graph/badge.svg)](https://codecov.io/gh/ARYAN-NIKNEZHAD/django_logging)
[![pylint](https://img.shields.io/badge/pylint-10/10-brightgreen?logo=python&logoColor=blue)](https://www.pylint.org/)


## Project Detail
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,6 @@ Here are some additional resources that might be helpful:
- `pylint Documentation <https://pylint.pycqa.org/en/latest/>`_
- `Pre-commit Documentation <https://pre-commit.com/>`_

---
----

Thank you for your interest in contributing to `django_logging`! We look forward to your contributions.
6 changes: 5 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ Welcome to django_logging Documentation!
:target: https://django-logging.readthedocs.io/en/latest/
:alt: Documentation

.. image:: https://img.shields.io/badge/pylint-10/10-brightgreen?logo=python&logoColor=blue
:target: https://www.pylint.org/
:alt: Pylint

.. image:: https://img.shields.io/pypi/pyversions/dj-logging
:target: https://pypi.org/project/dj-logging/
:alt: Supported Python versions

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=yellow
:target: https://github.com/pre-commit/pre-commit
:alt: pre-commit

Expand Down
2 changes: 1 addition & 1 deletion docs/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ By default, django_logging will log each level to its own file:

In addition, logs will be displayed in **colorized** mode in the `console`, making it easier to distinguish between different log levels.

That's it! `django_logging` is ready to use. For further customization, refer to the Settings section.
That's it! `django_logging` is ready to use. For further customization, refer to the :doc:`Settings <settings>`.
4 changes: 3 additions & 1 deletion docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Here's a breakdown of the available configuration options:

- **LOG_FILE_FORMATS**: Accepts log levels as keys and format options as values. The format option can be an `int` chosen from predefined options or a user-defined format `str`. Defines the format for log files. Defaults to `1` for all levels.

- **Note**:See the **Available Format Options** below for available formats.
- **Note**:See the `Available Format Options`_ below for available formats.

- **LOG_CONSOLE_LEVEL**: Accepts `str` that is a valid log level. Specifies the log level for console output. Defaults to `'DEBUG'`,

Expand All @@ -70,6 +70,8 @@ Here's a breakdown of the available configuration options:
- **USE_TEMPLATE**: Accepts `bool`. Determines whether the email includes an HTML template. Defaults to `True`.


.. _available_format_options:

Available Format Options
------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Log and Notify Utility
"Email notifier is disabled. Please set the 'ENABLE' option to True in the 'LOG_EMAIL_NOTIFIER' in DJANGO_LOGGING in your settings to activate email notifications."
Additionally, ensure that all required email settings are configured in your Django settings file.
- **Note**: For more detailed configuration options, refer to the [Settings](settings.rst) section.
- **Note**: For more detailed configuration options, refer to the :doc:`Settings <settings>`.

Send Logs Command
-----------------
Expand Down

0 comments on commit bce3f25

Please sign in to comment.