10 Commits

Author SHA1 Message Date
Madeesh Kannan
b1760add56
feat: Add support for pipeline deserialization callbacks (#7518)
* feat: Add support for deserialization callbacks

* Lint

* Fix type hint for older Python versions

* Apply suggestions from code review

Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>

* Lint

---------

Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
2024-04-10 17:47:14 +02:00
Silvano Cerza
d6597952a2
fix: Update Component protocol to fix some type checking issues (#7270)
* Update Component protocol to fix some type checking issues

* Add release notes

* Fix logline in test

* Fix run type definition
2024-03-01 10:56:47 +01:00
Tobias Wochinger
fe0ac5c4a2
chore: enforce kwarg logging (#7207)
* chore: add logger which eases logging of extras

* chore: start migrating to key value

* fix: import fixes

* tests: temporarily comment out breaking test

* refactor: move to kwarg based logging

* style: fix import order

* chore: implement self-review comments

* test: drop failing test

* chore: fix more import orders

* docs: add changelog

* tests: fix broken tests

* chore: fix getting the frames

* chore: add comment

* chore: cleanup

* chore: adapt remaining `%s` usages
2024-02-29 14:31:20 +01:00
Silvano Cerza
f1a6b2a78a
feat: Add is_greedy argument in @component decorator (#7016)
* Add is_greedy argument in @component decorator

* Log warning if Component is greedy and non variadic
2024-02-19 12:43:40 +01:00
Silvano Cerza
2f965fb176
feat: Add __repr__ method to all Components (#6927)
* Add __repr__ to show Component I/O

* Add release notes

* Change Component repr to show full module path and name in Pipeline

* Fix linting
2024-02-08 11:46:10 +01:00
Silvano Cerza
0191b1e6e4
feat: Change Component's I/O dunder type (#6916)
* Add Pipeline.get_component_name() method

* Add utility class to ease discoverability of Component I/O

* Move InputOutput in component package

* Rename InputOutput to _InputOutput

* Raise if inputs or outputs field already exist

* Fix tests

* Add release notes

* Move InputSocket and OutputSocket in types package

* Move _InputOutput in socket package

* Rename _InputOutput class to Sockets

* Simplify Sockets class

* Dictch I/O dunder fields in favour of inputs and outputs fields

* Update Sockets docstrings

* Update release notes

* Fix mypy

* Remove unnecessary assignment

* Remove unused logging

* Change SocketsType to SocketsIOType to avoid confusion

* Change sockets type and name

* Change Sockets.__repr__ to return component instance

* Fix linting

* Fix sockets tests

* Revert to dunder fields for Component IO

* Use singular in IO dunder fields

* Delete release notes

* Update haystack/core/component/types.py

Co-authored-by: Massimiliano Pippi <mpippi@gmail.com>

---------

Co-authored-by: Massimiliano Pippi <mpippi@gmail.com>
2024-02-05 17:46:45 +01:00
Silvano Cerza
f5e61338ba
chore: Remove all mentions of Canals (#6844)
* Remove unnecessary Connection class

* Remove all mentions of canals

* Add release notes
2024-01-29 17:26:11 +01:00
Madeesh Kannan
4647f2a506
fix: ComponentMeta.__call__ handles keyword- and positional-only parameters correctly (#6701)
* fix: `ComponentMeta.__call__` handles keyword- and positional-only parameters correctly

* Update release note
2024-01-12 17:16:03 +01:00
Massimiliano Pippi
9ace6bf63d
feat: store input's default value in InputSocket (#6651)
* track default value in sockets

* remove dead code

* include default value in socket description

* add unit test

* add relnote

* unused import

* clarify
2024-01-09 12:17:46 +01:00
Massimiliano Pippi
00e1dd6eb8
chore: rearrange the core package, move tests and clean up (#6427)
* rearrange code

* fix tests

* relnote

* merge test modules

* remove extra

* rearrange draw tests

* forgot

* remove unused import
2023-11-28 09:58:56 +01:00