mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 15:41:02 -05:00
Update Dependabot for python virtual envs
* Simplify virtualenv installation to use multiple requirements files in a single directory. This eliminates the packages.txt file and provides an easier path to adding new tools in the future. It also allows us to simplify the dependenabot configuration as all requirements files are in a single directory. * Update dependabot.yml to point to the new Python dependencies folder.
This commit is contained in:
parent
fc6c5b34d9
commit
7e1683407d
16 changed files with 5 additions and 21 deletions
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
|
@ -33,7 +33,7 @@ updates:
|
||||||
|
|
||||||
# Maintain dependencies for python with pip
|
# Maintain dependencies for python with pip
|
||||||
- package-ecosystem: "pip"
|
- package-ecosystem: "pip"
|
||||||
directory: "/dependencies"
|
directory: "/dependencies/python/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
11
dependencies/python/build-venvs.sh
vendored
11
dependencies/python/build-venvs.sh
vendored
|
@ -21,15 +21,12 @@ pip install virtualenv
|
||||||
#########################################################
|
#########################################################
|
||||||
# Itterate through requirments.txt to install bainaries #
|
# Itterate through requirments.txt to install bainaries #
|
||||||
#########################################################
|
#########################################################
|
||||||
while read -r LINE; do
|
for DEP_FILE in *.txt; do
|
||||||
# split the package name from its version
|
# split the package name from its version
|
||||||
PACKAGE_NAME=$(cut -d'=' -f1 <<<"${LINE}")
|
PACKAGE_NAME=${DEP_FILE%.txt}
|
||||||
if [[ "${PACKAGE_NAME}" == *"["* ]]; then
|
|
||||||
PACKAGE_NAME=$(cut -d'[' -f1 <<<"${PACKAGE_NAME}")
|
|
||||||
fi
|
|
||||||
echo "-------------------------------------------"
|
echo "-------------------------------------------"
|
||||||
mkdir -p "/venvs/${PACKAGE_NAME}"
|
mkdir -p "/venvs/${PACKAGE_NAME}"
|
||||||
cp "${PACKAGE_NAME}/requirements.txt" "/venvs/${PACKAGE_NAME}/requirements.txt"
|
cp "${DEP_FILE}" "/venvs/${PACKAGE_NAME}/requirements.txt"
|
||||||
echo "Generating virtualenv for: [${PACKAGE_NAME}]"
|
echo "Generating virtualenv for: [${PACKAGE_NAME}]"
|
||||||
pushd "/venvs/${PACKAGE_NAME}"
|
pushd "/venvs/${PACKAGE_NAME}"
|
||||||
virtualenv .
|
virtualenv .
|
||||||
|
@ -40,4 +37,4 @@ while read -r LINE; do
|
||||||
deactivate
|
deactivate
|
||||||
# pop the stack
|
# pop the stack
|
||||||
popd
|
popd
|
||||||
done <packages.txt
|
done
|
||||||
|
|
13
dependencies/python/packages.txt
vendored
13
dependencies/python/packages.txt
vendored
|
@ -1,13 +0,0 @@
|
||||||
ansible-lint[core]
|
|
||||||
black
|
|
||||||
cfn-lint
|
|
||||||
cpplint
|
|
||||||
flake8
|
|
||||||
isort
|
|
||||||
mypy
|
|
||||||
pylint
|
|
||||||
snakefmt
|
|
||||||
snakemake
|
|
||||||
sqlfluff
|
|
||||||
yamllint
|
|
||||||
yq
|
|
Loading…
Reference in a new issue