Dependencies management improvement with Pipenv #416
Closed
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.
This PR first fis an issue on the
requirements.txt
as theLangchain
package does not provides thedocarray
extra anymore.WARNING: langchain 0.3.24 does not provide the extra 'docarray'
It's replaced directly with the
docarray
library.Then it adds a new environment and dependencies management, Pipenv.
Pipenv comes like a sort of bundle for
Pip
andvenv
with extra control on dependencies version via alock
file.It may sit between the Anaconda way, which is bulky and requires an extra and the bare Pip + Venv which is more complex and give no control on dependencies versions installed.
So with Pipenv you get on a single command-line command the ability to create an environment, access it and install all required dependencies.
Yes, there are other tools like Poetry, they are powerful but much more than required here and more complex to manage.
Several files has been added:
Pipfile
: Dependencies definition and Python version to be used on the environment.Similar to the Anaconda's
environment.yaml
Pipfile.lock
: Specific versions lock file and its verification hashes.This file ensures everyone gets the same versions installed no matter when they download repository avoiding new version of a given library breaks the project.
SETUP-Pipenv.md
: A documentation on how to install, deploy and use Pipenv.It's a generic document as it's usage is the same along different platforms, but may be included on each platform specific doc if preferred
It also covers a possible issue while installing
chromaDB
that requires MSVC SDK.fix-win-env-prefix/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
: A powershell profile fix to solve a possible issue that prevents the environment name prefix to appear on the terminal.