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

RO-crate content appear in the nf-core lint warning if there is a TODO #3493

Open
wants to merge 40 commits into
base: dev
Choose a base branch
from

Conversation

ningyuxin1999
Copy link

@ningyuxin1999 ningyuxin1999 commented Mar 17, 2025

Changes:

  1. The RO-crate-metadata.json is ignored in linting
  2. Added a test script nf_core/pipelines/lint/rocrate_readme_sync.py for synchronizing the content of ROcrate metadata and the repo README.

The warning message mentioned here disappears when you create a new pipeline without deleting the TODO commands. But I still wonder where I should add the --fix flag so that the use can decide whether they want to synchronize the metadata with the readme file.

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Copy link
Member

@mirpedrol mirpedrol left a comment

Choose a reason for hiding this comment

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

leaving a couple of comments, otherwise is looking good!

ningyuxin1999 and others added 5 commits March 25, 2025 15:40
Co-authored-by: Júlia Mir Pedrol <mirp.julia@gmail.com>
Co-authored-by: Júlia Mir Pedrol <mirp.julia@gmail.com>
Co-authored-by: Júlia Mir Pedrol <mirp.julia@gmail.com>
Co-authored-by: Júlia Mir Pedrol <mirp.julia@gmail.com>
@ningyuxin1999 ningyuxin1999 marked this pull request as ready for review March 25, 2025 15:27
Copy link
Member

@mirpedrol mirpedrol left a comment

Choose a reason for hiding this comment

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

only one last comment, otherwise LGTM :)

I see the tests are failing, so we should fix this before merging. The reason is that when we create a fresh pipeline from the template, the ro-create file is not included. I think the best way would be to run nf-core pipelines ro-crate after creating the pipeline, on our CI

else:
# Check if the 'description' key is present
if "description" not in graph[0]:
ignored.append(
Copy link
Member

Choose a reason for hiding this comment

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

it's not true that the test is ignored if there isn't a description no? If I am following correctly you assign an empty string and the test will run and fail if the README has a description

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for mentioning that! I changed it to simply coping the content from the readme file to the ro-crate-metadata if there's no 'description' key. Another general question would be how to handle these failed tests when it failed the ignored tests? For example this one:

Run no-core --verbose --log-file log.txt --hide-progress pipelines lint --dir nf-core-testpipeline --fail-ignored --fail-warned

Copy link
Member

Choose a reason for hiding this comment

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

In the tests we are creating an empty ro-crate file (here). I think if we run nf-core pipelines ro-crate instead, the tests will pass

@github-project-automation github-project-automation bot moved this from To do to In progress in Hackathon March 2025 Apr 10, 2025
ningyuxin1999 and others added 4 commits April 10, 2025 12:44
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Co-authored-by: Júlia Mir Pedrol <mirp.julia@gmail.com>
else:
# Check if the 'description' key is present
if "description" not in graph[0]:
ignored.append(
Copy link
Member

Choose a reason for hiding this comment

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

In the tests we are creating an empty ro-crate file (here). I think if we run nf-core pipelines ro-crate instead, the tests will pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants