Bläddra i källkod

Remove proposals/BUILD, moving template.md under scripts (#846)

With #842 there's not as much reason for the BUILD anymore, maybe move the template.md file and get rid of it?
Jon Meow 4 år sedan
förälder
incheckning
563201a849

+ 1 - 1
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
 [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 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).
 **NOTE**: This requires installing [the gh CLI](#gh).
 
 

+ 3 - 3
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
 -   Proposals consist of a PR (pull request) in GitHub that adds a document to
     the [`proposals/` directory](/proposals/) following
     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
 -   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),
     ["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:
 issues for longer discussion:
 
 
 -   Create a proposal document and draft PR following
 -   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
     -   [new_proposal.py](/proposals/scripts/new_proposal.py) helps create
         templated PRs.
         templated PRs.
@@ -285,7 +285,7 @@ the proposal possible.
 
 
 A proposal PR will include a "P-numbered" _proposal document_,
 A proposal PR will include a "P-numbered" _proposal document_,
 `proposals/pNNNN.md`, where `NNNN` is the pull request number. This file should
 `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
 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
 community's engagement in it. Beyond the above structure, try to use

+ 0 - 9
proposals/BUILD

@@ -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__"],
-)

+ 1 - 1
proposals/scripts/BUILD

@@ -13,7 +13,7 @@ py_binary(
 py_test(
 py_test(
     name = "new_proposal_test",
     name = "new_proposal_test",
     srcs = ["new_proposal_test.py"],
     srcs = ["new_proposal_test.py"],
-    data = ["//proposals:md_files"],
+    data = ["template.md"],
     python_version = "PY3",
     python_version = "PY3",
     deps = [":new_proposal"],
     deps = [":new_proposal"],
 )
 )

+ 1 - 1
proposals/scripts/new_proposal.py

@@ -180,7 +180,7 @@ def main() -> None:
     _run([git_bin, "push", "-u", "origin", branch])
     _run([git_bin, "push", "-u", "origin", branch])
 
 
     # Copy template.md to a temp file.
     # 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")
     temp_path = os.path.join(proposals_dir, "new-proposal.tmp.md")
     shutil.copyfile(template_path, temp_path)
     shutil.copyfile(template_path, temp_path)
     _run([git_bin, "add", temp_path])
     _run([git_bin, "add", temp_path])

+ 2 - 1
proposals/scripts/new_proposal_test.py

@@ -38,7 +38,8 @@ class TestNewProposal(unittest.TestCase):
         parsed_args = new_proposal._parse_args(["foo"])
         parsed_args = new_proposal._parse_args(["foo"])
         content = new_proposal._fill_template(
         content = new_proposal._fill_template(
             os.path.join(
             os.path.join(
-                new_proposal._get_proposals_dir(parsed_args), "template.md"
+                new_proposal._get_proposals_dir(parsed_args),
+                "scripts/template.md",
             ),
             ),
             "TITLE",
             "TITLE",
             123,
             123,

+ 1 - 1
proposals/template.md → proposals/scripts/template.md

@@ -24,7 +24,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 
 ## TODO: Initial proposal setup
 ## 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.
 1. Copy this template to `new.md`, and create a commit.
 2. Create a GitHub pull request, to get a pull request number.
 2. Create a GitHub pull request, to get a pull request number.