Skip to main content

PDM plugin that adds default scripts after `pdm init`

Project description

Github Actions PyPI

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

  1. Configure default-scripts.toml once.
  2. Run pdm init in any new project.
  3. The plugin adds missing entries into [tool.pdm.scripts] in pyproject.toml.

Existing scripts are not overwritten.

How it behaves

  • Runs on the post_init PDM signal.
  • Reads [scripts] from your default-scripts.toml.
  • Writes scripts into [tool.pdm.scripts] only when a script name is not already present.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdm_default_scripts-1.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdm_default_scripts-1.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file pdm_default_scripts-1.0.1.tar.gz.

File metadata

  • Download URL: pdm_default_scripts-1.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.7 CPython/3.14.3 Linux/6.17.0-1008-azure

File hashes

Hashes for pdm_default_scripts-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9433801380e4d1ab952f352d5b21f3c8090b5842066125002c34f47f257898c4
MD5 f95647e4dd01238bb2234e14918a5a72
BLAKE2b-256 20d092fec910413b240adb6c8e32ac6bf52e49f609ed13375b84001ca6e1276c

See more details on using hashes here.

File details

Details for the file pdm_default_scripts-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pdm_default_scripts-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.7 CPython/3.14.3 Linux/6.17.0-1008-azure

File hashes

Hashes for pdm_default_scripts-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63ee37e3c6739d689398e9e7d104e4a56fcf347695432d6ec090d2facdd90a55
MD5 64e4f33a24e21bd2bd58802ca95aa460
BLAKE2b-256 a724eb01734bca2f9f7395969eefd7e897cbcf40b6114c5b128cd931fa74fbd4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page