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

Textual create #2404

Merged
merged 129 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
513de95
WIP: First stab at writing some Textual
ewels Aug 20, 2023
0e8204e
Refactor: Break into multiple files
ewels Aug 21, 2023
e37d2e5
Remove unusued imports
ewels Aug 21, 2023
ee12eb5
show error message when pressing enter
mirpedrol Aug 22, 2023
dd18bcc
show failure messages when button is pressed
mirpedrol Aug 22, 2023
486f180
add usegenomicdata screen (TODO on_button_pressed)
mirpedrol Aug 22, 2023
5b8cfd5
add custom pipeline switch table to select pipeline features
mirpedrol Aug 23, 2023
0a40dab
create new widget PipelineFeature to display feature buttons and help…
mirpedrol Aug 24, 2023
39b9e3c
add more custom features
mirpedrol Aug 24, 2023
25c9fa1
add template features to skip to TEMPLATE_CONFIG
mirpedrol Aug 25, 2023
610cbd9
animate help box
mirpedrol Aug 28, 2023
6677144
add type_nfcore screen and use PipelineCreate to create a pipeline
mirpedrol Aug 29, 2023
8bac0be
modify PipelineCreate to accept a template dictionary
mirpedrol Aug 29, 2023
43db7f6
start modifying nf-core create command to use TUI and not CLI
mirpedrol Aug 30, 2023
99f426a
small bug fixes and add a deprecation message for nf-core create command
mirpedrol Aug 31, 2023
09bd5db
create command fails if one but not all arguments are provided
mirpedrol Aug 31, 2023
9f121f7
ask if launching TUI when using deprecated nf-core create command
mirpedrol Aug 31, 2023
0c77029
add final_details screen for version and force
mirpedrol Aug 31, 2023
bf9a541
add nfcorepipeline grid with features to select
mirpedrol Aug 31, 2023
fec5e3e
first ask if the pipeline will be nf-core or custom before basicdetails
mirpedrol Aug 31, 2023
0ef16b5
use kwargs
mirpedrol Aug 31, 2023
238767f
remove inexisten variable version from send-tweet github workflow
mirpedrol Aug 21, 2023
7b4a342
fix typo in gh_badges jinja variable to github_badges
mirpedrol Aug 24, 2023
b3fa25e
bump version of nf-test snap files
mirpedrol Aug 30, 2023
6ff69b2
update changelog
mirpedrol Aug 30, 2023
17ba971
add outdir textinput and update config
mirpedrol Sep 1, 2023
0c64de8
refactor jinja template 'branded' to 'is_nfcore'
mirpedrol Sep 1, 2023
7720117
refactor params_dict to jinja_params and use that instead of the config
mirpedrol Sep 1, 2023
cb62be3
refactor function obtain_jinja_params_dict
mirpedrol Sep 1, 2023
da1c68f
run create command from the App, mv nf_core/create.py to nf_core/pipe…
mirpedrol Sep 1, 2023
3c14dd7
add new screen to create a github repo and push the new pipeline (not…
mirpedrol Oct 3, 2023
e401a6a
Some minor CSS tweaks
ewels Nov 2, 2023
8b9ad35
Add logging handler and final screen to visualise logs
mirpedrol Nov 3, 2023
4c237e2
fix githubrepo buttons handled by the same function
mirpedrol Nov 3, 2023
8318e0c
fix pytests
mirpedrol Nov 6, 2023
c7e057d
Merge branch 'dev' of https://github.com/nf-core/tools into textual-c…
mirpedrol Nov 6, 2023
c2c0561
fix test_remove_patch
mirpedrol Nov 6, 2023
ef9ea81
add types-requests to requirements-dev
mirpedrol Nov 6, 2023
798dad9
add full logging screen to show logging messages
mirpedrol Nov 10, 2023
4758c7d
autopopulate github credentials and hide password
mirpedrol Nov 13, 2023
665d378
add button to show or hide password
mirpedrol Nov 13, 2023
19f60bc
update textual and textual-dev versions
mirpedrol Nov 14, 2023
887f372
add first snapshot tests
mirpedrol Nov 14, 2023
7758698
add snapshots for all screens
mirpedrol Dec 5, 2023
0dbe982
Merge branch 'dev' of https://github.com/nf-core/tools into textual-c…
mirpedrol Dec 5, 2023
9c25603
Merge branch 'dev' of https://github.com/nf-core/tools into textual-c…
mirpedrol Jan 5, 2024
3908163
ruff code modifications
mirpedrol Jan 5, 2024
208d832
update snapshots
mirpedrol Jan 5, 2024
bebf067
ask if we have to create a github repo in a different screen
mirpedrol Jan 5, 2024
7ade926
add snapshot for github repo question and exit message
mirpedrol Jan 5, 2024
7049277
add work threads for creating a pipeline and a github repo
mirpedrol Jan 5, 2024
41fcc27
add loading screen when creating a pipeline
mirpedrol Jan 5, 2024
cfa0804
show logging only at the end
mirpedrol Jan 5, 2024
a85f1dd
add loading screen for repo creation
mirpedrol Jan 5, 2024
456a4be
update app snapshots
mirpedrol Jan 5, 2024
bb6cc97
fix typing error
mirpedrol Jan 8, 2024
abdffef
ignroe snapshot files with editorconfig
mirpedrol Jan 8, 2024
2e396d9
add exclusive=True to work threads
mirpedrol Jan 8, 2024
3329411
remove logging and add completed screen instead
mirpedrol Jan 8, 2024
f5551bc
Merge branch 'dev' of https://github.com/nf-core/tools into textual-c…
mirpedrol Jan 8, 2024
cbce046
show an error message if the pipeline already exists
mirpedrol Jan 8, 2024
62c4b3e
fix nf-core.pipelines.create import
mirpedrol Jan 8, 2024
f04ad5e
GHA use new nf-core pipelines create command and fixed default org
mirpedrol Jan 8, 2024
baa3412
fix pytests
mirpedrol Jan 8, 2024
acd7201
add loading messages
mirpedrol Jan 9, 2024
6b4ed9c
default version to 1.0.0dev
mirpedrol Jan 9, 2024
97bca8b
add logging instead of loading screen and see logging messages on rea…
mirpedrol Jan 19, 2024
0525d9c
deprecation error if 'nf-core create' is used
mirpedrol Feb 19, 2024
29afad0
more formatting and docs
mirpedrol Feb 19, 2024
2dcb0f1
add button to go back
mirpedrol Feb 19, 2024
17bb9e9
disable button to close logs while pipeline is not created
mirpedrol Feb 19, 2024
5445b74
more tweaking of logging buttons and screen
mirpedrol Feb 20, 2024
4ecb445
Merge branch 'dev' of https://github.com/nf-core/tools into textual-c…
mirpedrol Feb 21, 2024
536e3be
update create app tests according to last changes
mirpedrol Feb 21, 2024
599d2e0
Merge branch 'dev' into textual-create
ewels Mar 4, 2024
2943098
some fixes after merging dev to textual-create branch
mirpedrol Mar 6, 2024
3cfdc78
fix packaging. Thanks @mashehu for the debugging help
mirpedrol Mar 6, 2024
e7687e9
add changed from dev branch to create.py script
mirpedrol Mar 7, 2024
1debc4b
fix back button after validation of basic details
mirpedrol Mar 7, 2024
41e99a1
move button to close logging screen to the bottom
mirpedrol Mar 7, 2024
67db794
Merge branch 'dev' of https://github.com/nf-core/tools into textual-c…
mirpedrol Mar 7, 2024
a4a67bb
Fix merge conflicts
ewels Apr 2, 2024
ed70990
Remove duplicate lines in changelog from merge conflict resolution
ewels Apr 2, 2024
3a54023
Raw strings for nf-core ascii artwork
ewels Apr 2, 2024
bfaf3b1
Simplify log messages about CLI flags
ewels Apr 2, 2024
ea99d69
Move logo to utils, fix alignment
ewels Apr 2, 2024
d89218f
Tweaks for welcome and pipeline type pages
ewels Apr 2, 2024
19a6144
Display tweaks
ewels Apr 2, 2024
0bfae29
Tidy up design for GitHub repo creation page
ewels Apr 2, 2024
a1d8916
[automated] Fix code linting
nf-core-bot Apr 3, 2024
2d7c4e0
Merge branch 'dev' of github.com:nf-core/tools into textual-create
mashehu Apr 3, 2024
7a96212
update create app snapshots
mirpedrol Apr 3, 2024
eaedeb7
fix providing a prefix twitha template yaml
mirpedrol Apr 3, 2024
682d9b3
update error message in create pipeline test
mirpedrol Apr 3, 2024
3aa383c
not show pipeline logging when creating a repo
mirpedrol Apr 3, 2024
d8283bb
fix pipeline create tests
mirpedrol Apr 3, 2024
241bc20
use org instead of prefix in pipeline template
mirpedrol Apr 3, 2024
6f2a59b
add 'back' button if the pipeline exists
mirpedrol Apr 5, 2024
24704a7
add option to set repo name
mirpedrol Apr 5, 2024
5add94b
show help if repo already exists
mirpedrol Apr 5, 2024
5d9ebbd
hide buttons not used in logging screen
mirpedrol Apr 5, 2024
5a0aa46
fix threads and messages
mirpedrol Apr 5, 2024
48d6ea1
update test snapshots
mirpedrol Apr 5, 2024
01481db
allow selecting a github organisation
mirpedrol Apr 5, 2024
33a97bb
Some tweaks to text strings
ewels Apr 8, 2024
c616f91
Merge branch 'textual-create' into textual-create-changes
ewels Apr 8, 2024
1ce788f
Merge pull request #6 from mirpedrol/textual-create-changes
ewels Apr 8, 2024
1503b12
Whitespace etc
ewels Apr 8, 2024
0acb2e2
push s allcreens, not switch
mirpedrol Apr 11, 2024
5fcedcc
always push files to the remote repo
mirpedrol Apr 11, 2024
c2381ae
fix going back from nf-core to custom pipeline
mirpedrol Apr 11, 2024
30f6c5a
fix logging screen by using a class to hide buttons
mirpedrol Apr 11, 2024
bf14b4e
remove force switch and always force, show warning
mirpedrol Apr 12, 2024
b1412cf
add warning if github org not found
mirpedrol Apr 12, 2024
e3b6d44
Merge branch 'dev' of https://github.com/nf-core/tools into textual-c…
mirpedrol Apr 12, 2024
7cc3757
update snapshots
mirpedrol Apr 12, 2024
0bd1807
fix providing outdir
mirpedrol Apr 15, 2024
9976440
try fixing pytests by using tmpdir instead of mock
mirpedrol Apr 15, 2024
777f68c
fix outdir again to fix tests
mirpedrol Apr 16, 2024
e7d3886
debugging ci tests
mashehu Apr 17, 2024
6b83de8
try fixing outdir, again
mirpedrol Apr 17, 2024
e1a12f3
Merge branch 'dev' of https://github.com/nf-core/tools into textual-c…
mirpedrol May 9, 2024
dcc7757
update snapshots
mirpedrol May 9, 2024
8aceeb3
handle token not configured with gh
mirpedrol May 9, 2024
9572b23
add asyncio to pytest.ini and upload snapshot report on fail on CI
mirpedrol May 10, 2024
bc1096f
wait for workers to complete
mirpedrol May 10, 2024
af584d3
upload snapshot report always
mirpedrol May 10, 2024
0de5b69
upload snapshot report first
mirpedrol May 10, 2024
9d6838c
update snapshot from gitpod
mirpedrol May 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ indent_style = unset

[**/Makefile]
indent_style = unset

[tests/__snapshots__/*]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
2 changes: 1 addition & 1 deletion .github/actions/create-lint-wf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
run: |
mkdir -p create-lint-wf && cd create-lint-wf
export NXF_WORK=$(pwd)
nf-core --log-file log.txt create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface" --plain
nf-core --log-file log.txt pipelines create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface"

# Try syncing it before we change anything
- name: nf-core sync
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/create-test-lint-wf-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,29 +84,29 @@ jobs:
run: |
mkdir create-test-lint-wf
export NXF_WORK=$(pwd)
printf "prefix: my-prefix\nskip: ['ci', 'github_badges', 'igenomes', 'nf_core_configs']" > create-test-lint-wf/template_skip_all.yml
printf "org: my-prefix\nskip: ['ci', 'github_badges', 'igenomes', 'nf_core_configs']" > create-test-lint-wf/template_skip_all.yml

- name: Create template skip github_badges
run: |
printf "prefix: my-prefix\nskip: github_badges" > create-test-lint-wf/template_skip_github_badges.yml
printf "org: my-prefix\nskip: github_badges" > create-test-lint-wf/template_skip_github_badges.yml

- name: Create template skip igenomes
run: |
printf "prefix: my-prefix\nskip: igenomes" > create-test-lint-wf/template_skip_igenomes.yml
printf "org: my-prefix\nskip: igenomes" > create-test-lint-wf/template_skip_igenomes.yml

- name: Create template skip ci
run: |
printf "prefix: my-prefix\nskip: ci" > create-test-lint-wf/template_skip_ci.yml
printf "org: my-prefix\nskip: ci" > create-test-lint-wf/template_skip_ci.yml

- name: Create template skip nf_core_configs
run: |
printf "prefix: my-prefix\nskip: nf_core_configs" > create-test-lint-wf/template_skip_nf_core_configs.yml
printf "org: my-prefix\nskip: nf_core_configs" > create-test-lint-wf/template_skip_nf_core_configs.yml

# Create a pipeline from the template
- name: create a pipeline from the template ${{ matrix.TEMPLATE }}
run: |
cd create-test-lint-wf
nf-core --log-file log.txt create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface" --template-yaml ${{ matrix.TEMPLATE }}
nf-core --log-file log.txt pipelines create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface" --template-yaml ${{ matrix.TEMPLATE }}

- name: run the pipeline
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ jobs:
run: |
mkdir create-test-wf && cd create-test-wf
export NXF_WORK=$(pwd)
nf-core --log-file log.txt create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface" --plain
nf-core --log-file log.txt pipelines create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface"
# echo current directory
pwd
# echo content of current directory
ls -la
nextflow run nf-core-testpipeline -profile test,self_hosted_runner --outdir ./results

- name: Upload log file artifact
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ jobs:
exit 1
fi

- name: Store snapshot report
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
if: always()
with:
name: Snapshot Report ${{ matrix.test }}
path: ./snapshot_report.html

- name: Upload coverage
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,6 @@ ENV/
pip-wheel-metadata
.vscode
.*.sw?

# Textual
snapshot_report.html
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ include nf_core/assets/logo/nf-core-repo-logo-base-lightbg.png
include nf_core/assets/logo/nf-core-repo-logo-base-darkbg.png
include nf_core/assets/logo/placeholder_logo.svg
include nf_core/assets/logo/MavenPro-Bold.ttf
include nf_core/pipelines/create/create.tcss
184 changes: 117 additions & 67 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from nf_core.download import DownloadError
from nf_core.modules.modules_repo import NF_CORE_MODULES_REMOTE
from nf_core.params_file import ParamsFileBuilder
from nf_core.utils import check_if_outdated, rich_force_colors, setup_nfcore_dir
from nf_core.utils import check_if_outdated, nfcore_logo, rich_force_colors, setup_nfcore_dir

# Set up logging as the root logger
# Submodules should all traverse back to this
Expand Down Expand Up @@ -45,7 +45,7 @@
{
"name": "Commands for developers",
"commands": [
"create",
"pipelines",
"lint",
"modules",
"subworkflows",
Expand All @@ -56,6 +56,12 @@
],
},
],
"nf-core pipelines": [
{
"name": "Pipeline commands",
"commands": ["create"],
},
],
"nf-core modules": [
{
"name": "For pipelines",
Expand Down Expand Up @@ -115,25 +121,11 @@ def run_nf_core():
# print nf-core header if environment variable is not set
if os.environ.get("_NF_CORE_COMPLETE") is None:
# Print nf-core header
stderr.print(f"\n[green]{' ' * 42},--.[grey39]/[green],-.", highlight=False)
stderr.print(
"[blue] ___ __ __ __ ___ [green]/,-._.--~\\",
highlight=False,
)
stderr.print(
r"[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {",
highlight=False,
)
stderr.print(
r"[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,",
highlight=False,
)
stderr.print(
"[green] `._,._,'\n",
highlight=False,
)
stderr.print("\n")
for line in nfcore_logo:
stderr.print(line, highlight=False)
stderr.print(
f"[grey39] nf-core/tools version {__version__} - [link=https://nf-co.re]https://nf-co.re[/]",
f"\n[grey39] nf-core/tools version {__version__} - [link=https://nf-co.re]https://nf-co.re[/]",
highlight=False,
)
try:
Expand Down Expand Up @@ -494,53 +486,6 @@ def licences(pipeline, json):
sys.exit(1)


# nf-core create
@nf_core_cli.command()
@click.option(
"-n",
"--name",
type=str,
help="The name of your new pipeline",
)
@click.option("-d", "--description", type=str, help="A short description of your pipeline")
@click.option("-a", "--author", type=str, help="Name of the main author(s)")
@click.option("--version", type=str, default="1.0dev", help="The initial version number to use")
@click.option(
"-f",
"--force",
is_flag=True,
default=False,
help="Overwrite output directory if it already exists",
)
@click.option("-o", "--outdir", help="Output directory for new pipeline (default: pipeline name)")
@click.option("-t", "--template-yaml", help="Pass a YAML file to customize the template")
@click.option("--plain", is_flag=True, help="Use the standard nf-core template")
def create(name, description, author, version, force, outdir, template_yaml, plain):
"""
Create a new pipeline using the nf-core template.

Uses the nf-core template to make a skeleton Nextflow pipeline with all required
files, boilerplate code and best-practices.
"""
from nf_core.create import PipelineCreate

try:
create_obj = PipelineCreate(
name,
description,
author,
version=version,
force=force,
outdir=outdir,
template_yaml_path=template_yaml,
plain=plain,
)
create_obj.init_pipeline()
except UserWarning as e:
log.error(e)
sys.exit(1)


# nf-core lint
@nf_core_cli.command()
@click.option(
Expand Down Expand Up @@ -658,6 +603,111 @@ def lint(
sys.exit(1)


# nf-core pipelines subcommands
@nf_core_cli.group()
@click.pass_context
def pipelines(ctx):
"""
Commands to manage nf-core pipelines.
"""
# ensure that ctx.obj exists and is a dict (in case `cli()` is called
# by means other than the `if` block below)
ctx.ensure_object(dict)


# nf-core pipelines create
@pipelines.command("create")
@click.pass_context
@click.option(
"-n",
"--name",
type=str,
help="The name of your new pipeline",
)
@click.option("-d", "--description", type=str, help="A short description of your pipeline")
@click.option("-a", "--author", type=str, help="Name of the main author(s)")
@click.option("--version", type=str, default="1.0.0dev", help="The initial version number to use")
@click.option("-f", "--force", is_flag=True, default=False, help="Overwrite output directory if it already exists")
@click.option("-o", "--outdir", help="Output directory for new pipeline (default: pipeline name)")
@click.option("-t", "--template-yaml", help="Pass a YAML file to customize the template")
@click.option(
"--organisation",
type=str,
default="nf-core",
help="The name of the GitHub organisation where the pipeline will be hosted (default: nf-core)",
)
def create_pipeline(ctx, name, description, author, version, force, outdir, template_yaml, organisation):
"""
Create a new pipeline using the nf-core template.

Uses the nf-core template to make a skeleton Nextflow pipeline with all required
files, boilerplate code and best-practices.
\n\n
Run without any command line arguments to use an interactive interface.
"""
from nf_core.pipelines.create import PipelineCreateApp
from nf_core.pipelines.create.create import PipelineCreate

if (name and description and author) or (template_yaml):
# If all command arguments are used, run without the interactive interface
try:
create_obj = PipelineCreate(
name,
description,
author,
version=version,
force=force,
outdir=outdir,
template_config=template_yaml,
organisation=organisation,
)
create_obj.init_pipeline()
except UserWarning as e:
log.error(e)
sys.exit(1)
elif name or description or author or version != "1.0.0dev" or force or outdir or organisation != "nf-core":
log.error(
"[red]Partial arguments supplied.[/] "
"Run without [i]any[/] arguments for an interactive interface, "
"or with at least name + description + author to use non-interactively."
)
sys.exit(1)
else:
log.info("Launching interactive nf-core pipeline creation tool.")
app = PipelineCreateApp()
app.run()
sys.exit(app.return_code or 0)


# nf-core create (deprecated)
@nf_core_cli.command(hidden=True, deprecated=True)
@click.option(
"-n",
"--name",
type=str,
help="The name of your new pipeline",
)
@click.option("-d", "--description", type=str, help="A short description of your pipeline")
@click.option("-a", "--author", type=str, help="Name of the main author(s)")
@click.option("--version", type=str, help="The initial version number to use")
@click.option("-f", "--force", is_flag=True, default=False, help="Overwrite output directory if it already exists")
@click.option("-o", "--outdir", help="Output directory for new pipeline (default: pipeline name)")
@click.option("-t", "--template-yaml", help="Pass a YAML file to customize the template")
@click.option("--plain", is_flag=True, help="Use the standard nf-core template")
def create(name, description, author, version, force, outdir, template_yaml, plain):
"""
DEPRECATED
Create a new pipeline using the nf-core template.

Uses the nf-core template to make a skeleton Nextflow pipeline with all required
files, boilerplate code and best-practices.
"""
log.error(
"The `[magenta]nf-core create[/]` command is deprecated. Use `[magenta]nf-core pipelines create[/]` instead."
)
sys.exit(0)


# nf-core modules subcommands
@nf_core_cli.group()
@click.option(
Expand Down
12 changes: 6 additions & 6 deletions nf_core/lint/files_unchanged.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import yaml

import nf_core.create
import nf_core.pipelines.create.create

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -109,7 +109,7 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]:
]

# Only show error messages from pipeline creation
logging.getLogger("nf_core.create").setLevel(logging.ERROR)
logging.getLogger("nf_core.pipelines.create").setLevel(logging.ERROR)

# Generate a new pipeline with nf-core create that we can compare to
tmp_dir = tempfile.mkdtemp()
Expand All @@ -119,16 +119,16 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]:
"name": short_name,
"description": self.nf_config["manifest.description"].strip("\"'"),
"author": self.nf_config["manifest.author"].strip("\"'"),
"prefix": prefix,
"org": prefix,
}

template_yaml_path = Path(tmp_dir, "template.yaml")
with open(template_yaml_path, "w") as fh:
yaml.dump(template_yaml, fh, default_flow_style=False)

test_pipeline_dir = Path(tmp_dir, f"{prefix}-{short_name}")
create_obj = nf_core.create.PipelineCreate(
None, None, None, no_git=True, outdir=test_pipeline_dir, template_yaml_path=template_yaml_path
test_pipeline_dir = os.path.join(tmp_dir, f"{prefix}-{short_name}")
create_obj = nf_core.pipelines.create.create.PipelineCreate(
None, None, None, no_git=True, outdir=test_pipeline_dir, template_config=template_yaml_path
)
create_obj.init_pipeline()

Expand Down
4 changes: 2 additions & 2 deletions nf_core/pipeline-template/.github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Please use the pre-filled template to save time.
However, don't be put off by this template - other more general issues and suggestions are welcome!
Contributions to the code are even more welcome ;)

{% if branded -%}
{% if is_nfcore -%}

> [!NOTE]
> If you need help using or modifying {{ name }} then the best place to ask is on the nf-core Slack [#{{ short_name }}](https://nfcore.slack.com/channels/{{ short_name }}) channel ([join our Slack here](https://nf-co.re/join/slack)).
Expand Down Expand Up @@ -63,7 +63,7 @@ These tests are run both with the latest available version of `Nextflow` and als
- Fix the bug, and bump version (X.Y.Z+1).
- A PR should be made on `master` from patch to directly this particular bug.

{% if branded -%}
{% if is_nfcore -%}

## Getting help

Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/{{ name }}/t
- [ ] This comment contains a description of changes (with reason).
- [ ] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/{{ name }}/tree/master/.github/CONTRIBUTING.md)
{%- if branded %}
{%- if is_nfcore %}
- [ ] If necessary, also make a PR on the {{ name }} _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
{%- endif %}
- [ ] Make sure your code lints (`nf-core lint`).
Expand Down