Skip to content

Commit

Permalink
Merge branch 'dev' into prettier-formatting-in-module-template
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianegli authored Nov 14, 2022
2 parents 9a1cfdc + 564868f commit 0453dfd
Show file tree
Hide file tree
Showing 98 changed files with 4,220 additions and 1,367 deletions.
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "nfcore",
"image": "nfcore/gitpod:latest",
"postCreateCommand": "python -m pip install --upgrade -r ../requirements-dev.txt -e ../",
"remoteUser": "gitpod",

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
"python.linting.flake8Path": "/opt/conda/bin/flake8",
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
"python.linting.pylintPath": "/opt/conda/bin/pylint"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
}
}
}
16 changes: 16 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,19 @@ You can replicate this process locally with the following commands:
nf-core create -n testpipeline -d "This pipeline is for testing"
nf-core lint nf-core-testpipeline
```

## GitHub Codespaces

This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal.

To get started:

- Open the repo in [Codespaces](https://github.com/nf-core/tools/codespaces)
- Tools installed
- nf-core
- Nextflow

Devcontainer specs:

- [DevContainer config](.devcontainer/devcontainer.json)
- [Dockerfile](.devcontainer/Dockerfile)
18 changes: 12 additions & 6 deletions .github/workflows/create-lint-wf.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Create a pipeline and run nf-core linting
on: [push, pull_request]
on:
push:
branches:
- dev
pull_request:
release:
types: [published]

# Cancel if a newer run is started
concurrency:
Expand All @@ -21,7 +27,7 @@ jobs:
- "latest-everything"
steps:
# Get the repo code
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Check out source-code repository

# Set up nf-core/tools
Expand All @@ -42,7 +48,7 @@ jobs:
version: ${{ matrix.NXF_VER }}

# Install the Prettier linting tools
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier
Expand Down Expand Up @@ -80,7 +86,7 @@ jobs:

# Run nf-core linting
- name: nf-core lint
run: nf-core --log-file log.txt lint --dir nf-core-testpipeline --fail-ignored --fail-warned
run: nf-core --log-file log.txt --hide-progress lint --dir nf-core-testpipeline --fail-ignored --fail-warned

# Run the other nf-core commands
- name: nf-core list
Expand All @@ -96,7 +102,7 @@ jobs:
run: nf-core --log-file log.txt bump-version --dir nf-core-testpipeline/ 1.1

- name: nf-core lint in release mode
run: nf-core --log-file log.txt lint --dir nf-core-testpipeline --fail-ignored --fail-warned --release
run: nf-core --log-file log.txt --hide-progress lint --dir nf-core-testpipeline --fail-ignored --fail-warned --release

- name: nf-core modules install
run: nf-core --log-file log.txt modules install fastqc --dir nf-core-testpipeline/ --force
Expand All @@ -115,7 +121,7 @@ jobs:

- name: Upload log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: nf-core-log-file
path: log.txt
12 changes: 9 additions & 3 deletions .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Create a pipeline and test it
on: [push, pull_request]
on:
push:
branches:
- dev
pull_request:
release:
types: [published]

# Cancel if a newer run is started
concurrency:
Expand All @@ -20,7 +26,7 @@ jobs:
- "21.10.3"
- "latest-everything"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Check out source-code repository

- name: Set up Python 3.7
Expand All @@ -45,7 +51,7 @@ jobs:
- name: Upload log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: nf-core-log-file
path: log.txt
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Check out source-code repository

- name: Set up Python 3.7
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier @prettier/plugin-php
Expand All @@ -39,11 +39,11 @@ jobs:
options: "--color"

- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: python-isort
uses: isort/isort-action@v0.1.0
uses: isort/isort-action@v1.0.0
with:
isortVersion: "latest"
requirementsFiles: "requirements.txt requirements-dev.txt"
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Lint tools code formatting
on: [push, pull_request]
on:
push:
branches:
- dev
pull_request:
release:
types: [published]

# Cancel if a newer run is started
concurrency:
Expand All @@ -10,9 +16,9 @@ jobs:
EditorConfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker
Expand All @@ -24,9 +30,9 @@ jobs:
Prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier
Expand All @@ -37,7 +43,7 @@ jobs:
PythonBlack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Check code lints with Black
uses: psf/black@stable
Expand Down Expand Up @@ -68,14 +74,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source-code repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: python-isort
uses: isort/isort-action@v0.1.0
uses: isort/isort-action@v1.1.0
with:
isortVersion: "latest"
requirementsFiles: "requirements.txt requirements-dev.txt"
2 changes: 1 addition & 1 deletion .github/workflows/push_dockerhub_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build nfcore/tools:dev docker image
run: docker build --no-cache . -t nfcore/tools:dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push_dockerhub_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build nfcore/tools:latest docker image
run: docker build --no-cache . -t nfcore/tools:latest
Expand All @@ -38,5 +38,5 @@ jobs:
docker tag nfcore/tools:latest nfcore/tools:${{ github.event.release.tag_name }}
docker push nfcore/tools:${{ github.event.release.tag_name }}
docker push nfcore/gitpod:latest
docker tag nfcore/gitpod:latest nfcore/tools:${{ github.event.release.tag_name }}
docker tag nfcore/gitpod:latest nfcore/gitpod:${{ github.event.release.tag_name }}
docker push nfcore/gitpod:${{ github.event.release.tag_name }}
8 changes: 6 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ name: Python tests
# Only run if we changed a Python file
on:
push:
branches:
- dev
pull_request:
release:
types: [published]

# Cancel if a newer run is started
concurrency:
Expand All @@ -15,10 +19,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Check out source-code repository

- name: Set up Python ${{ matrix.python-version }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
else
curl -O https://nf-co.re/pipeline_names.json
fi
echo "::set-output name=matrix::$(cat pipeline_names.json)"
echo "name=matrix::$(cat pipeline_names.json)" >> $GITHUB_OUTPUT
sync:
needs: get-pipelines
Expand All @@ -36,10 +36,10 @@ jobs:
matrix: ${{fromJson(needs.get-pipelines.outputs.matrix)}}
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Check out nf-core/tools

- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Check out nf-core/${{ matrix.pipeline }}
with:
repository: nf-core/${{ matrix.pipeline }}
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Upload sync log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sync_log_${{ matrix.pipeline }}
path: sync_log_${{ matrix.pipeline }}.txt
10 changes: 8 additions & 2 deletions .github/workflows/tools-api-docs-dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: nf-core/tools dev API docs
# Run on push and PR to test that docs build
on: [pull_request, push]
on:
push:
branches:
- dev
pull_request:
release:
types: [published]

# Cancel if a newer run is started
concurrency:
Expand All @@ -14,7 +20,7 @@ jobs:

steps:
- name: Check out source-code repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python 3.7
uses: actions/setup-python@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tools-api-docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- ${{ github.event.release.tag_name }}
steps:
- name: Check out source-code repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python 3.7
uses: actions/setup-python@v3
Expand Down
Loading

0 comments on commit 0453dfd

Please sign in to comment.