-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update makefile structure and functionality (#3000)
* Updates and changes to the Makefile: 1. Added removal of `frontend` directory inside `src/backend/base/langflow/` and `build` directory inside `src/frontend/` to the `clean_npm_cache` target. 2. Added descriptive comments for the `build_and_install`, `build_and_run`, `fix_codespell`, `setup_poetry`, `unit_tests`, `integration_tests`, and `tests_frontend` targets. Looking forward to your feedback. * Improvements: Structure and Functionality Improvements - Reorganized commands to facilitate understanding of the structure - Enhanced check_tools to detect the Python version - Added a multi-environment script to support check_tools - make init now builds the frontend and runs the application - Aesthetic improvements in output messages TO-DO: - Reorganize container-related commands - Reorganize other miscellaneous utilities - Document usage in the application docs - Prepare the dev environment following the maintainers' recommended practices * Removed pre-commit as it is no longer used. * Restored 'patch' command in Makefile, it updates the 'pyproject.toml' with the new project version. --------- Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]>
- Loading branch information
1 parent
c2b5b98
commit 3e6d3dc
Showing
2 changed files
with
124 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Detect if in a virtual environment (venv or virtualenv) | ||
if [ -n "$VIRTUAL_ENV" ]; then | ||
exec "$@" | ||
# Detect if in a conda environment | ||
elif [ -n "$CONDA_DEFAULT_ENV" ]; then | ||
exec conda run -n "$CONDA_DEFAULT_ENV" "$@" | ||
# Detect if in a pipenv environment | ||
elif [ -f "Pipfile" ]; then | ||
exec pipenv run "$@" | ||
# Detect if in a pyenv environment | ||
elif [ -d ".pyenv" ]; then | ||
exec pyenv exec "$@" | ||
# Detect if in a venv environment | ||
elif [ -f "pyvenv.cfg" ]; then | ||
source bin/activate | ||
exec "$@" | ||
else | ||
exec "$@" | ||
fi |