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 editorconfig linting to tools CI tests #1476

Merged
merged 10 commits into from
Mar 18, 2022

Conversation

ewels
Copy link
Member

@ewels ewels commented Mar 18, 2022

The pipeline template tested for validation against editorconfig, but tools didn't. This adds those tests in to both the repo linting and also the resolved template linting.

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

@codecov

This comment was marked as resolved.

@FriederikeHanssen
Copy link
Contributor

FriederikeHanssen commented Mar 18, 2022

Only thing failing for me now stil in testpipeline is CONTRIBUTING.md in the template. Changing to this fixes it on my side:

1. Check that there isn't already an issue about your idea in the [nf-core/testpipeline issues](https://github.com/nf-core/testpipeline/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this.

instead of having the numbered-bullet list thing

@ewels
Copy link
Member Author

ewels commented Mar 18, 2022

Should be good to go now I think!

@FriederikeHanssen
Copy link
Contributor

FriederikeHanssen commented Mar 18, 2022

Prettier formats the email_template.html for me to:

<html>
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <meta
      name="description"
      content="nf-core/testpipeline: An example pipeline used to test new nf-core infrastructure and common code."
    />
    <title>nf-core/testpipeline Pipeline Report</title>
  </head>
  <body>
    <div style="font-family: Helvetica, Arial, sans-serif; padding: 30px; max-width: 800px; margin: 0 auto">
      <img src="cid:nfcorepipelinelogo" />

      <h1>nf-core/testpipeline v${version}</h1>
      <h2>Run Name: $runName</h2>

      <% if (!success){ out << """
      <div
        style="
          color: #a94442;
          background-color: #f2dede;
          border-color: #ebccd1;
          padding: 15px;
          margin-bottom: 20px;
          border: 1px solid transparent;
          border-radius: 4px;
        "
      >
        <h4 style="margin-top: 0; color: inherit">nf-core/testpipeline execution completed unsuccessfully!</h4>
        <p>The exit status of the task that caused the workflow execution to fail was: <code>$exitStatus</code>.</p>
        <p>The full error message was:</p>
        <pre style="white-space: pre-wrap; overflow: visible; margin-bottom: 0">${errorReport}</pre>
      </div>
      """ } else { out << """
      <div
        style="
          color: #3c763d;
          background-color: #dff0d8;
          border-color: #d6e9c6;
          padding: 15px;
          margin-bottom: 20px;
          border: 1px solid transparent;
          border-radius: 4px;
        "
      >
        nf-core/testpipeline execution completed successfully!
      </div>
      """ } %>

      <p>The workflow was completed at <strong>$dateComplete</strong> (duration: <strong>$duration</strong>)</p>
      <p>The command used to launch the workflow was as follows:</p>
      <pre
        style="
          white-space: pre-wrap;
          overflow: visible;
          background-color: #ededed;
          padding: 15px;
          border-radius: 4px;
          margin-bottom: 30px;
        "
      >
$commandLine</pre
      >

      <h3>Pipeline Configuration:</h3>
      <table
        style="
          width: 100%;
          max-width: 100%;
          border-spacing: 0;
          border-collapse: collapse;
          border: 0;
          margin-bottom: 30px;
        "
      >
        <tbody style="border-bottom: 1px solid #ddd">
          <% out << summary.collect{ k,v -> "
          <tr>
            <th
              style="
                text-align: left;
                padding: 8px 0;
                line-height: 1.42857143;
                vertical-align: top;
                border-top: 1px solid #ddd;
              "
            >
              $k
            </th>
            <td
              style="
                text-align: left;
                padding: 8px;
                line-height: 1.42857143;
                vertical-align: top;
                border-top: 1px solid #ddd;
              "
            >
              <pre style="white-space: pre-wrap; overflow: visible">$v</pre>
            </td>
          </tr>
          " }.join("\n") %>
        </tbody>
      </table>

      <p>nf-core/testpipeline</p>
      <p><a href="https://github.com/nf-core/testpipeline">https://github.com/nf-core/testpipeline</a></p>
    </div>
  </body>
</html>

doesn't match the template then anymore

edmundmiller and others added 2 commits March 18, 2022 11:45
When the template is generated the description and name take up more
than 120 characters, so then prettier re-formats the email_template and
breaks it up into 3 separate lines because it's longer the 120.

We can't just break it up into 3 lines though because if there's a short
name and description it'll reformat it into one line.

Co-authored-by: Rike <friederike.hanssen@qbic.uni-tuebingen.de>
@FriederikeHanssen FriederikeHanssen merged commit 34e03fe into nf-core:dev Mar 18, 2022
@ewels ewels deleted the test-eclint branch March 18, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants