Skip to content

Commit 13bf37a

Browse files
committed
minor fixes
1 parent bdd6edc commit 13bf37a

File tree

5 files changed

+75
-51
lines changed

5 files changed

+75
-51
lines changed

CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Contributing Guidelines
2+
=========
3+
4+
## Development Environment
5+
6+
[Poetry](https://python-poetry.org) is used for dependency and package management. The steps for setting up the development environment:
7+
8+
1. Install Poetry: either [globally](https://python-poetry.org/docs/#installation), or in a Python virtual environment (using `pip install poetry`).
9+
10+
3. Install the project (if outside a virtual environment, Poetry will create one):
11+
12+
$ poetry install
13+
14+
15+
### Development Checks
16+
17+
During development, a number of checks and tests can be executed on the library codebase:
18+
19+
```shell
20+
$ pylint unclogger/ # code linting
21+
$ mypy --install-types --non-interactive unclogger/ # Python typing analysis
22+
$ black --check . # Python code formatting
23+
$ isort --check . # Import statement optimisation
24+
$ pydocstyle unclogger/ # styling and completeness of docstrings
25+
```
26+
27+
Unit tests can be executed using:
28+
29+
```shell
30+
$ pytest --cov --spec
31+
```
32+
33+
The indicated options add extra details to the report:
34+
35+
* `--cov` adds a test coverage report
36+
* `--spec` formats the test report as a list of spec statementss
37+
38+
39+
## API Documentation
40+
41+
The project documentation can be served locally by running:
42+
43+
```shell
44+
$ mkdocs serve
45+
```
46+
47+
To build the static documentation site, run:
48+
49+
```shell
50+
$ mkdocs build
51+
```
52+
53+
This will create the HTML documentation in the `site` directory.

README.md

Lines changed: 16 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,24 @@
11
Unclogger
22
=========
33

4-
Simple library for customisable structured logging.
4+
Simple Python library for customizable structured logging.
55

6+
## Quick Intro
67

7-
## Development Environment
8-
9-
[Poetry](https://python-poetry.org) is used for dependency and package management. The steps for setting up the development environment:
10-
11-
1. Install Poetry: either [globally](https://python-poetry.org/docs/#installation), or in a Python virtual environment (using `pip install poetry`).
12-
13-
3. Install the project (if outside a virtual environment, Poetry will create one):
14-
15-
$ poetry install
16-
17-
18-
### Development Checks
19-
20-
During development, a number of checks and tests can be executed on the library codebase:
21-
22-
```shell
23-
$ pylint unclogger/ # code linting
24-
$ mypy --install-types --non-interactive unclogger/ # Python typing analysis
25-
$ black --check . # Python code formatting
26-
$ isort --check . # Import statement optimisation
27-
$ pydocstyle unclogger/ # styling and completeness of docstrings
28-
```
29-
30-
Unit tests can be executed using:
31-
32-
```shell
33-
$ pytest --cov --spec
34-
```
35-
36-
The indicated options add extra details to the report:
37-
38-
* `--cov` adds a test coverage report
39-
* `--spec` formats the test report as a list of spec statementss
40-
41-
42-
## API Documentation
43-
44-
The project documentation can be served locally by running:
45-
46-
```shell
47-
$ mkdocs serve
8+
```python
9+
from unclogger import get_logger
10+
logger = get_logger("test logger")
11+
logger.info("test test", foo="abc", bar=123)
4812
```
4913

50-
To build the static documentation site, run:
51-
52-
```shell
53-
$ mkdocs build
14+
Output:
15+
```json
16+
{
17+
"foo": "abc",
18+
"bar": 123,
19+
"event": "test test",
20+
"logger": "test logger",
21+
"level": "info",
22+
"timestamp": "2021-02-12T22:40:07.600385Z"
23+
}
5424
```
55-
56-
This will create the HTML documentation in the `site` directory.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Each logger has a local context; values can be bound to it so they can appear in
105105

106106
## Global Context
107107

108-
The [`context_bind`](reference.md#uncloggerloggercontext_bind) function will set values in the global context, where it can be used by any logger.
108+
The [`context_bind`](reference.md#uncloggerloggercontext_bind) function will set values in the global context, where they can be used by any logger.
109109

110110
!!! Example
111111

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[tool.poetry]
22
name = "unclogger"
33
repository = "https://github.com/berislavlopac/unclogger"
4-
version = "0.1.1"
4+
version = "0.1.2"
55
description = "Custom wrapper for enhanced structured logging."
66
authors = ["Berislav Lopac <[email protected]>"]
7-
readme = "README.md"
7+
readme = "docs/index.md"
88

99
[tool.poetry.dependencies]
1010
python = "^3.8"

release-notes/0.1.2.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* minor fixes
2+
* update README
3+
* introduce CONTRIBUTION guidelines

0 commit comments

Comments
 (0)