Skip to content

Commit

Permalink
Add pymarkdown sanity test for core (ansible#81220)
Browse files Browse the repository at this point in the history
* Clean up markdown

* Add pymarkdown sanity test for core

* Update unit test SHA
  • Loading branch information
mattclay authored Jul 11, 2023
1 parent 72e038e commit 876be11
Show file tree
Hide file tree
Showing 30 changed files with 213 additions and 68 deletions.
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
##### SUMMARY

<!--- Describe the change below, including rationale and design decisions -->

<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->

##### ISSUE TYPE

<!--- Pick one below and delete the rest -->

- Bugfix Pull Request
- Docs Pull Request
- Feature Pull Request
- Test Pull Request

##### COMPONENT NAME

<!--- Write the short name of the module, plugin, task or feature below -->

##### ADDITIONAL INFORMATION

<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->

<!--- Paste verbatim command output below, e.g. before and after your change -->

```paste below
```
20 changes: 14 additions & 6 deletions hacking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ ansible from a git checkout using python >= 3.10.

First, set up your environment to run from the checkout:

$ source ./hacking/env-setup
```shell
source ./hacking/env-setup
```

You will need some basic prerequisites installed. If you do not already have them
and do not wish to install them from your operating system package manager, you
can install them from pip

$ easy_install pip # if pip is not already available
$ pip install -r requirements.txt
```shell
easy_install pip # if pip is not already available
pip install -r requirements.txt
```

From there, follow ansible instructions on docs.ansible.com as normal.

Expand All @@ -28,7 +32,9 @@ a module outside of the ansible program, locally, on the current machine.

Example:

$ ./hacking/test-module.py -m lib/ansible/modules/command.py -a "echo hi"
```shell
./hacking/test-module.py -m lib/ansible/modules/command.py -a "echo hi"
```

This is a good way to insert a breakpoint into a module, for instance.

Expand All @@ -45,8 +51,10 @@ parent:
Use:
$ ./hacking/test-module.py -m module \
-a '{"parent": {"child": [{"item": "first", "val": "foo"}, {"item": "second", "val": "bar"}]}}'
```shell
./hacking/test-module.py -m module \
-a '{"parent": {"child": [{"item": "first", "val": "foo"}, {"item": "second", "val": "bar"}]}}'
```
return_skeleton_generator.py
----------------------------
Expand Down
10 changes: 8 additions & 2 deletions hacking/azp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,31 @@ Reducing incidental test coverage, and eventually removing incidental tests invo
1. Run the entire test suite with code coverage enabled.
This is done automatically each day on Azure Pipelines.
The URLs and statuses of the most recent such test runs can be found with:

```shell
hacking/azp/get_recent_coverage_runs.py <optional branch name>
```

The branch name defaults to `devel`.
2. Download code coverage data from Azure Pipelines for local analysis.
Example:

```shell
# download results to ansible/ansible directory under cwd
# substitute the correct run number for the Azure Pipelines coverage run you want to download
hacking/azp/download.py 14075 --artifacts --run-metadata -v
```

3. Analyze code coverage data to see which portions of the code are covered by each test.
Example:
```shell script

```shell
# make sure ansible-test is in $PATH
source hacking/env-setup
# run the script using whichever directory results were downloaded into
hacking/azp/incidental.py 14075/
```

4. Create new intentional tests, or extend existing ones, to cover code that is currently covered by incidental tests.
Reports are created by default in a ``test/results/.tmp/incidental/{hash}/reports/`` directory.
The ``{hash}`` value is based on the input files used to generate the report.
Expand Down Expand Up @@ -90,7 +96,7 @@ If the coverage is for Python code a comment on the right side will indicate the

Below is an example of a report:

```
```text
Target: incidental_win_psexec
GitHub: https://github.com/ansible/ansible/blob/6994ef0b554a816f02e0771cb14341a421f7cead/test/integration/targets/incidental_win_psexec
Expand Down
9 changes: 4 additions & 5 deletions hacking/backport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,25 @@ variable called `GITHUB_TOKEN`.

To generate a Github token, go to https://github.com/settings/tokens/new

### `backport_of_line_adder.py`
## `backport_of_line_adder.py`

This script will attempt to add a reference line ("Backport of ...") to a new
backport PR.

It is called like this:

```
```shell
./backport_of_line_adder.py <backport> <original PR>
```

However, it contains some logic to try to automatically deduce the original PR
for you. You can trigger that logic by making the second argument be `auto`.

```
```shell
./backport_of_line_adder.py 12345 auto
```

... for example, will look for an appropriate reference to add to backport PR
#12345.
... for example, will look for an appropriate reference to add to backport PR #12345.

The script will prompt you before making any changes, and give you a chance to
review the PR that it is about to reference.
Expand Down
17 changes: 13 additions & 4 deletions hacking/deprecated_issue_template.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
##### SUMMARY

%(component)s contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal

```
```text
%(line)s
```

##### ISSUE TYPE
- Bug Report

- Bug Report

##### COMPONENT NAME
```

```text
%(path)s
```

##### ANSIBLE VERSION
```

```text
%(version)s
```

##### CONFIGURATION

N/A

##### OS / ENVIRONMENT

N/A

##### STEPS TO REPRODUCE

N/A

##### EXPECTED RESULTS

N/A

##### ACTUAL RESULTS

N/A
4 changes: 2 additions & 2 deletions hacking/ticket_stubs/bug_internal_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ but this does not seem to match that case.

If you really need a stable API target to use Ansible, consider using ansible-runner:

* https://github.com/ansible/ansible-runner
* https://github.com/ansible/ansible-runner

Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Thank you once again for this and your interest in Ansible!
30 changes: 14 additions & 16 deletions hacking/ticket_stubs/bug_wrong_repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,33 @@ Thanks very much for your interest in Ansible. It means a lot to us.

This appears to be something that should be filed against another project or bug tracker. Here's why:

* FILL IN
* FILL IN

<< CHOOSE AS APPROPRIATE >>

* https://github.com/ansible-community/ansible-lint
* https://github.com/ansible/ansible-runner
* https://github.com/ansible/ansible-navigator
* https://github.com/ansible-community/antsibull
* https://github.com/ansible-community/ara
* https://github.com/ansible/awx
* https://github.com/ansible-collections/community.general
* https://github.com/ansible-community/molecule
* For AAP or Tower licensees report issues via your Red Hat representative or https://issues.redhat.com
* https://github.com/ansible-community/ansible-lint
* https://github.com/ansible/ansible-runner
* https://github.com/ansible/ansible-navigator
* https://github.com/ansible-community/antsibull
* https://github.com/ansible-community/ara
* https://github.com/ansible/awx
* https://github.com/ansible-collections/community.general
* https://github.com/ansible-community/molecule
* For AAP or Tower licensees report issues via your Red Hat representative or https://issues.redhat.com

If you can stop by the tracker or forum for one of those projects, we'd appreciate it.

Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
Should you still wish to discuss things further, or if you disagree with our thought process, please stop by one of our two mailing lists:

* https://groups.google.com/forum/#!forum/ansible-devel
* Matrix: [#devel:ansible.im](https://matrix.to/#/#devel:ansible.im)
* IRC: #ansible-devel on [irc.libera.chat](https://libera.chat/)
* https://groups.google.com/forum/#!forum/ansible-devel
* Matrix: [#devel:ansible.im](https://matrix.to/#/#devel:ansible.im)
* IRC: #ansible-devel on [irc.libera.chat](https://libera.chat/)

We'd be happy to discuss things.

See this page for a complete list of communication channels and their purposes:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Thank you once again!


4 changes: 2 additions & 2 deletions hacking/ticket_stubs/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Thank you very much for your submission to Ansible. It means a lot to us that yo

Since Ansible 2.10 we are no longer accepting new modules/plugins into Ansible core. However, we recommend looking into providing this functionality through Ansible Galaxy via Ansible Collections. You can find more information about collections at:

* https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html.
* https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html.

Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
The mailing list and irc are great ways to ask questions, or post if you don't think this particular issue is resolved.

See this page for a complete and up to date list of communication channels and their purposes:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Thank you once again for this and your interest in Ansible!
5 changes: 2 additions & 3 deletions hacking/ticket_stubs/no_thanks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ Thanks very much for your submission to Ansible. It means a lot to us that you'
Unfortunately, we're not sure if we want this feature in the program, and I don't want this to seem confrontational.
Our reasons for this are:

* (A) INSERT ITEM HERE
* (A) INSERT ITEM HERE

However, we're absolutely always up for discussion.
Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

In the future, sometimes starting a discussion on the development list prior to implementing a feature can make getting things included a little easier, but it's not always necessary.

Thank you once again for this and your interest in Ansible!

5 changes: 2 additions & 3 deletions hacking/ticket_stubs/pr_duplicate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thanks very much for your submission to Ansible. It means a lot to us that you'

It looks like the work from this pull request is a duplicate of the following PR(s):

* INSERT PR(S) HERE
* INSERT PR(S) HERE

Based on this, we are going to close this PR in favor of the above as a consolidated location to keep track of the issue.

Expand All @@ -15,7 +15,6 @@ In the future, sometimes starting a discussion on the development list prior to
Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Thank you once again for this and your interest in Ansible!

2 changes: 1 addition & 1 deletion hacking/ticket_stubs/pr_merged.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ The mailing list and irc are great ways to ask questions, or post if you don't t

See this page for a complete and up to date list of communication channels and their purposes:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Thank you!
7 changes: 3 additions & 4 deletions hacking/ticket_stubs/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ https://github.com/ansible/proposals/blob/master/proposals_process_proposal.md
Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
The mailing list and irc are great ways to ask questions, or post if you don't think this particular issue is resolved.

* #ansible-devel on [irc.libera.chat](https://libera.chat/)
* https://groups.google.com/forum/#!forum/ansible-devel

* #ansible-devel on [irc.libera.chat](https://libera.chat/)
* https://groups.google.com/forum/#!forum/ansible-devel

Or check this page for a more complete list of communication channels and their purposes:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Thank you!
7 changes: 3 additions & 4 deletions hacking/ticket_stubs/question_not_bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ Thanks very much for your interest in Ansible. It means a lot to us.

This appears to be a user question, and we'd like to direct these kinds of things to either the mailing list or the IRC channel.

* IRC: #ansible on [irc.libera.chat](https://libera.chat/)
* mailing list: https://groups.google.com/forum/#!forum/ansible-project
* IRC: #ansible on [irc.libera.chat](https://libera.chat/)
* mailing list: https://groups.google.com/forum/#!forum/ansible-project

See this page for a complete and up to date list of communication channels and their purposes:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If don't you think this particular issue is resolved, you should still stop by there first, we'd appreciate it.
This allows us to keep the issue tracker for bugs, pull requests, RFEs and the like.

Thank you once again and we look forward to seeing you on the list or IRC. Thanks!

2 changes: 1 addition & 1 deletion hacking/ticket_stubs/resolved.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ The mailing list and irc are great ways to ask questions, or post if you don't t

See this page for a complete list of communication channels and their purposes:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Thank you!
11 changes: 5 additions & 6 deletions hacking/ticket_stubs/wider_discussion.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ Thanks very much for your submission to Ansible. It means a lot to us.
We are interested in this idea and would like to see a wider discussion on it on one of our lists.
Reasons for this include:

* INSERT REASONS!
* INSERT REASONS!

Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
Can you please post on ansible-development list so we can talk about this idea with the wider group?

* https://groups.google.com/forum/#!forum/ansible-devel
* Matrix: [#devel:ansible.im](https://matrix.to/#/#devel:ansible.im)
* #ansible-devel on [irc.libera.chat](https://libera.chat/)
* https://groups.google.com/forum/#!forum/ansible-devel
* Matrix: [#devel:ansible.im](https://matrix.to/#/#devel:ansible.im)
* #ansible-devel on [irc.libera.chat](https://libera.chat/)

For other alternatives, check this page for a more complete list of communication channels and their purposes:

* https://docs.ansible.com/ansible/latest/community/communication.html
* https://docs.ansible.com/ansible/latest/community/communication.html

Thank you once again for this and your interest in Ansible!

Loading

0 comments on commit 876be11

Please sign in to comment.