Skip to content

Commit

Permalink
Merge branch 'main' of github.com:nf-core/website into add-docsearch
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	package.json
  • Loading branch information
mashehu committed Jul 25, 2023
2 parents 28a040a + f046b51 commit 925d10e
Show file tree
Hide file tree
Showing 62 changed files with 4,168 additions and 4,962 deletions.
Binary file removed -f
Binary file not shown.
Binary file modified .cache.tar.xz
Binary file not shown.
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ menu:
main:
weight: 10
---

# nf-core/website - Contributing Guidelines

Hi there! Many thanks for taking an interest in improving the nf-core website.
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/build-json-files-and-md-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Don't do a shallow clone
token: ${{secrets.NF_CORE_BOT_AUTH_TOKEN}} # Needed for pushing back to the repo

# install npm dependencies
- name: Set up node.js
Expand All @@ -34,9 +35,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PIPLINE_JSON_BUILD_TOKEN }}


- name: make md cache
run: node bin/build-cache.js && tar -cvJf -f .cache.tar.xz .cache
run: node bin/build-cache.js && tar -cvJf .cache.tar.xz .cache
env:
GITHUB_TOKEN: ${{ secrets.CREATE_CACHE_MD_TOKEN }}

Expand Down Expand Up @@ -72,23 +72,23 @@ jobs:
# Commit and push the changes if there are not too many lines changed
- name: Commit and push changes
if: ${{ !steps.check_lines.outputs.changes }}
uses: EndBug/add-and-commit@v9
with:
default_author: user_info
author_name: nf-core-bot
author_email: nf-core-bot@users.noreply.github.com
run: |
git config user.email "core@nf-co.re"
git config user.name "nf-core-bot"
git config push.default upstream
git status
git diff --quiet || (git commit -am "[automated] Update json files and markdown cache" && git push)
# Create a PR if there are too many lines changed
- name: Create PR with changes
if: ${{ steps.check_lines.outputs.changes }}
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.CREATE_PR_TOKEN }}
commit-message: "chore: update pipeline.json and component.json"
title: "chore: update pipeline.json and component.json"
body: "This PR was automatically created by a GitHub Action because there were too many lines changed in the pipeline.json and component.json files."
branch: "chore/update-pipeline-json-and-component-json"
commit-message: 'chore: update pipeline.json and component.json'
title: 'chore: update pipeline.json and component.json'
body: 'This PR was automatically created by a GitHub Action because there were too many lines changed in the pipeline.json and component.json files.'
branch: 'chore/update-pipeline-json-and-component-json'
delete-branch: true
draft: false


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ pnpm-debug.log*

# Local Netlify folder
.netlify
src/content/pipelines
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ repos:
rev: 'v2.7.1'
hooks:
- id: prettier
additional_dependencies: [prettier@2.7.1, prettier-plugin-svelte@^2.10.1, prettier-plugin-astro@^0.10.0]
additional_dependencies:
- prettier@2.7.1
- prettier-plugin-svelte@^2.7.1
- prettier-plugin-astro@^0.10.0
args: [--plugin=prettier-plugin-svelte, --plugin=prettier-plugin-astro]
files: \.(astro|svelte)$


