Skip to content

Commit

Permalink
Make poetry check detect missing authors property (python-poetry#437
Browse files Browse the repository at this point in the history
)

* Add authors as required property

* Fix existing tests

Co-authored-by: Bartosz Sokorski <b.sokorski@gmail.com>
  • Loading branch information
2 people authored and bostonrwalker committed Aug 29, 2022
1 parent 9ba1cbd commit 55e070d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/poetry/core/json/schemas/poetry-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"required": [
"name",
"version",
"description"
"description",
"authors"
],
"properties": {
"name": {
Expand Down
2 changes: 2 additions & 0 deletions tests/json/test_poetry_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def base_object() -> dict[str, Any]:
"name": "myapp",
"version": "1.0.0",
"description": "Some description.",
"authors": ["Your Name <you@example.com>"],
"dependencies": {"python": "^3.6"},
"dev-dependencies": {},
}
Expand All @@ -24,6 +25,7 @@ def multi_url_object() -> dict[str, Any]:
"name": "myapp",
"version": "1.0.0",
"description": "Some description.",
"authors": ["Your Name <you@example.com>"],
"dependencies": {
"python": [
{
Expand Down
2 changes: 2 additions & 0 deletions tests/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def test_validate_without_strict_fails_only_non_strict() -> None:
"'name' is a required property",
"'version' is a required property",
"'description' is a required property",
"'authors' is a required property",
],
"warnings": [],
}
Expand All @@ -225,6 +226,7 @@ def test_validate_strict_fails_strict_and_non_strict() -> None:
"'name' is a required property",
"'version' is a required property",
"'description' is a required property",
"'authors' is a required property",
'Script "a_script_with_unknown_extra" requires extra "foo" which is not'
" defined.",
"Declared README files must be of same type: found text/markdown,"
Expand Down

0 comments on commit 55e070d

Please sign in to comment.