Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add PDM configuration support to pyproject.toml schema #627

Closed

Conversation

ElayGelbart
Copy link

PDM Support to pyproject.toml Schema

🎯 Objective

This PR introduces comprehensive support for PDM (Python Development Master) configurations in the pyproject.toml schema. It aims to validate all current PDM settings while maintaining flexibility for future additions.

🛠 Changes

  • Added a new pdm object to the tool section of the schema
  • Implemented support for all current PDM configurations
  • Designed the schema to be flexible for future PDM features
  • Enabled validation for custom top-level PDM configurations

💡 Motivation

PDM is gaining popularity as a Python package and dependency manager. Adding support for PDM in the pyproject.toml schema will greatly improve the user experience for PDM users working with the Even Better TOML extension.

📘 Example

The new schema supports configurations like:

[tool.pdm.scripts]
start = { cmd = "python app.py", env = { DEBUG = "1" } }
test = { composite = ["pytest", "flake8"] }

[tool.pdm.dev-dependencies]
test = ["pytest", "pytest-cov"]

[[tool.pdm.source]]
name = "private"
url = "https://private.pypi.org/simple"
verify_ssl = true

[tool.pdm.resolution]
allow-prereleases = true
respect-source-order = true

# Custom or future configurations
[tool.pdm.custom_section]
custom_key = "custom_value"

🙏 Resources

Based on the official PDM documentation.


💬 Feedback and suggestions are welcome!

@panekj
Copy link
Collaborator

panekj commented Jul 5, 2024

Schemas are defined in https://github.com/SchemaStore/schemastore/

@panekj
Copy link
Collaborator

panekj commented Jul 18, 2024

Closing since taplo uses schemas from schemastore

@panekj panekj closed this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants