From e61512ce7e07af843215a3eb0be45ea7f81d95f2 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 20 Mar 2024 09:20:14 -0500 Subject: [PATCH 1/7] Add azure: build_id to schema --- conda_smithy/data/conda-forge.json | 13 +++++++++++++ conda_smithy/data/conda-forge.yml | 1 + conda_smithy/schema.py | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/conda_smithy/data/conda-forge.json b/conda_smithy/data/conda-forge.json index 35ff828d6..76825bf03 100644 --- a/conda_smithy/data/conda-forge.json +++ b/conda_smithy/data/conda-forge.json @@ -83,6 +83,19 @@ "description": "The name of the Azure Pipelines project", "title": "Project Name" }, + "build_id": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Build ID for the specific feedstock", + "title": "Build Id" + }, "upload_packages": { "anyOf": [ { diff --git a/conda_smithy/data/conda-forge.yml b/conda_smithy/data/conda-forge.yml index 6dd82f56f..760ea722a 100644 --- a/conda_smithy/data/conda-forge.yml +++ b/conda_smithy/data/conda-forge.yml @@ -1,6 +1,7 @@ appveyor: image: Visual Studio 2017 azure: + build_id: null force: false free_disk_space: false max_parallel: 50 diff --git a/conda_smithy/schema.py b/conda_smithy/schema.py index bf124271f..72ff8d5ca 100644 --- a/conda_smithy/schema.py +++ b/conda_smithy/schema.py @@ -172,6 +172,11 @@ class AzureConfig(BaseModel): description="The name of the Azure Pipelines project", ) + build_id: Optional[int] = Field( + default=None, + description="The Build ID for the specific feedstock", + ) + upload_packages: Optional[bool] = Field( default=True, description="Whether to upload the packages to Anaconda.org. Useful for testing.", From 7ab60edbfb12ed04132de735a456045762ef2b4c Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 20 Mar 2024 09:22:48 -0500 Subject: [PATCH 2/7] add news --- news/1871-build-id-azure.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/1871-build-id-azure.rst diff --git a/news/1871-build-id-azure.rst b/news/1871-build-id-azure.rst new file mode 100644 index 000000000..bad18e0fc --- /dev/null +++ b/news/1871-build-id-azure.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Added missing ``azure: build_id`` into the json schema. (#1871) + +**Security:** + +* From 8ed07e3138eae9fca80f1eb304d5f6ae1e6f318f Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 20 Mar 2024 10:41:40 -0500 Subject: [PATCH 3/7] more docs --- conda_smithy/schema.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conda_smithy/schema.py b/conda_smithy/schema.py index 72ff8d5ca..db1929c1e 100644 --- a/conda_smithy/schema.py +++ b/conda_smithy/schema.py @@ -174,7 +174,13 @@ class AzureConfig(BaseModel): build_id: Optional[int] = Field( default=None, - description="The Build ID for the specific feedstock", + description=cleandoc(""" + The build ID for the specific feedstock used for rendering the badges in the + README file generated. When the value is None, conda-smithy will compute the + build ID by calling the Azure API which requires a token for private azure + projects. + """ + ), ) upload_packages: Optional[bool] = Field( From d1df0f6797098e2ffae77735b294722c502a7216 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:44:28 +0000 Subject: [PATCH 4/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- conda_smithy/schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conda_smithy/schema.py b/conda_smithy/schema.py index db1929c1e..44f9e1e36 100644 --- a/conda_smithy/schema.py +++ b/conda_smithy/schema.py @@ -174,7 +174,8 @@ class AzureConfig(BaseModel): build_id: Optional[int] = Field( default=None, - description=cleandoc(""" + description=cleandoc( + """ The build ID for the specific feedstock used for rendering the badges in the README file generated. When the value is None, conda-smithy will compute the build ID by calling the Azure API which requires a token for private azure From fe428a5a022758c70cd4105f20c9aef62acd46bf Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 20 Mar 2024 10:49:51 -0500 Subject: [PATCH 5/7] regen --- conda_smithy/data/conda-forge.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_smithy/data/conda-forge.json b/conda_smithy/data/conda-forge.json index 76825bf03..4039e5533 100644 --- a/conda_smithy/data/conda-forge.json +++ b/conda_smithy/data/conda-forge.json @@ -93,7 +93,7 @@ } ], "default": null, - "description": "The Build ID for the specific feedstock", + "description": "The build ID for the specific feedstock used for rendering the badges in the\nREADME file generated. When the value is None, conda-smithy will compute the\nbuild ID by calling the Azure API which requires a token for private azure\nprojects.", "title": "Build Id" }, "upload_packages": { From e84513b6e07bb0a49803267ca63ba646bfddcfd5 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 20 Mar 2024 10:52:16 -0500 Subject: [PATCH 6/7] formatting --- conda_smithy/schema.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conda_smithy/schema.py b/conda_smithy/schema.py index 44f9e1e36..81559f4f1 100644 --- a/conda_smithy/schema.py +++ b/conda_smithy/schema.py @@ -176,11 +176,11 @@ class AzureConfig(BaseModel): default=None, description=cleandoc( """ - The build ID for the specific feedstock used for rendering the badges in the - README file generated. When the value is None, conda-smithy will compute the - build ID by calling the Azure API which requires a token for private azure - projects. - """ + The build ID for the specific feedstock used for rendering the badges in the + README file generated. When the value is None, conda-smithy will compute the + build ID by calling the Azure API which requires a token for private azure + projects. + """ ), ) From 84ab74137e633c7037eefa79ef84a85dcffec9ec Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 20 Mar 2024 11:19:21 -0500 Subject: [PATCH 7/7] clarify docs --- conda_smithy/data/conda-forge.json | 4 ++-- conda_smithy/schema.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/conda_smithy/data/conda-forge.json b/conda_smithy/data/conda-forge.json index 4039e5533..41e2c7828 100644 --- a/conda_smithy/data/conda-forge.json +++ b/conda_smithy/data/conda-forge.json @@ -146,7 +146,7 @@ } ], "default": null, - "description": "The name of the GitHub user or organization, if passed with the GithubConfig provider, must comply with the value of the user_or_org field", + "description": "The name of the Azure user or organization. Defaults to the value of github: user_or_org.", "title": "User Or Org" }, "store_build_artifacts": { @@ -720,7 +720,7 @@ } ], "default": "conda-forge", - "description": "The name of the GitHub user or organization, if passed with the AzureConfig provider, must comply with the value of the user_or_org field", + "description": "The name of the GitHub user or organization", "title": "User Or Org" }, "repo_name": { diff --git a/conda_smithy/schema.py b/conda_smithy/schema.py index 81559f4f1..e3da668c5 100644 --- a/conda_smithy/schema.py +++ b/conda_smithy/schema.py @@ -217,8 +217,8 @@ class AzureConfig(BaseModel): user_or_org: Optional[Union[str, Nullable]] = Field( default=None, - description="The name of the GitHub user or organization, if passed with " - "the GithubConfig provider, must comply with the value of the user_or_org field", + description="The name of the Azure user or organization. Defaults to the " + "value of github: user_or_org.", exclude=True, # Will not be rendered in the model dump since we check if it was # set or not ) @@ -240,8 +240,7 @@ class GithubConfig(BaseModel): model_config: ConfigDict = ConfigDict(extra="forbid") user_or_org: Optional[str] = Field( - description="The name of the GitHub user or organization, \ - if passed with the AzureConfig provider, must comply with the value of the user_or_org field", + description="The name of the GitHub user or organization", default="conda-forge", ) repo_name: Optional[str] = Field(