Skip to content

Commit

Permalink
fix: add missing fields for pyproject tool.pdm (#3480)
Browse files Browse the repository at this point in the history
  • Loading branch information
GabDug authored Dec 23, 2023
1 parent 3005e61 commit 207eae6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 33 additions & 1 deletion src/schemas/json/partial-pdm.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,16 @@
}
]
},

"script-help": {
"type": "string",
"description": "Help text for the script",
"examples": ["Run the tests"],
"x-taplo": {
"links": {
"key": "https://pdm-project.org/latest/usage/scripts/#show-the-list-of-scripts"
}
}
},
"pdm-script": {
"anyOf": [
{
Expand All @@ -78,6 +87,9 @@
},
"env_file": {
"$ref": "#/definitions/env-file"
},
"help": {
"$ref": "#/definitions/script-help"
}
}
},
Expand Down Expand Up @@ -105,6 +117,9 @@
},
"env_file": {
"$ref": "#/definitions/env-file"
},
"help": {
"$ref": "#/definitions/script-help"
}
}
},
Expand All @@ -123,6 +138,9 @@
},
"env_file": {
"$ref": "#/definitions/env-file"
},
"help": {
"$ref": "#/definitions/script-help"
}
}
},
Expand All @@ -146,6 +164,9 @@
},
"env_file": {
"$ref": "#/definitions/env-file"
},
"help": {
"$ref": "#/definitions/script-help"
}
}
}
Expand Down Expand Up @@ -422,6 +443,17 @@
}
}
},
"plugins": {
"type": "array",
"description": "List of PDM plugins required for this project",
"items": { "type": "string" },
"examples": [["pdm-packer"]],
"x-taplo": {
"links": {
"key": "https://pdm-project.org/latest/dev/write/#specify-the-plugins-in-project"
}
}
},
"source": {
"type": "array",
"description": "Sources used for package resolution",
Expand Down
2 changes: 2 additions & 0 deletions src/test/pyproject/pdm_tool.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@


[tool.pdm]
plugins = ["sync-pre-commit-lock"]
package-type = "application" # can be library or application
allow_prereleases = true # https://pdm-project.org/latest/usage/config/#allow-prereleases-in-resolution-result
ignore_package_warnings = [
Expand Down Expand Up @@ -44,6 +45,7 @@ _.env_file = ".env" # https://pdm-project.org
start.cmd = "flask run -p 54321"
start.env = { FOO = "bar", FLASK_ENV = "development" }
start.env_file = ".env"
start.help = "Start the server"

start1 = { cmd = "flask run -p 54321", env_file = { override = ".env" } }

Expand Down

0 comments on commit 207eae6

Please sign in to comment.