PDM plugin that adds default scripts after `pdm init`
Project description
pdm-default-scripts
pdm-default-scripts is a PDM plugin that adds your predefined scripts to new projects right after pdm init.
Installation
Install the plugin into your PDM environment:
pdm self add pdm-default-scripts
Configure default scripts
Create a default-scripts.toml file in your user PDM config directory.
- Linux:
~/.config/pdm/default-scripts.toml - macOS:
~/Library/Application Support/pdm/default-scripts.toml - Windows:
%APPDATA%\\pdm\\default-scripts.toml
Example
[scripts]
test = "pytest"
lint = "ruff check ."
format = "ruff format ."
[scripts.cov]
cmd = "pytest --cov"
env = { PYTHONPATH = "src" }
Usage
- Configure
default-scripts.tomlonce. - Run
pdm initin any new project. - The plugin adds missing entries into
[tool.pdm.scripts]inpyproject.toml.
Existing scripts are not overwritten.
How it behaves
- Runs on the
post_initPDM signal. - Reads
[scripts]from yourdefault-scripts.toml. - Writes scripts into
[tool.pdm.scripts]only when a script name is not already present.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdm_default_scripts-0.1.5.tar.gz.
File metadata
- Download URL: pdm_default_scripts-0.1.5.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.7 CPython/3.12.3 Linux/6.17.0-19-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a209b5c9ef1ecbb06c3c01d2b8e578e06866b69a8ff25a057af4c535560db9dd
|
|
| MD5 |
e43c380d3899b8271f6dd9eec729eff8
|
|
| BLAKE2b-256 |
682527fc067a53229bbbee2185bd1e96dfa1bcd819187a1669f37dd7e44ae90d
|
File details
Details for the file pdm_default_scripts-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pdm_default_scripts-0.1.5-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.7 CPython/3.12.3 Linux/6.17.0-19-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a95ab6dc230af9a5ffeb03034d0c14091938c177c003d7a3968e6a0a0031fce1
|
|
| MD5 |
40ca757c974a9d95cd3b1a19ab48007e
|
|
| BLAKE2b-256 |
3872b56206c1bc04283ba30930a03b1fbe8f5bfbcbee9d9c3ae626279a2fb3d4
|