|
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 | + class SomeIntent(Intent): |
| 15 | + class EntityParser: |
| 16 | + name = StringEntityField(post_processor=lambda x: x.strip()) |
| 17 | + ``` |
| 18 | +* **All `ability` classes are now available by exact name on the `app` instance** |
| 19 | + |
| 20 | + 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. |
| 21 | + |
| 22 | + ```python |
| 23 | + # ability.py |
| 24 | + class SomeAbility(Ability): |
| 25 | + pass |
| 26 | + |
| 27 | + # settings.py |
| 28 | + ABILITIES = [ |
| 29 | + "some_ability.SomeAbility" |
| 30 | + ] |
| 31 | + |
| 32 | + # any file in the project |
| 33 | + from pyttman import app |
| 34 | + |
| 35 | + ``` |
| 36 | + |
| 37 | + |
| 38 | +### **🐛 Splatted bugs and corrected issues** |
| 39 | + |
| 40 | +* **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) |
| 41 | + |
| 42 | +# V 1.3.1 |
| 43 | + |
| 44 | +### :star2: News |
| 45 | +* **New setting variable: `STATIC_FILES_DIR`** |
| 46 | + |
| 47 | + This new setting is set by default in all new apps, and offers a standard way to keep static files in a project. |
| 48 | + All new apps, even ones created with older versions of Pyttman, will have the `static_files` directory |
| 49 | + as part of the app catalog. |
| 50 | + |
| 51 | +* **Simplified the use of the logger in Pyttman** |
| 52 | + The logger in pyttman offers a simple, ready-to-use logger for your app. |
| 53 | + It offers a decorator previously as `@pyttman.logger.logged_method` which is now simplified to `@pyttman.logger`. |
| 54 | + |
| 55 | + |
| 56 | +### **🐛 Splatted bugs and corrected issues** |
| 57 | + |
| 58 | +* **Corrected an issue when using `pyttman runfile` to execute scripts** |
| 59 | + An issue with the relative path to the script file being exeucted has been |
| 60 | + corrected; now, an absolute path can be provided to the script file, and |
| 61 | + the script will be executed as expected. |
| 62 | +** |
| 63 | + |
3 | 64 | # V 1.3.0.1 |
4 | 65 | Hotfix release, addressing an issue with PyttmanCLI executing scripts, |
5 | 66 | where the directory of the app is included in the path for a script |
|
0 commit comments