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

Add new command nf-core rocrate to create a Research Object (RO) crate for a pipeline #2680

Open
wants to merge 504 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
504 commits
Select commit Hold shift + click to select a range
d7a98a0
Merge branch 'dev' into check-max
mirpedrol Sep 27, 2024
b1304aa
Merge pull request #3180 from mirpedrol/check-max
mirpedrol Sep 27, 2024
c122bc6
Merge branch 'dev' into genomes-map
mirpedrol Sep 27, 2024
efc11ba
add conf/igenomes_ignored.config to linting
mirpedrol Sep 27, 2024
9f4a4bb
Merge pull request #3168 from mirpedrol/genomes-map
mirpedrol Sep 27, 2024
2709393
remove try-catch blocks from nextflow.config
mirpedrol Sep 13, 2024
b1df038
change the name of tmp pipeline to be consistent with all tests
mirpedrol Sep 16, 2024
7e738ea
update nextflow_config linting to include the new includeconfig line
mirpedrol Sep 16, 2024
8a3f782
Merge branch 'dev' into import-statements
maxulysse Sep 27, 2024
d15925a
Merge branch 'dev' into renovate/pytest-textual-snapshot-1.x
mirpedrol Sep 30, 2024
f54d92f
Merge pull request #3154 from nf-core/renovate/pytest-textual-snapsho…
mirpedrol Sep 30, 2024
e46779b
add test on pipeline release to check that custom configs are included
mirpedrol Sep 30, 2024
68023d0
Merge branch 'try-catch' of https://github.com/mirpedrol/tools into t…
mirpedrol Sep 30, 2024
530b515
Merge branch 'dev' of https://github.com/nf-core/tools into try-catch
mirpedrol Sep 30, 2024
70b231e
fix tests by uncommenting includeConfig statements
mirpedrol Sep 30, 2024
3a0a8ca
fix sed commands
mirpedrol Sep 30, 2024
c779bf4
formatted string
mirpedrol Sep 30, 2024
d625d92
test output directory typo
mirpedrol Sep 30, 2024
19d21bb
fix more output directory errors
mirpedrol Sep 30, 2024
5f367d1
generate API docs
mirpedrol Sep 30, 2024
ae50840
Refactor CLI commands for Download.
MatthiasZepper Sep 23, 2024
95435c9
Adapt tests for the new Pipelines Download CLI.
MatthiasZepper Sep 23, 2024
5dea0d0
Fix GitHub Action in pipeline-template and update Changelog.
MatthiasZepper Sep 23, 2024
b8c9717
Merge pull request #3167 from mirpedrol/try-catch
mirpedrol Sep 30, 2024
c30967e
Merge pull request #3151 from nf-core/renovate/pre-commit-mirrors-myp…
mashehu Sep 30, 2024
a05cc8f
Merge pull request #3155 from nf-core/renovate/editorconfig-checker-e…
mashehu Sep 30, 2024
cd138ec
Merge branch 'dev' into pipeline-test-conda-syngularity
mirpedrol Oct 1, 2024
5efff0b
Merge pull request #3149 from mirpedrol/pipeline-test-conda-syngularity
mirpedrol Oct 1, 2024
1e5f39a
Merge branch 'dev' into citationsmd
mirpedrol Oct 1, 2024
91e9de5
skip citations.md from linting
mirpedrol Oct 1, 2024
151dc92
Merge pull request #3169 from mirpedrol/citationsmd
mirpedrol Oct 1, 2024
f6f0b3c
Merge pull request #3166 from mirpedrol/import-statements
mirpedrol Oct 1, 2024
2a35da1
Merge pull request #3178 from MatthiasZepper/download_cli_refactor
MatthiasZepper Oct 1, 2024
b75ba51
fix old nf-core sync command and use the info from .nf-core.yml to sy…
mirpedrol Oct 1, 2024
a3468d3
udpate nf-core version and outdir before writing to the template .nf-…
mirpedrol Oct 2, 2024
d0a24be
udpate yaml config only in pipeline repos
mirpedrol Oct 2, 2024
c95de5d
fix pytests
mirpedrol Oct 2, 2024
0b2e227
take into account empty directories
mirpedrol Oct 2, 2024
b8b0c7b
Update nf_core/utils.py
mirpedrol Oct 2, 2024
1ac4e06
Update nf_core/utils.py
mirpedrol Oct 2, 2024
97bc4ea
update strip commands
mirpedrol Oct 2, 2024
86f436a
apply comments from code review by @mashehu
mirpedrol Oct 2, 2024
26299f0
more code suggestions, thanks @mashehu
mirpedrol Oct 2, 2024
bd1e498
Merge pull request #3185 from mirpedrol/sync-fixes
mirpedrol Oct 2, 2024
d52969b
Update gitpod/workspace-base Docker digest to 2cc134f
renovate[bot] Oct 2, 2024
93c2def
fix running prettier on rendered template
mashehu Oct 3, 2024
38db8cb
Merge pull request #3188 from mashehu/fix-run-prettier
mashehu Oct 3, 2024
320037f
sync: copy modules.json to TEMPLATE branch
mashehu Oct 4, 2024
8192ca6
remove unused imports
mashehu Oct 4, 2024
89a41eb
handle non-existent modules.json file more gracefully
mashehu Oct 4, 2024
375fad3
fix template new lines
mirpedrol Oct 4, 2024
80cca2f
add pydantic autodoc
mashehu Oct 4, 2024
f063bf5
render also utils.py docs
mashehu Oct 4, 2024
4ea3650
include review comments and links to docs
mashehu Oct 4, 2024
46b998b
install modules in TEMPLATE branch
mashehu Oct 4, 2024
62ce0c9
Update .gitignore
maxulysse Oct 4, 2024
fa1a01d
remove modules.json copy step in sync
mashehu Oct 4, 2024
bb2b10d
Merge pull request #3189 from mashehu/sync-modules
mashehu Oct 4, 2024
d6cd273
Improve the Github Action to test offline support better.
MatthiasZepper Sep 26, 2024
ca5eaa5
Add raw statements for template and update Singularity version in run…
MatthiasZepper Sep 26, 2024
5c39ab8
Fix container image count calculation.
MatthiasZepper Sep 26, 2024
f54e9eb
Merge pull request #3190 from mirpedrol/template-newlines
mirpedrol Oct 4, 2024
8feb89b
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.6.9
renovate[bot] Oct 4, 2024
89961d6
Tidy Jinja template markup.
MatthiasZepper Oct 4, 2024
664fbfa
The raw statements must not wrap other Jinja markup.
MatthiasZepper Oct 4, 2024
b36c433
Merge pull request #3182 from MatthiasZepper/seqera_community_containers
MatthiasZepper Oct 4, 2024
78d7d8a
Merge pull request #3150 from nf-core/renovate/astral-sh-ruff-pre-com…
mashehu Oct 4, 2024
fc9c001
chore(deps): update python:3.12-slim docker digest to af4e85f
renovate[bot] Oct 4, 2024
aa15820
add pipeline name as an optional sync input
mashehu Oct 7, 2024
6a2b0af
Merge pull request #3194 from mashehu/add-input-to-sync-gha
mashehu Oct 7, 2024
962f4b3
fix for multiqc_config template for released pipelines
mashehu Oct 7, 2024
baeb1df
bump version to 3.0.0
mirpedrol Oct 7, 2024
0865cd1
update nf-core command in sync.yml
mashehu Oct 7, 2024
f20f797
fix some more template newlines
mirpedrol Oct 7, 2024
938fd34
Merge pull request #3195 from mashehu/fix-whitespaces
mirpedrol Oct 7, 2024
baa88db
Merge branch 'dev' into renovate/textual-dev-1.x
mirpedrol Oct 7, 2024
3d56fd1
Merge pull request #3153 from nf-core/renovate/textual-dev-1.x
mirpedrol Oct 7, 2024
503843d
Merge pull request #3196 from mirpedrol/bump-to-3-0-0
mirpedrol Oct 7, 2024
4999c8f
`master` -> `main`
mashehu Oct 7, 2024
8fb28f6
Update CHANGELOG.md
mashehu Oct 7, 2024
a506b1d
review suggestions by @mashehu
mirpedrol Oct 8, 2024
0cfca70
update release date
mirpedrol Oct 8, 2024
86458e9
Merge branch 'dev' into release-checklist
mashehu Oct 8, 2024
83c0be4
Merge pull request #2989 from mirpedrol/release-checklist
mashehu Oct 8, 2024
9489c1c
Merge pull request #3199 from mirpedrol/release-review
mashehu Oct 8, 2024
6f14b99
Merge branch 'dev' into migrate-to-main
mashehu Oct 8, 2024
0e13b82
Merge pull request #3198 from mashehu/migrate-to-main
mashehu Oct 8, 2024
7c1ba22
Fix comment section headers so they don't give phantom merge conflict…
jfy133 Oct 8, 2024
6e0ec01
Fix a typo in the linting action
nvnieuwk Oct 8, 2024
abc50bc
Update CHANGELOG.md
nvnieuwk Oct 8, 2024
20c23ce
[automated] Fix code linting
nf-core-bot Oct 8, 2024
27e6f49
Update CHANGELOG.md
nvnieuwk Oct 8, 2024
83eb32a
Update .gitpod.yml
nvnieuwk Oct 8, 2024
87f0dfd
Update setup.py
nvnieuwk Oct 8, 2024
0178c9f
Merge pull request #3202 from nf-core/nvnieuwk-patch-1
nvnieuwk Oct 8, 2024
0bbaead
Template: run awsfulltest only when target branch is `master`
mashehu Oct 8, 2024
c20122f
fix github variable
mashehu Oct 8, 2024
a995dbc
still allow manual dispatch
mashehu Oct 8, 2024
d00d36b
update changelog, fix if condition
mashehu Oct 8, 2024
d409c85
fix too many empty lines added to .editorconfig file
mirpedrol Oct 9, 2024
f27f796
update changelog
mirpedrol Oct 9, 2024
41052dc
Merge pull request #3203 from mashehu/fix-aws-ci
mashehu Oct 9, 2024
54a4dc5
Merge branch 'dev' into editorconfig-lines
mirpedrol Oct 9, 2024
61dec48
Merge pull request #3204 from mirpedrol/editorconfig-lines
mirpedrol Oct 9, 2024
005eaec
use correct key for defaultIgnoreParams
mashehu Oct 9, 2024
bf2c6bb
add more debugging
mashehu Oct 9, 2024
61e14c9
Revert nf-core module level subworkflow changes
jfy133 Oct 9, 2024
52eab01
Merge remote-tracking branch 'origin/dev' into fix-large-comment-head…
jfy133 Oct 9, 2024
0840f24
Update changelog
jfy133 Oct 9, 2024
530b24a
Merge pull request #3205 from mashehu/fix-ignore-params
mashehu Oct 9, 2024
d45b7d1
Merge pull request #3201 from nf-core/fix-large-comment-header-format…
jfy133 Oct 9, 2024
86a9b65
fix more jinja newlines
mirpedrol Oct 9, 2024
0113549
Update CHANGELOG.md
mirpedrol Oct 9, 2024
16a3609
Bump version to 3.0.1
mashehu Oct 9, 2024
fb952dd
update nf-core subworkflows
mirpedrol Oct 9, 2024
a4b727a
update changelog
mirpedrol Oct 9, 2024
ad32bb2
[automated] Update CHANGELOG.md
nf-core-bot Oct 9, 2024
1ce2250
fix jinja newlines in output.md
mirpedrol Oct 9, 2024
058391d
CI: fix artifact upload of snapshot report
mashehu Oct 9, 2024
85a27ad
Merge pull request #3206 from mirpedrol/jinja-newlines
mashehu Oct 9, 2024
92e2b6e
update multiqc
mashehu Oct 9, 2024
0aa1c60
update changelog
mashehu Oct 9, 2024
dd21c7b
Merge pull request #3209 from mashehu/fix-snapshot-artifact-upload
mashehu Oct 9, 2024
29fc0dc
Merge branch 'dev' into update-modules
mashehu Oct 9, 2024
f0fb3d6
update utils_nfcore_pipeline subworkflow
mirpedrol Oct 9, 2024
53655f4
Merge pull request #3208 from mirpedrol/update-subworkflows
mashehu Oct 9, 2024
3a706f0
Merge pull request #3207 from mashehu/update-modules
mashehu Oct 9, 2024
1c65b3b
bump version to 3.0.2dev
mashehu Oct 9, 2024
93a5bce
Merge pull request #3211 from mashehu/bump-to-3_0_2dev
mashehu Oct 9, 2024
51bbd46
assign schema_default when a param is found in the schema but not in …
mirpedrol Oct 10, 2024
972de9d
Parallelize pipeline GHA tests over docker/conda/singularity
maxulysse Oct 10, 2024
d4980ca
parse defaultIgnoreParams correctly
mashehu Oct 10, 2024
8ab88cb
[automated] Fix code linting
nf-core-bot Oct 10, 2024
16dc3b9
Merge pull request #3213 from mirpedrol/fix-params-validation
mashehu Oct 10, 2024
ba6b661
fix GHA
maxulysse Oct 10, 2024
35d7e08
fix template strings
maxulysse Oct 10, 2024
a1ff5e9
add TODO
maxulysse Oct 10, 2024
45012dd
Fix name
maxulysse Oct 10, 2024
991fa5e
Merge branch 'dev' into maxulysse-patch-6
maxulysse Oct 10, 2024
27be623
Apply suggestions from code review
maxulysse Oct 10, 2024
eb2be9a
Update nf_core/pipeline-template/.github/workflows/ci.yml
maxulysse Oct 10, 2024
1c8d74b
test -> test_name
maxulysse Oct 10, 2024
7556c0a
Update nf_core/pipeline-template/.github/workflows/ci.yml
maxulysse Oct 10, 2024
b51770c
more comments
maxulysse Oct 10, 2024
42f1de4
Update nf_core/pipeline-template/.github/workflows/ci.yml
maxulysse Oct 10, 2024
ac3d577
minimise raw and endraw blocks
mirpedrol Oct 10, 2024
0c6f4b8
Update .gitignore
maxulysse Oct 10, 2024
e3e0a83
Merge branch 'dev' into maxulysse-patch-5
maxulysse Oct 10, 2024
71d348d
Update CHANGELOG.md
maxulysse Oct 10, 2024
853060b
Update CHANGELOG.md
maxulysse Oct 10, 2024
3b8cd7f
Merge pull request #3191 from nf-core/maxulysse-patch-5
maxulysse Oct 10, 2024
dfe65d4
Merge branch 'dev' into maxulysse-patch-6
maxulysse Oct 10, 2024
3bd7105
Update nf_core/pipeline-template/.github/workflows/ci.yml
maxulysse Oct 11, 2024
88dc61c
Merge pull request #3214 from nf-core/maxulysse-patch-6
maxulysse Oct 11, 2024
dfec2cc
fix version of yaml action and change trigger event
mashehu Oct 9, 2024
06f8b4d
checkout out the PR code, change styling of message
mashehu Oct 9, 2024
a42dc29
fix condition checking if nf-core is outdated
mirpedrol Oct 10, 2024
d0c870c
use minimal-read-yaml action
mirpedrol Oct 10, 2024
3120334
use env variable to check nf-core outdated
mirpedrol Oct 10, 2024
1b429cb
update changelog
mirpedrol Oct 11, 2024
5d368d7
Merge pull request #3212 from mashehu/fix-template-version-comment-ac…
mirpedrol Oct 11, 2024
3a0ff6d
remove last mentions of old cli commands
mashehu Oct 11, 2024
9a395ad
bump version to 3.0.2
mirpedrol Oct 11, 2024
f8b2335
Merge branch 'dev' into fix-pipeline-commands-in-docstrings
ewels Oct 11, 2024
1071a30
fix changelog
mashehu Oct 11, 2024
7f9f4d7
Merge branch 'fix-pipeline-commands-in-docstrings' of github.com:mash…
mashehu Oct 11, 2024
945c921
add missing section into changelog
mashehu Oct 11, 2024
d9776bf
[automated] Update CHANGELOG.md
nf-core-bot Oct 11, 2024
07a0c62
Update CHANGELOG.md
mashehu Oct 11, 2024
310046d
Merge pull request #3215 from mashehu/fix-pipeline-commands-in-docstr…
mashehu Oct 11, 2024
807a11e
Update CHANGELOG.md
mirpedrol Oct 11, 2024
7266eb2
Merge branch 'dev' into bump-to-3.0.2
mirpedrol Oct 11, 2024
dd2d130
disable automatic sync on release, fix handling empty pipeline name f…
mashehu Oct 11, 2024
24fe05d
update changelog
mashehu Oct 11, 2024
eb7eaf9
update textual snapshots
mirpedrol Oct 11, 2024
a5a86c0
Merge pull request #3217 from mashehu/fix-sync-action
mashehu Oct 11, 2024
9bdae65
Merge pull request #3216 from mirpedrol/bump-to-3.0.2
mirpedrol Oct 11, 2024
f59c5f3
fix pre-commit lining failing on pipelines template
mirpedrol Oct 11, 2024
12084b4
use multi-line string for local swf
mirpedrol Oct 11, 2024
f2339a3
update changelog
mirpedrol Oct 11, 2024
cc713d8
update template components
mirpedrol Oct 11, 2024
658f77b
fix small typo
mirpedrol Oct 11, 2024
9cdc2da
Merge pull request #3218 from mirpedrol/fix-editorconfig
mirpedrol Oct 11, 2024
4faf200
bump pipeline version also in `.nf-core.yml`
mashehu Oct 14, 2024
84963ab
only log and write new contents, if pattern was actually found
mashehu Oct 14, 2024
58a4487
add some types
mashehu Oct 14, 2024
57dd319
bump version to 3.0.3dev
mashehu Oct 14, 2024
50027db
rewrite the logic in bump_version.py to handle yml files better
mashehu Oct 14, 2024
41c4b95
add test for version bump in `.nf-core.yml`
mashehu Oct 14, 2024
78c9228
Update CHANGELOG.md
mashehu Oct 14, 2024
9e3d2d1
bump default nextflow version in test
mashehu Oct 14, 2024
c59965a
Merge pull request #3221 from nf-core/bump-to-3_0_3dev
mashehu Oct 14, 2024
64b0b96
Merge branch 'dev' into fix-bump-version
mashehu Oct 14, 2024
6e5d737
remove outdated readme pattern
mashehu Oct 14, 2024
d19b74c
Merge branch 'fix-bump-version' of github.com:mashehu/tools into fix-…
mashehu Oct 14, 2024
634d723
[automated] Update CHANGELOG.md
nf-core-bot Oct 14, 2024
8ae861d
keep pipeline name in version.yml file
maxulysse Oct 14, 2024
db1687d
[automated] Update CHANGELOG.md
nf-core-bot Oct 14, 2024
8e2d899
Update nf_core/pipeline-template/workflows/pipeline.nf
maxulysse Oct 14, 2024
597a0ae
[automated] Update CHANGELOG.md
nf-core-bot Oct 14, 2024
18cbf05
Update nf_core/pipeline-template/workflows/pipeline.nf
maxulysse Oct 15, 2024
e8eccd9
Template: Fix Manifest DOI text
maxulysse Oct 15, 2024
7c5caac
[automated] Update CHANGELOG.md
nf-core-bot Oct 15, 2024
4deb397
Template: Do not assume pipeline name is url
maxulysse Oct 15, 2024
5487a62
[automated] Update CHANGELOG.md
nf-core-bot Oct 15, 2024
f2252c5
Merge pull request #3223 from nf-core/maxulysse-patch-5
maxulysse Oct 15, 2024
0efbd55
keep yaml item order
mashehu Oct 15, 2024
1824d88
Merge branch 'fix-bump-version' of github.com:mashehu/tools into fix-…
mashehu Oct 15, 2024
6ec2bf1
Merge branch 'dev' into maxulysse-patch-6
maxulysse Oct 15, 2024
30e3d5d
add docstrings
mashehu Oct 15, 2024
c5cff7a
Merge branch 'dev' into maxulysse-patch-7
maxulysse Oct 15, 2024
ecddc61
Merge pull request #3224 from nf-core/maxulysse-patch-6
maxulysse Oct 15, 2024
b834c0f
Merge pull request #3220 from mashehu/fix-bump-version
mashehu Oct 15, 2024
f566981
Merge branch 'dev' into maxulysse-patch-7
mashehu Oct 15, 2024
e06ca52
create: add toggle all shortcut
mashehu Oct 15, 2024
762be80
[automated] Update CHANGELOG.md
nf-core-bot Oct 15, 2024
ec48d64
Merge branch 'dev' into add-toggle-all-shortcut
mashehu Oct 15, 2024
2b4ed85
fix test path in update-textual-snapshots
mashehu Oct 15, 2024
4485fa0
Merge branch 'add-toggle-all-shortcut' of github.com:mashehu/tools in…
mashehu Oct 15, 2024
3d67386
add toggle all switch
mashehu Oct 15, 2024
27c5e3b
update snapshots
mashehu Oct 15, 2024
8379afd
update snapshots
mashehu Oct 15, 2024
7a2edd3
Merge pull request #3226 from mashehu/add-toggle-all-shortcut
mashehu Oct 15, 2024
4225001
Merge pull request #3225 from nf-core/maxulysse-patch-7
mashehu Oct 16, 2024
6645e4c
second attempt to add ro crates
mashehu Jan 16, 2024
553135a
fix import
mashehu Jan 16, 2024
bf30f0d
first running version
mashehu Jan 23, 2024
9ed053a
restructure code and add tests
mashehu Jan 24, 2024
56a170c
add missing dep
mashehu Jan 24, 2024
8419e9f
add recommendations from comments
mashehu Jan 25, 2024
bdbc045
add git contributors
mashehu Jan 25, 2024
3ba54c4
fix filename for CI
mashehu Jan 25, 2024
9a66883
better help hint message
mashehu Jan 25, 2024
a656617
fix class name
mashehu Jan 25, 2024
fb0d091
add correct parent directory to faked crate
mashehu Jan 25, 2024
2469697
add empty ro-crate after sync
mashehu Jan 25, 2024
f521fa3
fix tests
mashehu Jul 31, 2024
797fefb
fix ci test
mashehu Jul 31, 2024
9d5251f
use github to guess author name, set names as ids if no orcid
mashehu Jul 31, 2024
a605ae6
add bioschemas, datecreated and datemodified (only set to current tim…
mashehu Jul 31, 2024
6c6b8c9
follow `ComputationalWorkflow` schema for main entitty.
mashehu Aug 5, 2024
c2f837c
fix date created field
mashehu Aug 5, 2024
0778b2a
add "about" field to workflow diagram
mashehu Aug 5, 2024
ccfd6d9
add input as separate entity
mashehu Aug 5, 2024
776c6cc
add version to main entity
mashehu Aug 5, 2024
a50f12f
fix incorrect type
mashehu Aug 16, 2024
49592cb
switch to add_workflow method to add main entity and add components a…
mashehu Aug 16, 2024
c1d08d7
ro_crate -> rocrate
mashehu Aug 27, 2024
5e4b4f3
use repo2crate to generate the main structure of the crate
mashehu Oct 17, 2024
4616629
Merge branch 'add-rocreate' of github.com:mashehu/tools into add-rocr…
mashehu Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actions/create-lint-wf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ runs:
run: find nf-core-testpipeline -type f -exec sed -i 's/zenodo.XXXXXX/zenodo.123456/g' {} \;
working-directory: create-lint-wf

# Add empty ro-crate file
- name: add empty ro-crate file
shell: bash
run: touch nf-core-testpipeline/ro-crate-metadata.json
working-directory: create-lint-wf

# Run nf-core pipelines linting
- name: nf-core pipelines lint
shell: bash
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/create-test-lint-wf-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ jobs:
run: find my-prefix-testpipeline -type f -exec sed -i 's/zenodo.XXXXXX/zenodo.123456/g' {} \;
working-directory: create-test-lint-wf

# Add empty ro-crate file
- name: add empty ro-crate file
run: touch my-prefix-testpipeline/ro-crate-metadata.json
working-directory: create-test-lint-wf

# Run nf-core linting
- name: nf-core pipelines lint
run: nf-core --log-file log.txt --hide-progress pipelines lint --dir my-prefix-testpipeline --fail-warned
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

### General

- Add new command `nf-core rocrate` to create a Research Object (RO) crate for a pipeline ([#2680](https://github.com/nf-core/tools/pull/2680))
- Update pre-commit hook astral-sh/ruff-pre-commit to v0.4.4 ([#2974](https://github.com/nf-core/tools/pull/2974))
- Update gitpod/workspace-base Docker digest to 92dd1bc ([#2982](https://github.com/nf-core/tools/pull/2982))
- Update output of generation script for API docs to new structure ([#2988](https://github.com/nf-core/tools/pull/2988))
Expand Down
44 changes: 42 additions & 2 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
import os
import sys
from pathlib import Path

import rich
import rich.console
Expand Down Expand Up @@ -35,6 +36,7 @@
pipelines_launch,
pipelines_lint,
pipelines_list,
pipelines_ro_crate,
pipelines_schema_build,
pipelines_schema_docs,
pipelines_schema_lint,
Expand Down Expand Up @@ -85,7 +87,7 @@
},
{
"name": "For developers",
"commands": ["create", "lint", "bump-version", "sync", "schema", "create-logo"],
"commands": ["create", "lint", "bump-version", "sync", "schema", "ro-crate", "create-logo"],
},
],
"nf-core modules": [
Expand Down Expand Up @@ -579,6 +581,44 @@ def command_pipelines_list(ctx, keywords, sort, json, show_archived):
pipelines_list(ctx, keywords, sort, json, show_archived)


# nf-core pipelines ro-crate
@pipelines.command("ro-crate")
@click.argument(
"pipeline_dir",
type=click.Path(exists=True),
default=Path.cwd(),
required=True,
metavar="<pipeline directory>",
)
@click.option(
"-j",
"--json_path",
default=Path.cwd(),
type=str,
help="Path to save RO Crate metadata json file to",
)
@click.option("-z", "--zip_path", type=str, help="Path to save RO Crate zip file to")
@click.option(
"-pv",
"--pipeline_version",
type=str,
help="Version of pipeline to use for RO Crate",
default="",
)
@click.pass_context
def ro_crate(
ctx,
pipeline_dir: str,
json_path: str,
zip_path: str,
pipeline_version: str,
):
"""
Make an Research Object Crate
"""
pipelines_ro_crate(ctx, pipeline_dir, json_path, zip_path, pipeline_version)


# nf-core pipelines sync
@pipelines.command("sync")
@click.pass_context
Expand Down Expand Up @@ -1687,7 +1727,7 @@ def command_schema_validate(pipeline, params):
@click.option(
"--url",
type=str,
default="https://nf-co.re/pipeline_schema_builder",
default="https://oldsite.nf-co.re/pipeline_schema_builder",
help="Customise the builder URL (for development work)",
)
def command_schema_build(directory, no_prompts, web_only, url):
Expand Down
28 changes: 28 additions & 0 deletions nf_core/commands_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import sys
from pathlib import Path
from typing import Optional, Union

import rich

Expand Down Expand Up @@ -278,6 +279,33 @@ def pipelines_list(ctx, keywords, sort, json, show_archived):
stdout.print(list_workflows(keywords, sort, json, show_archived))


# nf-core pipelines ro-crate
def pipelines_ro_crate(
ctx,
pipeline_dir: Union[str, Path],
json_path: Optional[Union[str, Path]],
zip_path: Optional[Union[str, Path]],
pipeline_version: str,
) -> None:
from nf_core.pipelines.rocrate import ROCrate

if json_path is None and zip_path is None:
log.error("Either `--json_path` or `--zip_path` must be specified.")
sys.exit(1)
else:
pipeline_dir = Path(pipeline_dir)
if json_path is not None:
json_path = Path(json_path)
if zip_path is not None:
zip_path = Path(zip_path)
try:
rocrate_obj = ROCrate(pipeline_dir, pipeline_version)
rocrate_obj.create_ro_crate(pipeline_dir, metadata_path=json_path, zip_path=zip_path)
except (UserWarning, LookupError, FileNotFoundError) as e:
log.error(e)
sys.exit(1)


# nf-core pipelines sync
def pipelines_sync(ctx, directory, from_branch, pull_request, github_repository, username, template_yaml, force_pr):
"""
Expand Down
4 changes: 2 additions & 2 deletions nf_core/components/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ def get_local_yaml(self) -> Optional[Dict]:
return yaml.safe_load(fh)
log.debug(f"{self.component_type[:-1].title()} '{self.component}' meta.yml not found locally")

return None
return {}

def get_remote_yaml(self) -> Optional[dict]:
def get_remote_yaml(self) -> Optional[Dict]:
"""Attempt to get the meta.yml file from a remote repo.

Returns:
Expand Down
6 changes: 4 additions & 2 deletions nf_core/modules/modules_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def move_component_to_local(self, component_type: str, component: str, repo_name
to_name += f"-{datetime.datetime.now().strftime('%y%m%d%H%M%S')}"
shutil.move(str(current_path), local_dir / to_name)

def unsynced_components(self) -> Tuple[List[str], List[str], dict]:
def unsynced_components(self) -> Tuple[List[str], List[str], Dict]:
"""
Compute the difference between the modules/subworkflows in the directory and the
modules/subworkflows in the 'modules.json' file. This is done by looking at all
Expand Down Expand Up @@ -1119,8 +1119,10 @@ def dump(self, run_prettier: bool = False) -> None:
"""
Sort the modules.json, and write it to file
"""
# Sort the modules.json
if self.modules_json is None:
self.load()
if self.modules_json is not None:
# Sort the modules.json
self.modules_json["repos"] = nf_core.utils.sort_dictionary(self.modules_json["repos"])
if run_prettier:
dump_json_with_prettier(self.modules_json_path, self.modules_json)
Expand Down
14 changes: 13 additions & 1 deletion nf_core/pipelines/lint/files_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def files_exist(self) -> Dict[str, List[str]]:
conf/igenomes.config
.github/workflows/awstest.yml
.github/workflows/awsfulltest.yml
ro-crate-metadata.json

Files that *must not* be present, due to being renamed or removed in the template:

Expand Down Expand Up @@ -175,6 +176,7 @@ def files_exist(self) -> Dict[str, List[str]]:
[Path(".github", "workflows", "awstest.yml")],
[Path(".github", "workflows", "awsfulltest.yml")],
[Path("modules.json")],
[Path("ro-crate-metadata.json")],
]

# List of strings. Fails / warns if any of the strings exist.
Expand Down Expand Up @@ -204,6 +206,12 @@ def files_exist(self) -> Dict[str, List[str]]:
(Path("lib", "nfcore_external_java_deps.jar"), [{"plugins": "nf-validation"}, {"plugins": "nf-schema"}]),
]

files_hint = [
[
["ro-crate-metadata.json"],
". Run `nf-core rocrate` to generate this file. Read more about RO-Crates in the [nf-core/tools docs](https://nf-co.re/tools#create-a-ro-crate-metadata-file).",
],
]
# Remove files that should be ignored according to the linting config
ignore_files = self.lint_config.get("files_exist", []) if self.lint_config is not None else []

Expand Down Expand Up @@ -231,7 +239,11 @@ def pf(file_path: Union[str, Path]) -> Path:
if any([pf(f).is_file() for f in files]):
passed.append(f"File found: {self._wrap_quotes(files)}")
else:
warned.append(f"File not found: {self._wrap_quotes(files)}")
hint = ""
for file_hint in files_hint:
if file_hint[0] == files:
hint = str(file_hint[1])
warned.append(f"File not found: {self._wrap_quotes(files)}{hint}")

# Files that cause an error if they exist
for file in files_fail_ifexists:
Expand Down
1 change: 1 addition & 0 deletions nf_core/pipelines/lint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import List

import rich
import rich.box
from rich.console import Console
from rich.table import Table

Expand Down
Loading
Loading