Skip to content

Commit

Permalink
Release 0.1.4 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyprogrammerblog committed Sep 11, 2022
1 parent fe77e89 commit e28a0e2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
===================================

0.1.4 (2022-09-11)
-------------------

- Improvement in output string.
- Documentation.


0.1.3 (2022-09-11)
-------------------

Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ log = MongoLog.get(uuid=UUID("<your task uuid>"))
assert log.status == "SUCCESS"
```


Settings
----------

There are some possible ways to pass settings to the updater.
There are some possible ways to pass backend settings to the updater.
This is the priority.

1. Passing settings as parameters when creating a `ProgressUpdater` object.
Expand All @@ -101,6 +97,14 @@ export PU__SQL_DSN=postgresql+psycopg2://user:pass@postgres:5432/db
export PU__SQL_TABLE=logs
```

And then when creating a `ProgressUpdater` object, the backend will be
automatically configured.
```python
from progress_updater import ProgressUpdater

with ProgressUpdater(task_name="My Task") as updater:
pass
```

Documentation
--------------
Expand Down
16 changes: 10 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Welcome to progress-updater' documentation!
=============================================


Writing the progress of a task to a backend!

Installation
Expand Down Expand Up @@ -61,7 +60,7 @@ a backend. There are three backends available to save our logs.
2. Redis.
3. SQL.

In you console::
In you console, for example::

from progress_updater.backends import MongoLog
from uuid import UUID
Expand All @@ -70,10 +69,7 @@ In you console::
assert log.status == "SUCCESS"


Settings
----------

There are some possible ways to pass settings to the updater.
There are some possible ways to pass backend settings to the updater.
This is the priority.

1. Passing settings as parameters when creating a `ProgressUpdater` object::
Expand All @@ -96,6 +92,14 @@ The `PU__` prefix indicates that it belongs to `ProgressUpdater`::
export PU__SQL_DSN=postgresql+psycopg2://user:pass@postgres:5432/db
export PU__SQL_TABLE=logs

And then when creating a `ProgressUpdater` object, the backend will be
automatically configured::

from progress_updater import ProgressUpdater

with ProgressUpdater(task_name="My Task") as updater:
pass


.. toctree::
:maxdepth: 2
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 = "progress_updater"
version = "0.1.3"
version = "0.1.4"
description = "Progress Updater"
readme = "README.md"
license = "LICENSE"
Expand Down

0 comments on commit e28a0e2

Please sign in to comment.