Skip to content

vpayno/python-template

Repository files navigation

python-template

actionlint git json linkcheck markdown proselint spellcheck woke yaml

python python-dependency-update

My Python repo template.

RunMe Playbook

This and other readme files in this repo are RunMe Playbooks.

Use this playbook step/task to update the RunMe cli.

If you don't have runme installed, you'll need to copy/paste the command. :)

go install github.com/stateful/runme/v3@v3

Install Playbook dependencies:

go install github.com/charmbracelet/gum@latest

Using PDM

  • Installing PDM

Use this runme playbook task will either install or update pdm.

set -ex

if [[ -z ${PYENV_ROOT} ]]; then
    pip install --user --upgrade pdm
else
    pip install --upgrade pdm
fi
printf "\n"
  • Setup PDM

Use this runme playbook task to setup the project's virtual env.

set -ex

if [[ ! -d .venv ]]; then
    # pdm venv create
    pdm use "$(which python)"
    printf "\n"
fi

pdm venv list
printf "\n"

pdm lock
printf "\n"

pdm sync
printf "\n"
  • Using PDM's virtual env

Use this runme playbook task to sync the project's virtual env.

set -ex

if [[ ! -d .venv ]]; then
    pdm venv create
    printf "\n"
fi

pdm venv list
printf "\n"

pdm sync
printf "\n"
  • Update project dependencies

Use this runme playbook task to update the projects dependencies.

set -ex

pdm sync
printf "\n"

pdm outdated
printf "\n"

pdm update
printf "\n"

git add pdm.lock
git commit -m 'chore: update dependencies'
git lg origin/main..

About

My Python repo template

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published