Skip to main content

PDM plugin that adds default scripts after `pdm init`

Project description

Github Actions

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-0.1.5.tar.gz (3.0 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-0.1.5-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

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

Hashes for pdm_default_scripts-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a209b5c9ef1ecbb06c3c01d2b8e578e06866b69a8ff25a057af4c535560db9dd
MD5 e43c380d3899b8271f6dd9eec729eff8
BLAKE2b-256 682527fc067a53229bbbee2185bd1e96dfa1bcd819187a1669f37dd7e44ae90d

See more details on using hashes here.

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

Hashes for pdm_default_scripts-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a95ab6dc230af9a5ffeb03034d0c14091938c177c003d7a3968e6a0a0031fce1
MD5 40ca757c974a9d95cd3b1a19ab48007e
BLAKE2b-256 3872b56206c1bc04283ba30930a03b1fbe8f5bfbcbee9d9c3ae626279a2fb3d4

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