Skip to content

Commit

Permalink
Collapse long sections in bootstrapped READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
sd234678 committed Jan 12, 2024
1 parent bf80b82 commit 323be8a
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .last-exported-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Last exported commit from parent repo: b57aeaf5d7c5e2415726281a50cb812207142125
Last exported commit from parent repo: 7e86c3a08ceba201c906c5f28e28f3f87ccc4684
2 changes: 1 addition & 1 deletion nix-bootstrap.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 2.0
-- see: https://github.com/sol/hpack

name: nix-bootstrap
version: 1.5.3.1
version: 1.5.4.0
author: gchquser
maintainer: [email protected]
copyright: Crown Copyright
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
name: nix-bootstrap
version: 1.5.3.1
version: 1.5.4.0
author: gchquser
maintainer: [email protected]
copyright: Crown Copyright
Expand Down
18 changes: 17 additions & 1 deletion src/Bootstrap/Data/Bootstrappable/Readme.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ instance Bootstrappable Readme where
<> ( [ "",
"## Development Environment",
"",
"<details>",
"<summary>Expand development environment setup instructions</summary>",
"<p>",
"",
"You can work on "
<> unProjectName readmeProjectName
<> " in "
Expand Down Expand Up @@ -123,6 +127,10 @@ instance Bootstrappable Readme where
]
else []
)
<> [ "",
"</p>",
"</details>"
]
<> ( case readmeProjectType of
Elm ElmOptions {..} ->
[""]
Expand Down Expand Up @@ -218,13 +226,21 @@ instance Bootstrappable Readme where
[ "",
"## Project Structure",
"",
"<details>",
"<summary>Expand project structure tree</summary>",
"<p>",
"",
"The following diagram explains how nix-bootstrap has laid out your infrastructure.",
"Feel free to remove this once you're familiar with how it works, or amend it as you grow your project.",
"",
"```plaintext"
]
<> lines (toText . drawTree $ toReasonTree buildPlan)
<> ["```"]
<> [ "```",
"",
"</p>",
"</details>"
]
Nothing -> []
)
<> [ "",
Expand Down
77 changes: 77 additions & 0 deletions test/Bootstrap/Data/Bootstrappable/ReadmeSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ spec = describe "README.md rendering" do

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 2 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -84,6 +88,9 @@ To develop with this project in GitPod, follow the instructions below:

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the project folders; direnv will automatically make the tools available when you `cd` into the project._

</p>
</details>

## Running a Development Server

To run a development server, use the `dev` script defined in `package.json`.
Expand All @@ -108,6 +115,10 @@ This will produce a `dist` directory with a built web app.

## Project Structure

<details>
<summary>Expand project structure tree</summary>
<p>

The following diagram explains how nix-bootstrap has laid out your infrastructure.
Feel free to remove this once you're familiar with how it works, or amend it as you grow your project.

Expand All @@ -123,6 +134,9 @@ Feel free to remove this once you're familiar with how it works, or amend it as
`- sources.nix - This is the interface between nix and the dependencies listed in sources.json.
```

</p>
</details>

## nix-bootstrap

This project was bootstrapped by [nix-bootstrap](https://github.com/gchq/nix-bootstrap/).
Expand Down Expand Up @@ -151,6 +165,10 @@ If you'd like to learn more about how the generated infrastructure works, or hav

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 2 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -180,6 +198,9 @@ To develop with this project in GitPod, follow the instructions below:

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the project folders; direnv will automatically make the tools available when you `cd` into the project._

</p>
</details>

## Using the Repl

You can use the provided Haskell repl by running `cabal repl` in the dev shell.
Expand Down Expand Up @@ -212,6 +233,10 @@ If you'd like to learn more about how the generated infrastructure works, or hav

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 2 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -241,6 +266,9 @@ To develop with this project in GitPod, follow the instructions below:

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the project folders; direnv will automatically make the tools available when you `cd` into the project._

</p>
</details>

## Using your project

1. Generate a cabal file by running `hpack`
Expand Down Expand Up @@ -276,6 +304,10 @@ If you'd like to learn more about how the generated infrastructure works, or hav

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 3 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -320,8 +352,15 @@ _After following the steps above, you will be able to use any of the project's t

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the integrated terminal of Visual Studio Code._

</p>
</details>

## Project Structure

<details>
<summary>Expand project structure tree</summary>
<p>

The following diagram explains how nix-bootstrap has laid out your infrastructure.
Feel free to remove this once you're familiar with how it works, or amend it as you grow your project.

Expand All @@ -337,6 +376,9 @@ Feel free to remove this once you're familiar with how it works, or amend it as
`- sources.nix - This is the interface between nix and the dependencies listed in sources.json.
```

</p>
</details>

## nix-bootstrap

This project was bootstrapped by [nix-bootstrap](https://github.com/gchq/nix-bootstrap/).
Expand All @@ -358,6 +400,10 @@ If you'd like to learn more about how the generated infrastructure works, or hav

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 2 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -387,6 +433,9 @@ To develop with this project in GitPod, follow the instructions below:

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the project folders; direnv will automatically make the tools available when you `cd` into the project._

</p>
</details>

## nix-bootstrap

This project was bootstrapped by [nix-bootstrap](https://github.com/gchq/nix-bootstrap/).
Expand All @@ -408,6 +457,10 @@ If you'd like to learn more about how the generated infrastructure works, or hav

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 2 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -437,6 +490,9 @@ To develop with this project in GitPod, follow the instructions below:

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the project folders; direnv will automatically make the tools available when you `cd` into the project._

</p>
</details>

## Building for Production

To produce a production build as defined in `default.nix`, run `nix-build`.
Expand Down Expand Up @@ -464,6 +520,10 @@ If you'd like to learn more about how the generated infrastructure works, or hav

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 2 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -498,6 +558,9 @@ To develop with this project in GitPod, follow the instructions below:

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the project folders; direnv will automatically make the tools available when you `cd` into the project._

</p>
</details>

## Building for Production

To produce a production build as defined in `default.nix`, run `nix build`.
Expand Down Expand Up @@ -525,6 +588,10 @@ If you'd like to learn more about how the generated infrastructure works, or hav

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 2 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -559,6 +626,9 @@ To develop with this project in GitPod, follow the instructions below:

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the project folders; direnv will automatically make the tools available when you `cd` into the project._

</p>
</details>

## Adding Python Dependencies

To add python dependencies to the project add them to the 'requirements.txt', in the same format seen in Pip projects.
Expand Down Expand Up @@ -595,6 +665,10 @@ If you'd like to learn more about how the generated infrastructure works, or hav

## Development Environment

<details>
<summary>Expand development environment setup instructions</summary>
<p>

You can work on test_name in 2 ways:

* [In GitPod](#use-in-gitpod)
Expand Down Expand Up @@ -624,6 +698,9 @@ To develop with this project in GitPod, follow the instructions below:

_After following the steps above, you will be able to use any of the project's tools mentioned below when in the project folders; direnv will automatically make the tools available when you `cd` into the project._

</p>
</details>

## Adding Python Dependencies

To add python dependencies to the project add them to the 'requirements.txt', in the same format seen in Pip projects.
Expand Down
4 changes: 4 additions & 0 deletions vulnerability-whitelist.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ comment = "pcre2 is only a build-time dependency so we are not vulnerable to thi
["perl"]
comment = "perl is only a build-time dependency so we are not vulnerable to this attack."

["pip"]
cve = ["CVE-2023-5752"]
comment = "Vulnerability is regarding use of pip, not pip itself."

["safe"]
comment = "CVEs refer to F-Secure SAFE browser, not this haskell package."

Expand Down

0 comments on commit 323be8a

Please sign in to comment.