Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.8 #369

Merged
merged 32 commits into from
Jul 3, 2024
Merged

Release v0.8 #369

merged 32 commits into from
Jul 3, 2024

Conversation

RLKRo
Copy link
Member

@RLKRo RLKRo commented Jul 3, 2024

Changelog

General

Features

  • New has_text condition for asserting that specific text is contained inside the last request (Add condition asserting str is in Message.text #335)
  • Validation stage reworked.
    Pipeline.validation_stage, Pipeline.verbose and Context.validation fields are removed.
    Added new type for annotating labels dff.script.ConstLabel (Actor revalidation #289)
  • Functions cnd.exact_match and check_happy_path now accept both Message and str.
    The following are now equivalent: exact_match(Message("text")) == exact_match("text")
    (Make functions accept str along with Message #337)
  • CLIMessengerInterface moved to messengers.console (Telegram interface upgrade #328)
  • Attachments reworked (Telegram interface upgrade #328):
    • Session, Command, Link, Button, Keyboard and Attachments classes removed, Message.commands field removed.
    • Added CallbackQuery, Contact, Invoice, Poll, Animation, Sticker, VoiceMessage, VideoMessage and MediaGroup classes.
    • Added attachment caching feature.
    • Added has_callback_query condition.
    • Removed title field from Data Attachments. Use caption instead.
  • Telegram Messenger interface reworked (Telegram interface upgrade #328):
    • Now provides methods for attachment byte download.
    • Added support for receiving attachment types as members of Message.attachments. Others may be accessed via Message.original_message.
    • Added support for sending new attachment types (Sticker, Poll, e.t.c.).
    • Added support for extra options such as disable_notification, message_effect_id or caption.
    • Telegram tutorials rewritten to reflect all the changes.
  • Added slots that simplify the process of extracting arbitrary data from user messages and accessing it later (Merge slots #36):
    • New user guide and tutorials on slots

Documentation

Contrib

Checklist

  • I have performed a self-review of the changes
  • Rename repos (this; template; demo)
  • Add new logo; change favicons in conf.py (this can be done later)
  • Create new PyPi project and update pypi token
  • Create a new release
  • Make a new release on the final_dff_release branch

RLKRo and others added 26 commits March 12, 2024 13:30
# Description

- Function has_text() added. Checks the 'text' field of last_request(),
if specified text within 'text' field, returns true.
For such a task it's quicker than regexp condition and has less syntax
bloat than exact_match() would have.
This also makes checking telegram callback data easier since it is saved
in the 'text' field: has_text(callback_data).
 - All relevant API reference / tutorials / guides updated.
By that I mean all 'exact_match(Message("Some message"))' was changed
into 'has_text("Some message")'.
 - All relevant references in the codebase updated.
- Tests added, but I'm not sure I did it right. I changed some
exact_match() uses to has_text() there. Well, vim did it, and now I'm
thinking it's maybe preferable, actually.
# Checklist

- [x] I have performed a self-review of the changes
- [x] Check if tests are done right (poetry has no issues, I mean if
exact_match() should return instead of has_text())
# To Consider

- Consider if exact_match() could somehow be used in tandem with
has_text() in the tutorials. It's a part of functionality that new users
can't really see now, since it's rarely used (mostly in telegram
tutorials).

---------

Co-authored-by: Roman Zlobin <[email protected]>
- Removed a duplicate paragraph in CONTRIBUTING.md
Bumps the deps group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [black](https://github.com/psf/black) | `24.2.0` | `24.3.0` |
| [mypy](https://github.com/python/mypy) | `1.8.0` | `1.9.0` |
| [pytest](https://github.com/pytest-dev/pytest) | `8.0.2` | `8.1.1` |
|
[python-on-whales](https://github.com/gabrieldemarmiesse/python-on-whales)
| `0.69.0` | `0.70.0` |
| [uvicorn](https://github.com/encode/uvicorn) | `0.27.1` | `0.28.0` |
| [locust](https://github.com/locustio/locust) | `2.23.1` | `2.24.0` |
| [streamlit](https://github.com/streamlit/streamlit) | `1.31.1` |
`1.32.2` |

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the deps group with 2 updates:
[pytest-cov](https://github.com/pytest-dev/pytest-cov) and
[uvicorn](https://github.com/encode/uvicorn).

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [black](https://github.com/psf/black) from 24.2.0 to 24.3.0.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
# Description

Actor validation made required and also improved.

---------

Co-authored-by: Roman Zlobin <[email protected]>
Some of technical pydantic fields were still included in the docs.
Minor fix and updates to 'Tutorials' and 'API reference'.
- 'API reference' claimed "wrappers" are a parameter of both classes
Pipeline() and Service(), but instead there are "before_handler" and
"after_handler", now updated.
- For the above reason, replaced term "wrapper" with "extra handler"
where appropriate within both tutorials and docs. (user guides required
no changes)
- Similarly and for the same reasons, references of "services" from
class Pipeline() changed to "components" both within docs and tutorials.
(user guides required no changes)
- In tutorial Script/Core:4.Transitions comments had wrong order of
transitions, now fixed.

# Checklist

- [x] I have performed a self-review of the changes

# To Consider

- In dff/stats/utils.py there is a function called get_wrapper_field(),
but wrappers were changed to extra handlers, I think. Is this intended?
- Currently, there are no explanations or links to API within the
tutorials as to what ExtraHandlerBuilder and ExtraHandlerFunction
objects are.
- Search for references to changed entities in the API
reference/tutorials/guides
# Description

- Made `dff.script.conditions.exact_match` and
`dff.utils.testing.common.check_happy_path` accept `str` along with
`Message`
- Tests added for `exact_match()`, but not for `check_happy_path()`.
- Changed all instances of `exact_match(Message("some text"))` to
`exact_match("some text")`
# Checklist

- [x] I have performed a self-review of the changes

# To Consider

- Update tutorials / guides

---------

Co-authored-by: Roman Zlobin <[email protected]>
# Description

Add `quick_test` command which runs tests deselecting `slow` and
`docker` marked items.

# Checklist

- [x] I have performed a self-review of the changes

# To Consider

- Add tests (if functionality is changed)
- Update API reference / tutorials / guides
- Update CONTRIBUTING.md (if devel workflow is changed)
- Update `.ignore` files, scripts (such as `lint`), distribution
manifest (if files are added/deleted)
- Search for references to changed entities in the codebase

---------

Co-authored-by: Alexander Sergeev <[email protected]>
# Description

Replace framework_states dict with a pydantic model FrameworkData.

This makes it clear which data is stored in the field as well as allows
using pydantic validation to process framework data.

# Checklist

- [x] I have performed a self-review of the changes

# To Consider

- Add tests (if functionality is changed)
- Update API reference / tutorials / guides
- Update CONTRIBUTING.md (if devel workflow is changed)
- Update `.ignore` files, scripts (such as `lint`), distribution
manifest (if files are added/deleted)
- Search for references to changed entities in the codebase
freeze otel col version
# Description

- Telegram interface was rewritten and updated to be used with the most
recent `Interface` and `Attachment` classes.
- Added JSONPickle Serialization tools to allow json-serializing pickle-serializable objects.
- Attachments reworked.

---------

Co-authored-by: Roman Zlobin <[email protected]>
Add slots feature

---------

Co-authored-by: Denis Kuznetsov <[email protected]>
Co-authored-by: ruthenian8 <[email protected]>
Co-authored-by: pseusys <[email protected]>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears this PR is a release PR (change its base from master if that is not the case).

Here's a release checklist:

  • Update package version
  • Update poetry.lock
  • Change PR merge option
  • Test modules without automated testing:
    • Requiring telegram api_id and api_hash
    • Requiring HF_API_KEY
  • Search for objects to be deprecated

@RLKRo RLKRo merged commit dfefedb into master Jul 3, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants