Skip to content

Add shell completions for molecule inside execution environment #509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

syaghoubi00
Copy link
Contributor

@syaghoubi00 syaghoubi00 commented Dec 30, 2024

Add shell completion for molecule, as it does not use flags that are picked up by argcomplete. Includes tests for added completions and the ability to test future completion additions.

@syaghoubi00 syaghoubi00 requested a review from a team as a code owner December 30, 2024 01:39
@syaghoubi00 syaghoubi00 changed the title feat: add shell completions for molecule enhancement: add shell completions for molecule Dec 30, 2024
@abhikdps abhikdps added enhancement New feature or request and removed feature labels Dec 30, 2024
@syaghoubi00 syaghoubi00 force-pushed the feat-molecule-completions branch from e9c15f1 to 1ab069c Compare December 30, 2024 19:15
Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add a test (pytest) that checks that auto completion works?

@syaghoubi00
Copy link
Contributor Author

I went ahead and added a test for the completions as requested. It was my first foray into writing a pytest, so there is likely room for improvement.

I wasn't sure on the best approach for testing the completions, since I was thinking there might have to be some user input simulation to try to recreate tab completion. I ended up just checking if the completion function was available, however, this is an indirect test.

It should be easy to include more completions to test for, in the event more are added in the future. But they would need to be in the form that is read by the type command.

- pydoclint-DOC502: Remove the Raise section in the docstring since
it wasn't an explicit raise condition
-pylint-W0621: Don't rename scopes

Signed-off-by: Sebastian Yaghoubi <[email protected]>
@syaghoubi00 syaghoubi00 requested a review from ssbarnea January 9, 2025 23:46
@ssbarnea ssbarnea changed the title enhancement: add shell completions for molecule Add shell completions for molecule inside execution environment Jan 21, 2025
@audgirka audgirka marked this pull request as draft January 21, 2025 14:52
audgirka and others added 12 commits February 2, 2025 20:31
Bumps [ansible-navigator](https://github.com/ansible/ansible-navigator) from 24.12.0 to 25.1.0.
- [Release notes](https://github.com/ansible/ansible-navigator/releases)
- [Changelog](https://github.com/ansible/ansible-navigator/blob/main/CHANGELOG.md)
- [Commits](ansible/ansible-navigator@v24.12.0...v25.1.0)

---
updated-dependencies:
- dependency-name: ansible-navigator
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pytest-ansible](https://github.com/ansible/pytest-ansible) from 24.12.0 to 25.1.0.
- [Release notes](https://github.com/ansible/pytest-ansible/releases)
- [Changelog](https://github.com/ansible/pytest-ansible/blob/main/HISTORY.md)
- [Commits](ansible/pytest-ansible@v24.12.0...v25.1.0)

---
updated-dependencies:
- dependency-name: pytest-ansible
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tox-ansible](https://github.com/ansible/tox-ansible) from 24.12.0 to 25.1.0.
- [Release notes](https://github.com/ansible/tox-ansible/releases)
- [Commits](ansible/tox-ansible@v24.12.0...v25.1.0)

---
updated-dependencies:
- dependency-name: tox-ansible
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [molecule](https://github.com/ansible-community/molecule) from 24.12.0 to 25.1.0.
- [Release notes](https://github.com/ansible-community/molecule/releases)
- [Commits](ansible/molecule@v24.12.0...v25.1.0)

---
updated-dependencies:
- dependency-name: molecule
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ble#525)

Bumps [ansible-dev-environment](https://github.com/ansible/ansible-dev-environment) from 24.12.0 to 25.1.0.
- [Release notes](https://github.com/ansible/ansible-dev-environment/releases)
- [Commits](ansible/ansible-dev-environment@v24.12.0...v25.1.0)

---
updated-dependencies:
- dependency-name: ansible-dev-environment
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fixes a problem that prevented their update because 'lock' dependency
was included when the "deps" hook did run, preventing their update.
ssbarnea and others added 10 commits February 2, 2025 20:33
Bumps [ansible-compat](https://github.com/ansible/ansible-compat) from 24.10.0 to 25.1.0.
- [Release notes](https://github.com/ansible/ansible-compat/releases)
- [Commits](ansible/ansible-compat@v24.10.0...v25.1.0)

---
updated-dependencies:
- dependency-name: ansible-compat
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ansible-compat](https://github.com/ansible/ansible-compat) from 25.1.0 to 25.1.1.
- [Release notes](https://github.com/ansible/ansible-compat/releases)
- [Commits](ansible/ansible-compat@v25.1.0...v25.1.1)

---
updated-dependencies:
- dependency-name: ansible-compat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [molecule](https://github.com/ansible-community/molecule) from 25.1.0 to 25.2.0.
- [Release notes](https://github.com/ansible-community/molecule/releases)
- [Commits](ansible/molecule@v25.1.0...v25.2.0)

---
updated-dependencies:
- dependency-name: molecule
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 25.1.0 to 25.1.1.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](ansible/ansible-lint@v25.1.0...v25.1.1)

---
updated-dependencies:
- dependency-name: ansible-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@syaghoubi00 syaghoubi00 marked this pull request as ready for review February 3, 2025 04:41
@syaghoubi00 syaghoubi00 marked this pull request as draft February 3, 2025 07:04
@syaghoubi00 syaghoubi00 marked this pull request as ready for review February 8, 2025 19:38
@ssbarnea ssbarnea enabled auto-merge (squash) February 10, 2025 23:09
@alisonlhart alisonlhart marked this pull request as draft February 12, 2025 13:05
auto-merge was automatically disabled February 12, 2025 13:05

Pull request was converted to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

4 participants