Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
chore: auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2022
1 parent 9511b27 commit d3919f5
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 86 deletions.
4 changes: 2 additions & 2 deletions docs/changelog-fragments.d/161.misc.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Added [Sphinx][sphinx] documentation generator and set up the CI
infrastructure for it -- by {user}`webknjaz`
Added [Sphinx][sphinx] documentation generator and set up the CI infrastructure
for it -- by {user}`webknjaz`

[sphinx]: https://github.com/twisted/towncrier
6 changes: 3 additions & 3 deletions docs/changelog-fragments.d/164.doc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Dropped the brackets from the changelog titles for the release sections.
We now don't strictly follow the release notes format suggested by
[Keep a Changelog][keepachangelog] -- by {user}`webknjaz`
Dropped the brackets from the changelog titles for the release sections. We now
don't strictly follow the release notes format suggested by [Keep a
Changelog][keepachangelog] -- by {user}`webknjaz`

[keepachangelog]: https://keepachangelog.com/en/1.1.0/
4 changes: 2 additions & 2 deletions docs/changelog-fragments.d/165.doc.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Replaced all the credits in the changelog with a dedicated Sphinx role
-- by {user}`webknjaz`
Replaced all the credits in the changelog with a dedicated Sphinx role -- by
{user}`webknjaz`
4 changes: 2 additions & 2 deletions docs/changelog-fragments.d/169.misc.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Fixed a half-baked change in the GitHub Actions CI/CD workflow job
that is used in branch protection -- by {user}`webknjaz`
Fixed a half-baked change in the GitHub Actions CI/CD workflow job that is used
in branch protection -- by {user}`webknjaz`
81 changes: 36 additions & 45 deletions docs/changelog-fragments.d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,41 @@

## Adding change notes with your PRs

It is very important to maintain a log for news of how
updating to the new version of the software will affect
end-users. This is why we enforce collection of the change
fragment files in pull requests as per
[Towncrier philosophy][towncrier-philosophy].

The idea is that when somebody makes a change, they must record
the bits that would affect end-users only including information
that would be useful to them. Then, when the maintainers publish
a new release, they'll automatically use these records to compose
a change log for the respective version. It is important to
understand that including unnecessary low-level implementation
related details generates noise that is not particularly useful
to the end-users most of the time. And so such details should be
recorded in the Git history rather than a changelog.
It is very important to maintain a log for news of how updating to the new
version of the software will affect end-users. This is why we enforce collection
of the change fragment files in pull requests as per [Towncrier
philosophy][towncrier-philosophy].

The idea is that when somebody makes a change, they must record the bits that
would affect end-users only including information that would be useful to them.
Then, when the maintainers publish a new release, they'll automatically use
these records to compose a change log for the respective version. It is
important to understand that including unnecessary low-level implementation
related details generates noise that is not particularly useful to the end-users
most of the time. And so such details should be recorded in the Git history
rather than a changelog.

## Alright! So how do I add a news fragment?

To submit a change note about your PR, add a text file into the
`docs/changelog-fragments.d/` folder. It should contain an
explanation of what applying this PR will change in the way
end-users interact with the project. One sentence is usually
enough but feel free to add as many details as you feel necessary
for the users to understand what it means.

**Use the past tense** for the text in your fragment because,
combined with others, it will be a part of the "news digest"
telling the readers **what changed** in a specific version of
the library *since the previous version*. You should also use
[MyST Markdown][myst-md] syntax for highlighting code (inline or block),
linking parts of the docs or external sites.
At the end, sign your change note by adding ```-- by
{user}`github-username``` (replace `github-username` with
your own!).

Finally, name your file following the convention that Towncrier
understands: it should start with the number of an issue or a
PR followed by a dot, then add a patch type, like `feature`,
`bugfix`, `doc`, `misc` etc., and add `.md` as a suffix. If you
need to add more than one fragment, you may add an optional
sequence number (delimited with another period) between the type
and the suffix.
`docs/changelog-fragments.d/` folder. It should contain an explanation of what
applying this PR will change in the way end-users interact with the project. One
sentence is usually enough but feel free to add as many details as you feel
necessary for the users to understand what it means.

**Use the past tense** for the text in your fragment because, combined with
others, it will be a part of the "news digest" telling the readers **what
changed** in a specific version of the library _since the previous version_. You
should also use [MyST Markdown][myst-md] syntax for highlighting code (inline or
block), linking parts of the docs or external sites. At the end, sign your
change note by adding `` -- by {user}`github-username `` (replace
`github-username` with your own!).

Finally, name your file following the convention that Towncrier understands: it
should start with the number of an issue or a PR followed by a dot, then add a
patch type, like `feature`, `bugfix`, `doc`, `misc` etc., and add `.md` as a
suffix. If you need to add more than one fragment, you may add an optional
sequence number (delimited with another period) between the type and the suffix.

## Examples for changelog entries adding to your Pull Requests

Expand All @@ -58,23 +51,21 @@ Added a `{user}` role to Sphinx config -- by {user}`webknjaz`
File `docs/changelog-fragments.d/116.feature.md`:

```md
Added support for nested module options (suboptions)
-- by {user}`tomaciazek`
Added support for nested module options (suboptions) -- by {user}`tomaciazek`
```

File `docs/changelog-fragments.d/140.bugfix.md`:

```md
Implemented opening standalone Ansible files that have no workspace
associated -- by {user}`ganeshrn`
Implemented opening standalone Ansible files that have no workspace associated
-- by {user}`ganeshrn`
```

```{tip}
See `pyproject.toml` for all available categories
(`tool.towncrier.type`).
```

