diff --git a/docs/project/contribution_tools.md b/docs/project/contribution_tools.md index bffbb5fbd8ab..8d5e760b2bc6 100644 --- a/docs/project/contribution_tools.md +++ b/docs/project/contribution_tools.md @@ -279,7 +279,7 @@ than a separate install. They are noted here mainly to help findability. [new_proposal.py](/proposals/scripts/new_proposal.py) is a helper for generating the PR and proposal file for a new proposal. It's documented in -[the proposal template](/proposals/template.md). +[the proposal template](/proposals/scripts/template.md). **NOTE**: This requires installing [the gh CLI](#gh). diff --git a/docs/project/evolution.md b/docs/project/evolution.md index b8c1562a5143..6c4cc60b32d8 100644 --- a/docs/project/evolution.md +++ b/docs/project/evolution.md @@ -62,7 +62,7 @@ language are well explained, justified, and reviewed by the community. - Proposals consist of a PR (pull request) in GitHub that adds a document to the [`proposals/` directory](/proposals/) following - [the template](/proposals/template.md). + [the template](/proposals/scripts/template.md). - Proposal PRs start out in draft mode. When proposal PRs are ready, click on ["Ready for review"](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review), @@ -129,7 +129,7 @@ For proposal authors, this should feel like a code review, with some broken out issues for longer discussion: - Create a proposal document and draft PR following - [the template](/proposals/template.md). + [the template](/proposals/scripts/template.md). - [new_proposal.py](/proposals/scripts/new_proposal.py) helps create templated PRs. @@ -285,7 +285,7 @@ the proposal possible. A proposal PR will include a "P-numbered" _proposal document_, `proposals/pNNNN.md`, where `NNNN` is the pull request number. This file should -be based on the [proposal template file](/proposals/template.md). +be based on the [proposal template file](/proposals/scripts/template.md). When writing a proposal, try to keep it brief and focused to maximize the community's engagement in it. Beyond the above structure, try to use diff --git a/proposals/BUILD b/proposals/BUILD deleted file mode 100644 index 5af419f9396a..000000000000 --- a/proposals/BUILD +++ /dev/null @@ -1,9 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -filegroup( - name = "md_files", - srcs = glob(["*.md"]), - visibility = ["//proposals/scripts:__pkg__"], -) diff --git a/proposals/scripts/BUILD b/proposals/scripts/BUILD index b0f9236e677d..b438be6bdf42 100644 --- a/proposals/scripts/BUILD +++ b/proposals/scripts/BUILD @@ -13,7 +13,7 @@ py_binary( py_test( name = "new_proposal_test", srcs = ["new_proposal_test.py"], - data = ["//proposals:md_files"], + data = ["template.md"], python_version = "PY3", deps = [":new_proposal"], ) diff --git a/proposals/scripts/new_proposal.py b/proposals/scripts/new_proposal.py index 0000045b6306..4e877620ac1f 100755 --- a/proposals/scripts/new_proposal.py +++ b/proposals/scripts/new_proposal.py @@ -180,7 +180,7 @@ def main() -> None: _run([git_bin, "push", "-u", "origin", branch]) # Copy template.md to a temp file. - template_path = os.path.join(proposals_dir, "template.md") + template_path = os.path.join(proposals_dir, "scripts/template.md") temp_path = os.path.join(proposals_dir, "new-proposal.tmp.md") shutil.copyfile(template_path, temp_path) _run([git_bin, "add", temp_path]) diff --git a/proposals/scripts/new_proposal_test.py b/proposals/scripts/new_proposal_test.py index b5d9f4ec7d15..7cc3cbb41c4c 100644 --- a/proposals/scripts/new_proposal_test.py +++ b/proposals/scripts/new_proposal_test.py @@ -38,7 +38,8 @@ class TestNewProposal(unittest.TestCase): parsed_args = new_proposal._parse_args(["foo"]) content = new_proposal._fill_template( os.path.join( - new_proposal._get_proposals_dir(parsed_args), "template.md" + new_proposal._get_proposals_dir(parsed_args), + "scripts/template.md", ), "TITLE", 123, diff --git a/proposals/template.md b/proposals/scripts/template.md similarity index 97% rename from proposals/template.md rename to proposals/scripts/template.md index fe849301297e..c8396cbe7692 100644 --- a/proposals/template.md +++ b/proposals/scripts/template.md @@ -24,7 +24,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ## TODO: Initial proposal setup -> TIP: Run `./scripts/new_proposal.py "TITLE"` to do new proposal setup. +> TIP: Run `./new_proposal.py "TITLE"` to do new proposal setup. 1. Copy this template to `new.md`, and create a commit. 2. Create a GitHub pull request, to get a pull request number.