10 changes: 8 additions & 2 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@ module.exports = {
// TODO: REMOVE SINGLE QUOTES CONFIG LATER
// Leaving it for now to minimise diffs, but double quote is more consistent with the rest of nf-core
singleQuote: true,
trailingComma: 'all',
//////

printWidth: 120,

// pnpm support, for VSCode?
plugins: [require.resolve('prettier-plugin-astro')],
plugins: [require.resolve('prettier-plugin-astro'), require.resolve('prettier-plugin-svelte')],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
},
},
{
files: '*.svelte',
options: {
parser: 'svelte',
},
},
],
};
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ npm run build-component-json
npm run build-cache-force
```


### Tools API docs

Tools docs are built using GitHub Actions on the nf-core/tools repo using Sphinx.
Expand Down
1 change: 0 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import emoji from 'remark-emoji';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';


const latestToolsRelease = await fetch('https://api.github.com/repos/nf-core/tools/releases/latest')
.then((res) => res.json())
.then((json) => json.tag_name);
Expand Down
7 changes: 3 additions & 4 deletions bin/build-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { readFileSync } from 'fs';
import path from 'path';
import ProgressBar from 'progress';


const cache = Cache.default({
basePath: './.cache',
ns: 'nf-core',
Expand Down Expand Up @@ -49,12 +48,12 @@ export const buildCache = async () => {
} else {
// console.log(`Already cached ${cache_key}`);
}
})
}),
);
}

bar.tick();
bar.tick();
}
return true;
};
buildCache();
buildCache();
11 changes: 5 additions & 6 deletions bin/components.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import path, { join } from 'path';
import ProgressBar from 'progress';
import { parse } from 'yaml';


// get current path
const __dirname = path.resolve();

Expand Down Expand Up @@ -66,14 +65,14 @@ export const writeComponentsJson = async () => {
components.modules.push(module);
}
bar.tick();
})
}),
);

// Fetch subworkflows concurrently
const subworkflows = tree
.filter(
(file) =>
file.path.includes('meta.yml') && file.path.includes('subworkflows/') && !file.path.includes('homer/groseq')
file.path.includes('meta.yml') && file.path.includes('subworkflows/') && !file.path.includes('homer/groseq'),
)
.map((file) => ({
name: file.path.replace('subworkflows/nf-core/', '').replace('/meta.yml', ''),
Expand Down Expand Up @@ -120,7 +119,7 @@ export const writeComponentsJson = async () => {
}

bar.tick();
})
}),
);

// Update pipelines that use modules and subworkflows
Expand All @@ -139,7 +138,7 @@ export const writeComponentsJson = async () => {
components.modules[index].pipelines = [entry];
}
}
})
}),
);
}

Expand All @@ -155,7 +154,7 @@ export const writeComponentsJson = async () => {
components.subworkflows[index].pipelines = [entry];
}
}
})
}),
);
}
}
Expand Down
17 changes: 8 additions & 9 deletions bin/pipelines.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import yaml from 'js-yaml';
import path, { join } from 'path';
import ProgressBar from 'progress';


// get current path
const __dirname = path.resolve();

Expand Down Expand Up @@ -46,7 +45,7 @@ export const writePipelinesJson = async () => {
await fs.writeFile(
join(__dirname, '/public/pipeline_names.json'),
JSON.stringify({ pipeline: names }, null, 4),
'utf8'
'utf8',
);

// get ignored_topics from ignored_reops.yml
Expand All @@ -67,7 +66,7 @@ export const writePipelinesJson = async () => {
// filter out entries with _url in the key name
response.data = Object.keys(response.data)
.filter(
(key) => !key.includes('_url') && !['owner', 'permissions', 'license', 'organization'].includes(key)
(key) => !key.includes('_url') && !['owner', 'permissions', 'license', 'organization'].includes(key),
)
.reduce((obj, key) => {
obj[key] = response.data[key];
Expand Down Expand Up @@ -127,7 +126,7 @@ export const writePipelinesJson = async () => {
release.has_schema = await getGitHubFile(name, 'nextflow_schema.json', release.tag_name).then((response) => {
return response ? true : false;
});
})
}),
);

// get last push to dev branch
Expand Down Expand Up @@ -187,16 +186,16 @@ export const writePipelinesJson = async () => {
) {
return {
modules: Object.keys(
modules_json.repos['https://github.com/nf-core/modules.git'].modules['nf-core']
modules_json.repos['https://github.com/nf-core/modules.git'].modules['nf-core'],
),
subworkflows: Object.keys(
modules_json.repos['https://github.com/nf-core/modules.git'].subworkflows['nf-core']
modules_json.repos['https://github.com/nf-core/modules.git'].subworkflows['nf-core'],
),
};
} else {
return {
modules: Object.keys(
modules_json.repos['https://github.com/nf-core/modules.git'].modules['nf-core']
modules_json.repos['https://github.com/nf-core/modules.git'].modules['nf-core'],
),
};
}
Expand All @@ -209,7 +208,7 @@ export const writePipelinesJson = async () => {
});
}
return { tag_name, published_at, tag_sha, has_schema, doc_files, components };
})
}),
);

// Assign new_releases to data.releases
Expand Down Expand Up @@ -238,7 +237,7 @@ export const writePipelinesJson = async () => {
pipelines.remote_workflows.push(data);
}
bar.tick();
})
}),
);

// sort the pipelines by name
Expand Down
5 changes: 2 additions & 3 deletions bin/remark-admonitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { h } from 'hastscript';
import { visit } from 'unist-util-visit';


const acceptableAdmonitionTypes = {
note: {
title: 'Note',
Expand Down Expand Up @@ -77,7 +76,7 @@ export default function admonitionsPlugin() {
titleData.hProperties = h(
'span',
{ class: `admonition-title ` },
node.attributes.title ? node.attributes.title : boxInfo.title
node.attributes.title ? node.attributes.title : boxInfo.title,
).properties;

// Creating the icon's column.
Expand Down Expand Up @@ -108,4 +107,4 @@ export default function admonitionsPlugin() {
}
});
};
}
}
Loading

0 comments on commit 925d10e

Please sign in to comment.