[myst-md]:
https://myst-parser.rtfd.io/en/latest/syntax/syntax.html
[myst-md]: https://myst-parser.rtfd.io/en/latest/syntax/syntax.html
[towncrier-philosophy]:
https://towncrier.rtfd.io/en/actual-freaking-docs/#philosophy
https://towncrier.rtfd.io/en/actual-freaking-docs/#philosophy
2 changes: 2 additions & 0 deletions docs/contributing/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- markdownlint-disable first-line-heading -->

```{include} ../../.github/CODE_OF_CONDUCT.md
```
25 changes: 13 additions & 12 deletions docs/contributing/guidelines.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- markdownlint-disable first-line-heading -->

```{spelling}
de
facto
Expand All @@ -9,12 +10,13 @@ Towncrier
```

```{include} ../../.github/CONTRIBUTING.md
```

# Contributing docs

We use [Sphinx][sphinx] to generate our docs website. You can trigger
the process locally by executing:
We use [Sphinx][sphinx] to generate our docs website. You can trigger the
process locally by executing:

```shell-session
$ tox -e build-docs
Expand All @@ -38,21 +40,20 @@ _______________________________________________________ summary ________________
congratulations :)
```

It is also integrated with [Read The Docs][rtd] that builds and
publishes each commit to the main branch and generates live
docs previews for each pull request.
It is also integrated with [Read The Docs][rtd] that builds and publishes each
commit to the main branch and generates live docs previews for each pull
request.

The sources of the [Sphinx][sphinx] documents use reStructuredText as a
de-facto standard. But in order to make contributing docs more
beginner-friendly, we have integrated [MyST parser][myst] allowing us
to also accept new documents written in an extended version of
Markdown that supports using Sphinx directives and roles.
{ref}`Read the docs <myst:intro/writing>` to learn more on how
to use it.
The sources of the [Sphinx][sphinx] documents use reStructuredText as a de-facto
standard. But in order to make contributing docs more beginner-friendly, we have
integrated [MyST parser][myst] allowing us to also accept new documents written
in an extended version of Markdown that supports using Sphinx directives and
roles. {ref}`Read the docs <myst:intro/writing>` to learn more on how to use it.

[myst]: https://pypi.org/project/myst-parser/
[rtd]: https://readthedocs.org
[sphinx]: https://www.sphinx-doc.org

```{include} ../changelog-fragments.d/README.md
```
2 changes: 2 additions & 0 deletions docs/contributing/security.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<!-- markdownlint-disable first-line-heading -->

```{spelling}
backport
```

```{include} ../../.github/SECURITY.md
```
42 changes: 22 additions & 20 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

A demo of the setup can be found [on youtube](https://youtu.be/LsvWsX7Mbo8).

It is recommended to work on the forked copy of this repository from your
github account to raise pull requests.
It is recommended to work on the forked copy of this repository from your github
account to raise pull requests.

```bash
git clone git@github.com:<your-github-id>/ansible-language-server.git
Expand All @@ -17,49 +17,50 @@ git checkout -b <name_of_branch> upstream/main

## Running & debugging the language-server with VS Code

* Install dependent packages within ansible-language-server root directory
- Install dependent packages within ansible-language-server root directory

```console
ansible-language-server$ npm install .
```

This will install the dependent modules under `node_modules` folder within
the current directory.
This will install the dependent modules under `node_modules` folder within the
current directory.

* Clone the repository containing the VS Code extension code into the
`vscode-ansible` directory *next to* the root directory of this repository.
- Clone the repository containing the VS Code extension code into the
`vscode-ansible` directory _next to_ the root directory of this repository.

```bash
cd ..
git clone git@github.com:ansible/vscode-ansible.git
cd vscode-ansible
```

* Open a new VS Code window and add folder to workspace
- Open a new VS Code window and add folder to workspace
`File -> Add folder to workspace` and add `vscode-ansible` and
`ansible-language-server` folders to the workspace

* Once the language server and `vscode-ansible/` directory is prepared,
compile both client and server using command
- Once the language server and `vscode-ansible/` directory is prepared, compile
both client and server using command

```bash
npm run compile:withserver
```

* In the Run and debug window select **Client + Server (source)** configuration
and start debugging `Run -> Start Debugging`. This will open up a new VS Code window
which is the `Extension development Host` window.
- In the Run and debug window select **Client + Server (source)** configuration
and start debugging `Run -> Start Debugging`. This will open up a new VS Code
window which is the `Extension development Host` window.

* In the `Extension development Host` window add a new folder that has ansible files.
- In the `Extension development Host` window add a new folder that has ansible
files.

* You can set the ansible-language-server settings by adding
- You can set the ansible-language-server settings by adding
`.vscode/settings.json` file under the root folder. Example settings:

```json
{
"ansible.python.interpreterPath": "<change to python3 executable path>",
"ansible.ansible.path": "<change to ansible executable path>",
"ansibleServer.trace.server": "verbose"
"ansible.python.interpreterPath": "<change to python3 executable path>",
"ansible.ansible.path": "<change to ansible executable path>",
"ansibleServer.trace.server": "verbose"
}
```

Expand All @@ -73,8 +74,9 @@ modes.
### Building server locally

1. Install prerequisites:
* latest [Visual Studio Code](https://code.visualstudio.com/)
* [Node.js](https://nodejs.org/) v12.0.0 or higher

- latest [Visual Studio Code](https://code.visualstudio.com/)
- [Node.js](https://nodejs.org/) v12.0.0 or higher

2. Fork and clone this repository

Expand Down

0 comments on commit d3919f5

Please sign in to comment.