Skip to content

Commit

Permalink
chore: Template upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jun 22, 2023
1 parent 723f8bc commit ad6170e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 0.15.20
_commit: 0.15.21
_src_path: gh:pawamoy/copier-pdm
author_email: [email protected]
author_fullname: Timothée Mazzucotelli
Expand Down
1 change: 0 additions & 1 deletion .gitpod.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM gitpod/workspace-full
USER gitpod
ENV PIP_USER=no
ENV PYTHON_VERSIONS=
RUN pip3 install pipx; \
pipx install pdm; \
pipx ensurepath
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,19 @@ Run `make help` to see all the available actions!
This project uses [duty](https://github.com/pawamoy/duty) to run tasks.
A Makefile is also provided. The Makefile will try to run certain tasks
on multiple Python versions. If for some reason you don't want to run the task
on multiple Python versions, you can do one of the following:
1. `export PYTHON_VERSIONS= `: this will run the task
with only the current Python version
2. run the task directly with `pdm run duty TASK`
on multiple Python versions, you run the task directly with `pdm run duty TASK`.
The Makefile detects if a virtual environment is activated,
so `make` will work the same with the virtualenv activated or not.
If you work in VSCode,
[see examples of tasks and run configurations](https://pawamoy.github.io/copier-pdm/work/#vscode-setup).
## Development
As usual:
1. create a new branch: `git checkout -b feature-or-bugfix-name`
1. create a new branch: `git switch -c feature-or-bugfix-name`
1. edit the code and/or the documentation
**Before committing:**
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DEFAULT_GOAL := help
SHELL := bash
DUTY := $(if $(VIRTUAL_ENV),,pdm run) duty
export PDM_MULTIRUN_VERSIONS ?= 3.8 3.9 3.10 3.11 3.12

args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
check_quality_args = files
Expand Down
6 changes: 2 additions & 4 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash
set -e

PYTHON_VERSIONS="${PYTHON_VERSIONS-3.8 3.9 3.10 3.11 3.12}"

if ! command -v pdm &>/dev/null; then
if ! command -v pipx &>/dev/null; then
python3 -m pip install --user pipx
Expand All @@ -13,8 +11,8 @@ if ! pdm self list 2>/dev/null | grep -q pdm-multirun; then
pdm install --plugins
fi

if [ -n "${PYTHON_VERSIONS}" ]; then
pdm multirun -vi ${PYTHON_VERSIONS// /,} pdm install -G:all
if [ -n "${PDM_MULTIRUN_VERSIONS}" ]; then
pdm multirun -v pdm install -G:all
else
pdm install -G:all
fi

0 comments on commit ad6170e

Please sign in to comment.