add dev setup script
This commit is contained in:
parent
3654ab3c8d
commit
44dd613715
30
devenvsetup.sh
Normal file
30
devenvsetup.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
python_version=$1
|
||||
gitlab_user=$2
|
||||
gitlab_personal_access_token=$3
|
||||
|
||||
# cookiecutter https://gitlab.knecon.com/knecon/research/template-python-project.git --checkout master
|
||||
# latest_dir=$(ls -td -- */ | head -n 1) # should be the dir cookiecutter just created
|
||||
|
||||
# cd $latest_dir
|
||||
|
||||
pyenv install $python_version
|
||||
pyenv local $python_version
|
||||
pyenv shell $python_version
|
||||
|
||||
pip install --upgrade pip
|
||||
pip install poetry
|
||||
|
||||
poetry config installer.max-workers 10
|
||||
# research package registry
|
||||
poetry config repositories.gitlab-research https://gitlab.knecon.com/api/v4/groups/19/-/packages/pypi
|
||||
poetry config http-basic.gitlab-research ${gitlab_user} ${gitlab_personal_access_token}
|
||||
# redactmanager package registry
|
||||
poetry config repositories.gitlab-red https://gitlab.knecon.com/api/v4/groups/12/-/packages/pypi
|
||||
poetry config http-basic.gitlab-red ${gitlab_user} ${gitlab_personal_access_token}
|
||||
|
||||
poetry env use $(pyenv which python)
|
||||
poetry install --with=dev
|
||||
poetry update
|
||||
|
||||
source .venv/bin/activate
|
||||
Loading…
x
Reference in New Issue
Block a user