Skip to content
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

tmt-lint pre-commit doesn't work out of the box for manual tests #2867

Open
lukaszachy opened this issue Apr 16, 2024 · 0 comments
Open

tmt-lint pre-commit doesn't work out of the box for manual tests #2867

lukaszachy opened this issue Apr 16, 2024 · 0 comments

Comments

@lukaszachy
Copy link
Collaborator

Manual test cannot be linted by the pre-commit as we currently specify in the guide.

We advise:

repos:
- repo: https://github.com/teemtee/tmt.git
  rev: 1.32.1
  hooks:
  - id: tmt-lint

But tmt lint for manual tests needs tmt[test-convert] installed. Otherwise fails with
fail T008 cannot open the manual test path: Install tmt+test-convert to export tests.

test-convert brings:
"html2text>=2020.1.16",
"markdown>=3.3.4",
"nitrate>=1.8.2",
"python-bugzilla>=3.2.0",

Out of those just markdown should be necessary, the rest is to convert nitrate test case into tmt format, so

One option is to install the hook as

repos:
- repo: https://github.com/teemtee/tmt.git
  rev: 1.32.1
  hooks:
  - id: tmt-lint
    additional_dependencies: ['markdown']

IMO we want to have 'tmt lint' work out of the box, right? How about adding 'markdown' (after making sure it is all we need) part of default dependencies?

If not acceptable: Is there a nicer way to make the hook install right package set, ideally defined in the repo/pypi, not as a enumaration in the hook file?

To test this one nees manual test, eg:

cat <<EOF > main.fmf
test: main.fmf
manual: true
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant