Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As noticed with #2086, the dependency management of the UI and REST_API was suboptimal, as it treated the dependencies of these two packages as dependencies of Haystack itself. However, the UI does not even depend on Haystack, while the REST API should install Haystack as their own dependency, rather than the contrary.
As a solution I propose:
Make a
setup.py
file for theui/
folder.pip install ui/
(orpip install .
from theui/
folder).pip install farm-haystack[ui]
.setup.py
file because apparently a package cannot be installed if it lacks bothsetup.py
andpyproject.toml
. Given that both would be basically empty, butsetup.py
is still required for editable installs, I chose to keep onlysetup.py
.Make a
setup.py
for therest_api/
folderpip install rest_api/
(orpip install .
from therest_api/
folder).pip install farm-haystack[rest]
.rest_api
folder.setup.py
instead ofsetup.cfg
, because it needed to look up into the parent directory forfarm-haystack
(something that seeminglysetup.cfg
can't do).On top of the above changes, this PR also updates the Dockerfiles to make use of this new setup. Version information is also aligned with the version of Haystack itself.
Note that for the time being, I left both packages without license information, as they were lacking it before as well. However this might become a trouble for companies. @tholor shall I add an explicit Apache 2.0 to these two packages as well?
Closes #2086