Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nf-core/tools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3143750d75e23e4b270dca78ebdec520039fd2ae
Choose a base ref
..
head repository: nf-core/tools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 01089e762b62b0cf70b94ea27df6136cfedfbece
Choose a head ref
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,11 +5,18 @@
### Template

- Fix bug in pipeline readme logo URL
- Removed retry strategy for AWS tests CI, as Nextflow now handles spot instance retries itself
- Add `.prettierignore` file to stop Prettier linting tests from running over test files

### General

- Bumped the minimum version of `rich` from `v10` to `v10.7.0`
- Add an empty line to `modules.json`, `params.json` and `nextflow-schema.json` when dumping them to avoid prettier errors.

### Modules

- Escaped test run output before logging it, to avoid a rich ` MarkupError`

## [v2.3.2 - Mercury Vulture Fixed Formatting](https://github.com/nf-core/tools/releases/tag/2.3.2) - [2022-03-24]

Very minor patch release to fix the full size AWS tests and re-run the template sync, which partially failed due to GitHub pull-requests being down at the time of release.
1 change: 1 addition & 0 deletions nf_core/launch.py
Original file line number Diff line number Diff line change
@@ -692,6 +692,7 @@ def build_command(self):
if self.use_params_file:
with open(self.params_out, "w") as fp:
json.dump(self.schema_obj.input_params, fp, indent=4)
fp.write("\n")
self.nextflow_cmd += ' {} "{}"'.format("-params-file", os.path.relpath(self.params_out))

# Call nextflow with a list of command line flags
1 change: 1 addition & 0 deletions nf_core/modules/module_utils.py
Original file line number Diff line number Diff line change
@@ -188,6 +188,7 @@ def create_modules_json(pipeline_dir):
modules_json_path = os.path.join(pipeline_dir, "modules.json")
with open(modules_json_path, "w") as fh:
json.dump(modules_json, fh, indent=4)
fh.write("\n")


def find_correct_commit_sha(module_name, module_path, modules_repo):
1 change: 1 addition & 0 deletions nf_core/modules/modules_command.py
Original file line number Diff line number Diff line change
@@ -301,6 +301,7 @@ def dump_modules_json(self, modules_json):
modules_json_path = os.path.join(self.dir, "modules.json")
with open(modules_json_path, "w") as fh:
json.dump(modules_json, fh, indent=4)
fh.write("\n")

def load_lint_config(self):
"""Parse a pipeline lint config file.
5 changes: 3 additions & 2 deletions nf_core/modules/test_yml_builder.py
Original file line number Diff line number Diff line change
@@ -330,12 +330,13 @@ def run_tests_workflow(self, command):
"It looks like Nextflow is not installed. It is required for most nf-core functions."
)
except subprocess.CalledProcessError as e:
raise UserWarning(f"Error running test workflow (exit code {e.returncode})\n[red]{e.output.decode()}")
output = rich.markup.escape(e.output.decode())
raise UserWarning(f"Error running test workflow (exit code {e.returncode})\n[red]{output}")
except Exception as e:
raise UserWarning(f"Error running test workflow: {e}")
else:
log.info("Test workflow finished!")
log.debug(nfconfig_raw)
log.debug(rich.markup.escape(nfconfig_raw))

return tmp_dir, tmp_dir_repeat

3 changes: 0 additions & 3 deletions nf_core/pipeline-template/.github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
@@ -28,6 +28,3 @@ jobs:
"outdir": "s3://{% raw %}${{ secrets.AWS_S3_BUCKET }}{% endraw %}/{{ short_name }}/{% raw %}results-${{ github.sha }}{% endraw %}"
}
profiles: test_full,aws_tower
nextflow_config: |
process.errorStrategy = 'retry'
process.maxRetries = 3
3 changes: 0 additions & 3 deletions nf_core/pipeline-template/.github/workflows/awstest.yml
Original file line number Diff line number Diff line change
@@ -23,6 +23,3 @@ jobs:
"outdir": "s3://{% raw %}${{ secrets.AWS_S3_BUCKET }}{% endraw %}/{{ short_name }}/{% raw %}results-test-${{ github.sha }}{% endraw %}"
}
profiles: test,aws_tower
nextflow_config: |
process.errorStrategy = 'retry'
process.maxRetries = 3
5 changes: 2 additions & 3 deletions nf_core/pipeline-template/.github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
- name: Check PRs
if: github.repository == '{{ name }}'
run: |
"{ [[ {% raw %}${{github.event.pull_request.head.repo.full_name }}{% endraw %} == {{ name }} ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]"
{ [[ {% raw %}${{github.event.pull_request.head.repo.full_name }}{% endraw %} == {{ name }} ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
# If the above check failed, post a comment on the PR explaining the failure {%- raw %}
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
@@ -41,5 +41,4 @@ jobs:
Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
# {%- endraw %}
allow-repeats: false {%- endraw %}
4 changes: 1 addition & 3 deletions nf_core/pipeline-template/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -47,6 +47,4 @@ jobs:
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
# {%- endraw %}
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results {%- endraw %}
4 changes: 1 addition & 3 deletions nf_core/pipeline-template/.github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -77,6 +77,4 @@ jobs:
path: |
lint_log.txt
lint_results.md
PR_number.txt
# {%- endraw %}
PR_number.txt {%- endraw %}
Original file line number Diff line number Diff line change
@@ -25,5 +25,4 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr_number.outputs.pr_number }}
path: linting-logs/lint_results.md
# {%- endraw %}
path: linting-logs/lint_results.md {%- endraw %}
8 changes: 8 additions & 0 deletions nf_core/pipeline-template/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.nextflow*
work/
data/
results/
.DS_Store
testing/
testing*
*.pyc
1 change: 1 addition & 0 deletions nf_core/schema.py
Original file line number Diff line number Diff line change
@@ -171,6 +171,7 @@ def save_schema(self):
log.info("Writing schema with {} params: '{}'".format(num_params, self.schema_filename))
with open(self.schema_filename, "w") as fh:
json.dump(self.schema, fh, indent=4)
fh.write("\n")

def load_input_params(self, params_path):
"""Load a given a path to a parameters file (JSON/YAML)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -11,5 +11,5 @@ questionary>=1.8.0
requests
requests_cache
rich-click>=1.0.0
rich>=10.0.0
rich>=10.7.0
tabulate