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

In modules linting warn about the presence of pytest-workflow files #2474

Closed
edmundmiller opened this issue Oct 17, 2023 · 4 comments
Closed
Assignees
Milestone

Comments

@edmundmiller
Copy link
Contributor

Description of feature

Then later once we've migrated we can switch it to a failure.

@ejseqera
Copy link

Should we subsequently deprecate this logic here below in modules.lint.modules_tests for checking entries in pytest_modules.yml?

    try:
        pytest_yml_path = os.path.join(module.base_dir, "tests", "config", "pytest_modules.yml")
        with open(pytest_yml_path, "r") as fh:pip
            pytest_yml = yaml.safe_load(fh)
            if module.component_name in pytest_yml.keys():
                module.passed.append(("test_pytest_yml", "correct entry in pytest_modules.yml", pytest_yml_path))
            else:
                module.failed.append(("test_pytest_yml", "missing entry in pytest_modules.yml", pytest_yml_path))
    except FileNotFoundError:
        module.failed.append(("test_pytest_yml", "Could not open pytest_modules.yml file", pytest_yml_path))

@edmundmiller
Copy link
Contributor Author

Yep, exactly!

Or flip the logic around and report in the correct entry and warn/fail that test needs to be migrated over. See nf-core/modules#4151 (review) for the discussion on that we need to update the docs first.

@nvnieuwk
Copy link
Contributor

I've been looking into adding lint action support for nf-test. I think for now we should just check whether or not the tag is in pytest_modules.yml or if the modules/nf-core/<tool>/<subtool>/tests/main.nf.test file exists (at least until the full migration has been done). I'll work on a small POC PR right now

@mirpedrol
Copy link
Member

This is done in the dev branch of nf-core/tools, feel free to re-open the issue if you think there is something still missing :)

@github-project-automation github-project-automation bot moved this from Todo to Done in nf-test Migration Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Status: Done
Development

No branches or pull requests

4 participants