You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+63Lines changed: 63 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,68 @@
1
1
# Pyttman Changelog
2
2
3
+
V 1.3.2
4
+
5
+
### :star2: News***
6
+
***Removed clutter from log entries**
7
+
8
+
The log entries from Pyttman are now cleaner, without as much clutter for each log entry.
9
+
***New argment to `EntityField` classes available: `post_processor`**
10
+
11
+
The `post_processor` argument allows you to define a function which will be called on the value of the entity after it has been parsed. This is useful for scenarios where you want to clean up the value of the entity, or perform other operations on it before it is stored in `message.entities` in the `respond` method.
12
+
13
+
```python
14
+
classSomeIntent(Intent):
15
+
"""
16
+
In this example, the name will be stripped of any leading or trailing whitespace.
17
+
"""
18
+
name = StringEntityField(default="", post_processor=lambdax: x.strip())
19
+
```
20
+
***All `ability` classes are now available by exact name on the `app` instance**
21
+
22
+
The `app` instance in Pyttman apps now has all`Ability` classes available by their exact name, as defined in the `settings.py`file. This is useful for scenarios where you want to access the `storage`object of an ability, or other properties of the ability.
23
+
24
+
```python
25
+
# ability.py
26
+
class SomeAbility(Ability):
27
+
pass
28
+
29
+
# settings.py
30
+
ABILITIES = [
31
+
"some_ability.SomeAbility"
32
+
]
33
+
34
+
# any file in the project
35
+
from pyttman import app
36
+
37
+
```
38
+
39
+
40
+
### **🐛 Splatted bugs and corrected issues**
41
+
42
+
***Fixed a bug where `LOG_TO_STDOUT` didn't work, and logs were not written to STDOUT:** [#86](https://github.com/dotchetter/Pyttman/issues/86)
43
+
44
+
# V 1.3.1
45
+
46
+
### :star2: News
47
+
***New setting variable: `STATIC_FILES_DIR`**
48
+
49
+
This new setting isset by default inall new apps, and offers a standard way to keep static files in a project.
50
+
All new apps, even ones created with older versions of Pyttman, will have the `static_files` directory
51
+
as part of the app catalog.
52
+
53
+
***Simplified the use of the logger in Pyttman**
54
+
The logger in pyttman offers a simple, ready-to-use logger for your app.
55
+
It offers a decorator previously as`@pyttman.logger.logged_method` which is now simplified to `@pyttman.logger`.
56
+
57
+
58
+
### **🐛 Splatted bugs and corrected issues**
59
+
60
+
***Corrected an issue when using `pyttman runfile` to execute scripts**
61
+
An issue with the relative path to the script file being exeucted has been
62
+
corrected; now, an absolute path can be provided to the script file, and
63
+
the script will be executed as expected.
64
+
**
65
+
3
66
# V 1.3.0.1
4
67
Hotfix release, addressing an issue with PyttmanCLI executing scripts,
5
68
where the directory of the app is included in the path for a script
0 commit comments